aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 124 forks source link

Add MVC 4 support to VS2017 RC #941

Closed sayedihashimi closed 7 years ago

sayedihashimi commented 7 years ago

MVC 4 doesn't work with VS2017 RC.

sayedihashimi commented 7 years ago

Note: support is coming in the next release.

brunoamancio commented 7 years ago

This issue should be closed, right?

https://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes Issues Fixed in this Release

tupunco commented 7 years ago

MVC 4 doesn't work with Win10-64/Visual Studio Community 2017 15.1(26403.7).

barrytang commented 7 years ago

/cc @joeloff

@tupunco, when you said MVC4 doesn't work, do you mean you can't create a project or you weren't able to open a MVC4 project? Also, did you check the MVC4 checkbox under the ASP.NET and Web workload in the VS installer screen?

joeloff commented 7 years ago

@tupunco could you confirm whether you tried to open an MVC 4 project or tried to create a new project?We only support opening existing MVC 4 projects in VS 2017.

joeloff commented 7 years ago

Since we haven't heard back and don't have enough information to proceed we're closing this issue for now. If you run into this again, please open an issue on the Developer Community site with the details.

tupunco commented 6 years ago

@joeloff Sorry, forget this "issues" reply. I mean can not open the existing MVC4 project, but recently an VS2017 update , and it worked up. nice.

joeloff commented 6 years ago

Thanks, glad to hear it's working for you @tupunco

marvinglennlacuna commented 6 years ago

That still doesn't fix the main problem. The projects are not loading up.

EasyAsABC123 commented 6 years ago

Seems to still be broken for msbuild (Visual Studio Build Tools 2017)

joeloff commented 6 years ago

@EasyAsABC123 what are the errors you're seeing?

EasyAsABC123 commented 6 years ago

@joeloff the error message looks like this:

"D:\<insert path>\BuildScript\AllProjects.proj" (default target) (1)
->
"D:\<insert path>\Mobile\BUILD.proj" (default target) (649) ->
"D:\<insert path>\Mobile\<solution>.sln" (default target) (6
50) ->
"D:\<insert path>\Mobile\Messaging\<project>.csproj" (default target) (653) ->
"D:\<insert path>\Mobile\Messaging\<project>.csproj" (default target) (660:4) ->
(CoreCompile target) ->  
<path to file>\KeywordStatServiceV1.cs(4,18): error CS0234: The type ornamespace name 'Http' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) [D:\<insert path>\Mobile\Messaging\<project>.csproj]
<path to file>\MobileMessageStatisticsServiceV1.cs(4,18): error CS0234: The type or namespace name 'Http' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) [D:\<insert path>\Mobile\Messaging\<project>.csproj]
<path to file>\SmsGetMessageByIdServiceV1.cs(4,18): error CS0234: The type or namespace name 'Http' does not exist inthe namespace 'System.Web' (are you missing an assembly reference?) [D:\<insert path>\Mobile\Messaging\<project>.csproj]
<path to file>\SmsGetMobileMessageStatisticsGraphServiceV1.cs(11,18): error CS0234: The type or namespace name 'Http' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) [D:\<insert path>\Mobile\Messaging\<project>.csproj]
<path to file>\SmsGetMobileMessageStatisticsServiceV1.cs(4,18): error CS0234: The type or namespace name 'Http' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) [D:\<insert path>\Mobile\Messaging\<project>.csproj]

But really the error is that the ASP.NET MVC 4 isn't installed...i resolved this by installing from here but i believe that should be an install option.

joeloff commented 6 years ago

That's the old runtime that used to GAC the MVC 4 assemblies. Building in Visual Studio 2017 should work as long as you're set up to do package restores for the runtime packages into your project. Is restore running at all for the solution from the commandline?

EasyAsABC123 commented 6 years ago

@joeloff indeed it is, but this project is old and isn't using nuget for these packages it is referencing the Program Files (x86) location, if this is a unique case no worries i'll resolve it for me only...just wanted to point it out.

joeloff commented 6 years ago

@EasyAsABC123 yes the older projects used to rely on the Assemblies folder we had for the MVC 4 runtime, but package restore is definitely the preferred way to do this in VS2017

EasyAsABC123 commented 6 years ago

@joeloff if all i need is:

System.Net
System.Net.Http
System.Web
System.Web.Http

Which nuget package would be best for minimal impact? Microsoft.AspNet.WebApi.Core?

joeloff commented 6 years ago

Looks like that should be sufficient. I ran nuget install Microsoft.AspNet.WebApi.Core -Version 4.0.30506 -OutputDirectory wao and that brings in System.Net.Http and System.Web.Http (System.Net and System.Web should get picked up from the .NET framework install itself I think)

EasyAsABC123 commented 6 years ago

you are correct @joeloff just not the .Http variants

aniruddha-dev commented 6 years ago

Hi, is this issue fixed because i am not able to create new project in vs 2017 running on 64 bit windows 10

joeloff commented 6 years ago

@iamaniruddha We do not support new projects for MVC 4. You can open existing projects and you will be able to do things like add controllers and views. VS 2013 was the last version that supported creating new MVC 4 projects.

VQuery commented 6 years ago

Hi @joeloff

Regarding this comment, "recently an VS2017 update , and it worked up."

Which starting version of VS2017 supports MVC4 ?