Reduced ASP.NET MVC 5 from .NET 4.5 to 4.0

Sits with an interesting problem .. NET 4.5 is not supported on the server (the client did not mention this)

BUT the application is written using ASP.NET MVC 5 (which only works on .NET 4.5).

Thus, redefining a point network means downgrading ASP.NET MVC.

One of the many mistakes we get is

The type or namespace name "Mvc" does not exist in the namespace "System.Web"

I can only assume that this is due to the implementation of all Owin middleware in ASP.NET MVC 5.

Does anyone have experience removing these links and the capabilities of ASP.NET MVC 4?

Following Greg's suggestion below, I ran nuget, which uninstalled v5 and added in v4, but now all Owin things are a problem

+4
source share
1 answer

Try the following:

  • Right-click on the project in Solution Explorer (in Visual Studio) and select Properties.
  • Change the Target Framework drop-down list to all the frames you want to customize.
  • Do the same for any other projects or test projects in the solution that you also want to change the target structure for.
  • Manually edit the .csproj file in a text editor and replace all the lines "net45" with "net40"
  • In Visual Studio, click the Tools menu and select Library Package Manager> Manage NuGet Package Solutions
  • Click "Updates"
  • Update all Microsoft packages
  • Click Restart Now.
  • Reconstruction of the project.
+4
source

Source: https://habr.com/ru/post/1261763/


All Articles