Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asp .Net Core - cannot install Microsoft.AspNet.Mvc nuget package

In my Asp .Net Core Web Application (started with empty template) I cannot install Microsoft.AspNet.Mvc nuget package.

After pressing Install in Nuget manager I get this error message:

Package restore failed. Rolling back package changes for 'WebApplication1'.

I tried to solve it on my own, but:

1) My project doesn't have project.json

2) Clearing nuget cache like in this answer didn't help: Netstandard1.x Nuget packages cannot be installed for netstandard1.x projects

Project target framework: .NetCoreApp1.0 (also tried 1.1)

Ide: VS2017 RC

I didn't have problems so far with installing other packages.

Is there a workaround to install mvc package?

Btw. I have to start with empty project template.

Thanks in advance for your support.

like image 465
David762 Avatar asked Jan 21 '17 23:01

David762


1 Answers

I looked harder in nuget package name and discovered that correct package to install should be Microsoft.AspNetCore.Mvc and not Microsoft.AspNet.Mvc.

Silly mistake, I chose most popular package by typing "mvc" in search box.

like image 198
David762 Avatar answered Nov 15 '22 04:11

David762