Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASP.NET Web core app + installing MVC fails during restore. #3808

Closed
rrelyea opened this issue Oct 28, 2016 · 3 comments
Closed

ASP.NET Web core app + installing MVC fails during restore. #3808

rrelyea opened this issue Oct 28, 2016 · 3 comments

Comments

@rrelyea
Copy link
Contributor

rrelyea commented Oct 28, 2016

SCENARIO

  1. New ASP.NET Core Web Application (.NET Core) > Empty
  2. Add Microsoft.AspNetCore.Mvc package using Manage NuGet packages dialog

ISSUES

  1. When I tried earlier, I likely selected the wrong package to install – I typed ‘mvc’ and chose ‘Microsoft.AspNet.Mvc’ by mistake instead of finding ‘Microsoft.AspNetCore.Mvc’. Package install failed and it also rolled back the changes, which is pretty good.
    • Ideally, ‘Microsoft.AspNet.Mvc’ will not even show for ASP.NET Core projects but this can wait until post-Dev15RC.

...
Package Microsoft.ASpnet.Razor 3.2.3 is not compat with netcoreapp1.0
...
Error: one or more packages are incompatible with .NETCOreApp, version=v1.0.
Package restor failed. Rolling back package changes...

(rob has image in email)

  1. Packages seems to be always added to the top of package references in csproj. It will be nice if alphabetical order is preserved. I noticed that the template itself does not have the packages ordered alphabetically – I’ll follow-up on those. @rob, AspNetCore.Mvc and AspNetCore.StaticFiles are the packages that I added using Manage NuGet Packages dialog. Did they get added to the top just because the references from the template were already out of order?

Image that won't paste in shows the following order of PackRefs. (Rob has email with image)
Mvc, then staticfiles, then netcore.app, then net.sdk.web, then aspnetcore.diagnostics

@rrelyea rrelyea added Priority:2 Issues for the current backlog. Functionality:Restore labels Oct 28, 2016
@rrelyea rrelyea added this to the 4.0 RC milestone Oct 28, 2016
@rrelyea rrelyea added help wanted Considered good issues for community contributions. and removed help wanted Considered good issues for community contributions. labels Oct 28, 2016
@rrelyea
Copy link
Contributor Author

rrelyea commented Oct 28, 2016

Internal email:
Ok, now that I have time to read the bug and answer Ankit’s questions, I see that I misunderstood here. It works, but you only had minor issues.

  1. Ideally, ‘Microsoft.AspNet.Mvc’ will not even show for ASP.NET Core projects but this can wait until post-Dev15RC.
    RR: this is a much desired feature that isn’t in scope for Dev15. It involves client and server work. It isn’t small.

  2. Packages seems to be always added to the top of package references in csproj. It will be nice if alphabetical order is preserved. I noticed that the template itself does not have the packages ordered alphabetically – I’ll follow-up on those. @rob, AspNetCore.Mvc and AspNetCore.StaticFiles are the packages that I added using Manage NuGet Packages dialog. Did they get added to the top just because the references from the template were already out of order?

We call CPS to Add packages, they determine where to write. I’d argue that they should write it at the end of the list, instead of the beginning.
I think that is how legacy csproj handles insertions.

    Bala – can you please file a bug on Sri’s team – my guess is that he’d want this bug on Roslyn-Project-System repro.

    I am going to close our bug, once I find the tracking issue for #1.

@rrelyea rrelyea assigned rrelyea and unassigned mishra14 Oct 28, 2016
@rrelyea rrelyea added Resolution:Duplicate This issue appears to be a Duplicate of another issue Resolution:External This issue appears to be External to nuget and removed Resolution:Duplicate This issue appears to be a Duplicate of another issue Resolution:External This issue appears to be External to nuget Priority:2 Issues for the current backlog. Type:Bug labels Oct 28, 2016
@rob
Copy link

rob commented Oct 28, 2016

Great, thanks @rrelyea!

@rrelyea rrelyea modified the milestones: 4.0 RC3, 4.0 RC, 4.0 RTM Jan 9, 2017
@jainaashish
Copy link
Contributor

Fixed with latest Visual studio 15.4

@jainaashish jainaashish modified the milestones: 4.0 RC4, 4.6 Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants