What can I uninstall after upgrade to ASP.NET MVC 5 - asp.net-mvc

I have upgraded the server to ASP.MVC 5.
In Control Panel in Installed Programes, I found:
ASP.NET MVC 2
ASP.NET MVC 3
ASP.NET MVC 4
ASP.NET MVC 4 Runtime
It is safe to uninstall all of this older ASP.NET MVC? There is no ASP.NET MVC 5 in list. It is because it was installed via Nuget?

MVC is bin deployable - meaning that you don't have to install it at all if you don't want to. Earlier versions of MVC were easier to run if you had installed them, so this is probably why you have installations.
By default, anything you fetch from nuget is bin deployed (as it isn't installed on your machine, the files are added to your project).
You can safely remove any installed MVC packages - and if you do have projects that depend upon them, you can install MVC in any project using nuget, and specifying a version (back to version 3) - for example:
Install-Package Microsoft.AspNet.Mvc -Version 3.0.50813.1
Install-Package Microsoft.AspNet.Mvc -Version 4.0.40804
Install-Package Microsoft.AspNet.Mvc -Version 5.2.0
There are no dependencies of newer MVC versions on older ones, they are simply a newer version of the set of dlls, so there should be no issue removing older versions.

There are no dependencies of newer MVC versions on older ones, they are simply a newer version of the set of dlls, so there should be no issue removing older versions.
Are you sure???
NuGet decided to upgrade an MVC 4 to 5 box and it hosed the solution. Right now, I have this problem:
access method 'System.Web.Http.HttpConfiguration.DefaultFormatters()' failed
But, any solution found on the web right now has not worked.
It seems Microsoft is back to the ol' marketing tricks, bundling crap galore and creating an evangelizing environment where those using their technologies spend an inordinate amount of time on THEIR technologies, not the end solutions. I'm so frickin' mad that if my solution doesn't start working soon I'm tossing Asp.Net MVC after using it for four version with ZERO problems like this and going node.js.

Related

Does ASP.NET Core version have to match nuget package versions?

I'm trying to work out which version of the ASP.NET related packages I should be using.
We are trying to stick to LTS versions of ASP.NET Core, meaning we are still on version 2.1 and not 2.2 for the compiler and runtime. However I'm having a hard to trying to find out what version of the nuget packages we should be using.
for example, Microsoft.AspNetCore.Mvc says that its latest version is 2.2.0 and visual studio wants me to upgrade to this. However, I am wondering if we should stay on 2.1.3 since we are still on 2.1 for the compiler.
Are these version numbers related? Should we be staying back on 2.1.x to match pace with the compiler or are we doing things wrong?

After installing microsoft.aspnet.core through nuget, all my packages got NU1002 error, what's wrong?

At first, I built up a ASP.NET5/MVC6 project with .netcore in VS2015 community, everything was OK. With going deeper and deeper. I have to use session or tempdata, but after I add microsoft.netcore.session package, package restore will fail and all my existing package got NU1002 error said: NU1002 the dependency XXXX in project XXXX does not support framework DNX, version=v4.5.1. Like the picture.
Error on all packages
But if I uninstall the session package, eveything is OK. What's wrong with this ? My sdk version in global.json is 1.0.0-rc1-update1 and I have removed DNX5.0 from project.json. Does anyone could help me?
According to your screenshot you are using DNX framework in your project, which should be the old version ASP.NET 5 project framework. After ASP.NET 5 upgrade to .NET Core, the framework is now called .NETCoreApp. And the SDK version now is 1.0.0-preview2-003121. The error message also means the dependency does not support framework DNX. I have installed the Microsoft.AspNetCore.Session package successful in my Visual Studio 2015 with latest .NET Core SDK version.
So I suggest you download the latest .NET Core SDK installer from below link and then create a new .NET Core application and then move your original project files to the new project and then install the session package.
https://www.microsoft.com/net/download
If your project is create by ASP.NET 5 RC1 project template, please refer to following article to migrate it to ASP.NET Core 1.0.
https://docs.asp.net/en/latest/migration/rc1-to-rtm.html

Unable to install MVC 3

I am attempting to install asp.net MVC 3 to use with Visual Web Developer 2010 Express. I try to install from AspNetMVC3ToolsUpdateSetup.exe. The install log shows this:
MSI (s) (08:E4) [00:22:35:745]: Product: Microsoft ASP.NET MVC 3 -- A
later version of Microsoft ASP.NET MVC 3 is already installed. Setup
will now exit.
A later version of Microsoft ASP.NET MVC 3 is already installed. Setup
will now exit.
I have MVC 2 installed (it came with VWD 2010). I do not see MVC3 or MVC4 in installed programs list. I don't have NuGet installed. How could I manage to install it?
I apparently had a corrupted installation. I was unable to see MVC3 installed in control panel and I was unable to see it in visual studio, but the installer detected it anyway.
I managed to install it by unzipping the installer exe and then running aspnetmvc3vwd2010tools.msi from within it directly. I found that it was the correct msi by accident. Running setup from with in it failed consistently.

Moving ASP.NET MVC project folder in VS 2013 changes System.Web.Mvc version to 4.0.0

When starting a new Web Application empty MVC project in VS 2013 using .NET 4.5.2, initially, VS 2013 will be referencing Microsoft.AspNet.Mvc 5.1.2 which contains System.Web.Mvc 5.1.0. But I typically change the directory of the MVC project so I remove the project from the solution, change the directory of the project using Windows Explorer, and then add the existing project again in the solution using VS 2013.
However, upon doing this, when I look on the version of System.Web.Mvc, it is now changed to 4.0.0. I've checked the repositories.config and it has the correct path for packages.config of the project. The packages config on the project also contains version="5.1.2" although the referenced System.Web.Mvc is 4.0.0.
Furthermore, as I am trying to use IAuthenticationFilter, the interface cannot be detected by Intellisense anymore (with red squiggly line) but I can still compile and run!
Do you guys know any workaround for this? I can use NuGet to update MVC to the latest (5.2.2 I think) and the reference would be fixed but I want to use the default 5.1.2.
you can target a specific version of MVC using the Nuget Package Manager Console:
Go to
Tools > NuGet Package Manager > Package Manage Console
At the prompt you can type
update-package Microsoft.AspNet.Mvc -version 5.1.2
I believe this is the easiest way to accomplish what you are trying to achieve. You may need to remove existing references to the MVC and WebPages dlls, sometimes references stick when moving from local/GAC references to those determined by nuget.

Whats going on with MVC5+ Assemblies?

I was planning to upgrade my project from MVC 4 to MVC5. I followed this article: http://www.asp.net/mvc/tutorials/mvc-5/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2. I did all the steps successfully, but got errors that the 5.0 dll could not be loaded.
The article, however, has no mention of where to get the DLLs. So I started looking for the DLLs everywhere, my file system, online, Google, etc.
Then I created my own MVC5 test project and noticed that the MVC 5.1 DLLs got added from nuget.
So, is Microsoft only distributing MVC dlls from nuget?
Also, I can find the MVC4 dlls from the file system and MVC5.1 dlls from the nuget package, where are the MVC5.0 dlls?
If you want a specific version from NuGet, open the Package Manager Console and type:
Install-Package Microsoft.AspNet.Mvc -Version 5.0.1
Which is the latest in the 5.0 series.

Resources