Samy Sammour
Samy Sammour

Reputation: 2465

Installing MVC on asp.net Core in visual Studio 2015

I created an empty ASP.NET 5 to work with .NET Core. I am trying to add MVC package to the application but I am receiving an Error that the Versions are not compatible, although I tried lots of MVC versions.

enter image description here

Anyone has an idea about the problem? thank you!

Upvotes: 0

Views: 837

Answers (2)

David
David

Reputation: 2272

If you're working with .NET Core you should be using Microsoft.AspNetCore.* packages. (Microsoft.AspNet.* packages target the full .NET framework.)

Your screenshot shows a dependency on DNX. You do realize that's a pre-release technology? I don't mean to be rude but I'm curious as to why you would be targeting the pre-release framework rather than RTM (which has been available for several months).

If you do want to work with the prerelease bits, you may need to tweak your NuGet feeds to be able to see the appropriate .NET Core packages (I definitely had to do this when working with .NET Core betas).

Upvotes: 1

Chris Pratt
Chris Pratt

Reputation: 239440

You need Nuget packages in the Microsoft.AspNetCore.Mvc namespace. You're currently trying to install Microsoft.AspNet.Mvc 5.2.3, which is the traditional MVC package and only works with full .NET.

Upvotes: 2

Related Questions