I have been trying to add daypilot to my project.
I have added all the code I thought I needed but this error I'm getting is confusing me.
I'm guessing i have a incompatible version of daypilot??
My error is displayed in this photo.
http://imageshack.us/photo/my-images/854/mvc3r.png/
It seems you are using MVC 3.0 in your project while DayPilot uses MVC 4.0.
Change your usage of MVC package to 4.0
Related
So I'm trying to start up a new project following a tutorial.
I'm using visual studio and writing in .net core.
When I try to create a controller i get the following error:
There was an error running the template
C:\Users\dyl.nuget\packages\microsoft.visualstudio.web.codegenerators.mvc\2.1.0\Templates\ControllerGenerator\EmptyController.cshtml:
Template Processing Failed:(4,47): error CS0234: The type or namespace
name 'Hosting' does not exist in the namespace
'Microsoft.AspNetCore.Razor' (are you missing an assembly reference?)
This may be a newbie question but I can't seem to find the cause of this problem.
I've tried separately installing the microsoft.aspnetcore.razor package to my project (which is now installed). But that didn't help.
If there is some information missing, please let me know.
The reason is assembly Razor version is for Asp.net Core 2.1 not 2.0, this goes for Design, SqlServer and Web.CodeGeneration.Utils Anything that was marked version 2.1. Either complete the migration from 2.0 to 2.1 or downgrade those 5 assemblies back to Asp.net Core 2.0
Or start over targeting 2.1 with the drop down at the top of the dialog for project creation
I would like to add reference to my ASP.NET MVC4 project, but in Add reference dialog (Assemblies->Extensions), there are only version 1.0 and 2.0 of System.Web.WebPages.Razor.dll
I have installed Visual Studio Professional 2013 and ASP.NET MVC4 from Web Platform Installer. What I am missing.
The web application does not work without this reference and complains that it cannot find System.Web.WebPages.Razor.dll 3.0
Razor 3.0 is only compatible with MVC 5. In your question, you stated that you are using MVC 4, which is only compatible with Razor 2.0.
So, the real question is, why are you trying to add Razor 3.0 to MVC 4? Either stick with Razor 2.0, or upgrade your project to MVC 5.
If you have a project dependency that was designed for MVC 5 (and Razor 3.0), you might be getting this error. The same advice goes for the dependency - either change it to use Razor 2.0 and MVC 4 (assuming you can make changes to it), or upgrade the project that requires the dependency to MVC 5.
I have attempted to create an MVC 5 project by creating an MVC 4 project in Visual Studio 2012 and installing MVC 5 through Nuget.
I can build this fine.
I attempt to add a reference to another DLL, Sitecore.Mvc.DLL, which I can see was built against MVC 5.1.0. The DLL reference is added fine, and there seems to be no .NET framework conflict (which is where I've seen this issue in the past).
I'm trying to add a using statement to my code:-
using Sitecore.Mvc.Presentation;
IntelliSense picks this up fine....even allowing me to auto-complete 'Presentation'.
However when I build I get the following error:-
The type or namespace name 'Sitecore' could not be found (are you missing a using directive or an assembly reference?)
What could be the issue here?
I'm using:-
Visual Studio 2012 - Update 4
MVC 4 Web Application (initially)
MVC 5.1.0 Nuget Package
Sitecore 7.2 - Update 2 (where Sitecore.Mvc.DLL comes from)
.NET 4.5.2 installed on my machine.
Turns out I'm using a different version of Sitecore.Mvc.DLL, which IS targeted to .NET 4.5.1. Seems like the mscorelib reference in Reflector doesn't quite tell all the details.
Now I need to target my Web App to .NET 4.5.1, which means I need to follow the steps here to be able to select it.
http://blogs.msdn.com/b/dotnet/archive/2013/08/08/building-apps-with-the-net-framework-4-5-1-preview-in-visual-studio-2012.aspx
Thanks, and sorry to #Khanh TO, and everyone else for helping out.
I am working on an application in VS 2010 and using Asp.net framework 4.0 which i just migrated from Framework 3.5. The reason i had to migrate it to 4.0 is, i have a third party toolkit dll which is built in Framework 4.0, so in order to include it i had to change target framework of this project to 4.0. As, this project is being referred from other projects ans so on.., i end up converting whole application to framework 4.0. Every thing worked okay but as the application is using spring.net also, after successfully building the application, i found broken controls on almost all the pages. i am getting java script errors (about undefined control)for usercontrol PopupDatePickerControl we are using in the application. i downloaded and included latest version of Spring.net. i have no idea what is causing this problem. Please help if any one has experience working with this combination of framework 4.0 and spring.net? OR there is any way out to wrap up Framework 4.0 into 3.5. so i don't have to do this Migration.
Thanks!
Sounds like a shot in the dark on so many levels. It's probably not the combination of 4.0 and Spring.NET, unless you aren't referencing the correct Spring.NET dlls. Can you post parts of your IoC configuration and a rough outline of your app's architecture?
Also, what is the other third party toolkit you mentioned?
I'm trying to get the MVCToolkit working with an ASP.NET MVC Beta application and ran into an unresolved reference to System.Web.Extensions version 3.6 (ASP.NET MVC Beta comes with System.Web.Extensions version 3.5). All my google searches seem to point to a broken download link on Microsoft's site: ASP.NET 3.5 Extensions Preview 2
The toolkit is now in Microsoft.Web.Mvc, which is also called "Futures". If that's not confusing enough :) it's not revved with the platform.
Anyway - the toolkit is no longer the "toolkit" - it's part of the platform (for the most part) and if you have beta, you already have it. Just make sure that Micrsoft.Web.Mvc dll is in your bin.
I believe System.Web.Extensions v3.6 is part of .Net 3.5 Service Pack 1?