Can you install ASP.NET MVC3 and MVC2 side by side?
I want to install MVC3 and try it out on a smaller project. BUT I want to retain our current large project on MVC2 for a little while.
If I install MVC3, will my existing project be automatically upgraded or do I have the option to keep it on MVC2?
MVC 3 and 2 can exist side-by-side. The project file will not / does not have to be upgraded.
For more details, see http://www.asp.net/learn/whitepapers/mvc3-release-notes
Question title says it all: Can you install ASP.NET MVC3 and MVC2 side by side?
You can perfectly fine have ASP.NET MVC 2 and 3 running side by side on the same machine. In VS2010 you have the possibility of choosing which version you want when creating new projects and on the production server you can have MVC 2 and 3 applications running side by side without any problems. Just don't forget that MVC 3 implies .NET 4.0 whereas MVC can run on both .NET 3.5 and .NET 4.0 application pools.
Yes, I have MVC2 and MVC3 installed on my development machines. When you start new projects you are prompted for both MVC versions to choose from.
Yes, but:
I had a problem with NUnit because some of the classes are defined in both versions of the System.Web.Mvc dlls. The applications run fine, but an NUnit looses its mind - it blows up with a message Cannot cast SelectedList to SelectedList.
Edit
I am running NUnit 2.5.5. Whats happening is that when the application is built it is using the version 3.0.0.0 of the dll, but when it is run under NUnit by the time it loads the app dll, the 2.0.0.0 version of the dll is already loaded. Both of them have the SelectedList class defined in them and that causes the NUnit to loose its mind
Related
I am currently trying to develop a small web application for a business. I started development using .NET Core 1.1 version. And when I tried to study how to add Crystal Reports into the project, it is said that they are not supporting it yet.
Is it possible to add Crystal Reports if I change my target framework to 4.6 in the .NET Core app? Or do I have to start a new web application targeting .NET Framework project 4.6.2 from scratch again?
This should absolutely work. When targeting the full framework like 4.6 with Asp.Net Core you have access to any dlls that are based on 4.6 that you create project references to.
If the makers of Crystal Reports said they are not supporting it yet, perhaps they mean they are not supporting it via direct reference from a project json file but even that seems suspect. But now with VS 2017 the project json is no longer used and .Net Core projects use a regular cs proj file fairly similar to what non .Net Core projects have always uses. So again, use VS2017 you should absolutely be able to reference Crystal Reports Dlls directly and you should be able to reference a full framework class library that references a Crystal Reports DLL.
Another possibility is that maybe their designer support tooling needs updated in some way for .Net Core Projects. But even if that's the case, running an existing report should work.
I have created an ASP.NET MVC 5 project with Entity Framework and a MySQL database. In Debug-mode everything works perfectly, but now I would like to publish it to my IIS-Server.
The first project in my Solution is AspNet.Identity.MySQL which
allows me to use Entity Framework in combination with Identity 2.0
and MySQL. It is from codeplex. https://aspnet.codeplex.com/SourceControl/latest#Samples/Identity/AspNet.Identity.MySQL/
The second project is my ASP.NET MVC application.
Publishing the second project by itself is no problem. I just don´t know how to publish the first project (AspNet.Identity.MySQL).
Long story short,
I have this and don´t know how to deploy/publish it via File-System:
IdentityWeb is the ASP.NET MVC Appliaction.
Thanks for your help,
Beardy Bear
The first project AspNet.Identity.MySql is a class library, so it's output is a DLL only. When you build the solution, a DLL is output into the bin folder. If project IdentityWeb has a reference to the other one, the DLL for it will appear in the bin for that project too.
As long as when you publish the IdentityWeb project, it has the DLL AspNet.Identity.MySQL.dll in the bin, then you should be able to deploy your ASP.NET MVC application to IIS.
I realize this question has been asked by Crudler and this one by Aaiam Litigoner regarding downgrading.
Our web hosting provider failed to tell me that MVC 5 projects are not able to be hosted with our package (even letting them know absolute specifics about the project I need hosted). Bottom line, it's a huge E-commerce website that I will be in shambles to have to redo from scratch based off MVC 4 framework.
I have tried uninstalling System.Mvc references and installing MVC 4 via Nuget Package Manager, but build errors are crazy and come by the thousands since most of the code I wrote is MVC 5 based.
Is there a simple fix to downgrade MVC versions without having to start a new project and copy every single file manually, such as a patch of some sort? There's 52 projects within one solution and that's just simply not an option.
Other Specs:
Using Visual Studio 2015 Community
.NET Framework 4.5
We developped 2 differents applications with visual studio 2013 :
The first for the front-end in C# .net mvc5
The second for a web service in C# .net WebApi 2
Both applications use newtonsoft.json nuget but with different versions (6.0.8 for front and 8.0.2 for web api).
We use Local IIS to test and debug.
In IIS we create 2 websites, and 2 separate application pool.
If i compile the the web service after front end, everything is fine.
If i compile the front end after the web service, the web service crash with the 6.0.8 version of newtonsoft.json ! Why ?
The application pools shared some dlls ?
I found some articles with the "Specific version" option of the reference in the projects. With the "specific version" at true, both version can run in parallel. But i don't want to do that.
I can also update the nuget to have the same version in both projects but it is a workaround, the problem could still there with another dlls.
I need to understand why with 2 applications pool share dlls (with différents versions)...
So do you have an idea :-) ?
Thanks
Whiletrue
Following from your comment - the reason is quite simple now. your webapi and mvc project both depend on classlib which depends on newtonsoft specific version. so when you build any of webapi or mvc project, classlib's dependencies are also added to webapi or mvc project. you can either break the dependency somehow or specify versions in the web config + project file explicitly and have both versions in your Bin folder.
We have created a solution in MVC 4, targeting .Net framework 4. On local IIS it runs like honey. But recently I Published it and copied all my data including Bin folder ( which includes dll dependencies of my project) to hosting server. But whenever I am trying to visit my domain
www.myexampledomain.com/
It returns nothing. But an error. that
Viewbag is not available in current context
Why M I getting this error. I found ASP.NET Versions 1 & 2 on my hosting account. Do I need to install .Net framework on server, if yes do I need to install MVC 4 too?
no need of MVC 4 to be install just install .net framework
MVC 4 is for developing application in MVC pattern and .net framework is for provide runtime environment
After searching a lot and after reading comments n 5-10 trails , I found I made a small mistake by not setting CopyToLocal property of every MVC referenced DLL to true. It took me 2 days to resolve.
If you have same issue. kindly check on this solution too. It might help you!