- When installing NuGet package sfrom step 5 choose all sources
- Make an MVC Layout. Default layout in Sitecore will not work
- Remove…. Dlls
- Change prop on Sitecore.Kernelt and NewtonSoft dlls and Sitecore.Marketing dll to Copy to Local = False
- Paths in sitecore are like this: /layouts/Brainfacts2/sublayouts/sltDisclaimer.ascx
- If site complains about global asax see if you need to delte App_globalasax.compiled and App_global.asax.dll (compare to bin directory of a clean install)
- Remove ViewStart file and Shared folder from under VIews in webroot otherwise controller renderings don't work
This was in the
error:
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary
ASP.NET
Files\root\95faf2aa\1ab7e3c2\assembly\dl3\7d293563\3cfb8de2_96a6d301\App_global.asax.DLL
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary
ASP.NET Files\root\95faf2aa\1ab7e3c2\App_global.asax.7m4ydhfy.dll
To set up a Visual Studio 2015 project for Sitecore MVC:
- Open Visual Studio 2015 as an Administrator and click File, New, Project… and in the New Project dialog, browse to Templates, Visual C#, Web.. Select ASP.NET Web Application:
- Click OK. In the New ASP.Net Project dialog, create an empty project with folders and references for MVC :
- In the project folder that Visual Studio created, copy the
global.asaxfile from the Website folder of the Sitecore installation, overwriting theglobal.asaxfile that Visual Studio added when you created the project. The file should only have this content:%@Application Language='C#' Inherits="Sitecore.Web.Application" % - The
Web.configfile in the Visual Studio project is quite minimal, while theWeb.configfile in the Sitecore instance contains important settings. This step is to avoid that the file from Visual Studio overwrites the one in Sitecore when you publish (see step REF _Ref463611924 \r \h 9).In Visual Studio, in the Solution Explorer, right-click theWeb.configfile in the root of the project, and select Properties. Set the Build Action property toNoneand the Copy to Output Directory property toDo not copy: - In the NuGet Package Manager in Visual Studio, add these Sitecore packages to your project:
Sitecore.KernelSitecore.MvcSitecore.Mvc.Analytics - In the Solution Explorer in Visual Studio, set the Copy Local property of each DLL reference the NuGet Package Manager added to
False. - In the
Views/web.configfile of your Visual Studio project, add the following Sitecore namespaces to the list of namespaces:<add namespace="Sitecore.Mvc" /><add namespace="Sitecore.Mvc.Presentation" /> To set up the publishing deployment, in the Create Publish Settings dropdown in the Visual Studio toolbar, select <New Custom Profile>. - In the Publish Web dialog, in the Publish method field, click File System, and in the Target location field, browse to the Website folder of your Sitecore instance, and then click Publish.
See Sitecore public NuGet feed FAQ for more information about NuGet feeds.
No comments:
Post a Comment