0

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!

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

D'oh! You must have beaten me by just a few seconds. I'm going to leave my answer up though as IMO the discussion of prerelease vs RTM bits will be helpful to the OP.
1

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).

3 Comments

the answer to your question is that I started with .NET Core today. so I don't have a lot of information. so how to work with the real version. not the prerelease? I I just created an empty ASP.NET 5 Application using visual studio 2015 wizard
You can get the latest runtime and Visual Studio tooling from here. I would just delete & recreate your solution/project once you have the appropriate bits installed.
Note that on the 1.0 release, the x86 binaries would only produce x86 output; similarly the x64 binaries would only produce x64 output. It may not be an issue in 1.1, but I have not had a chance to check.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.