7

I followed the blog post of Imran Baloch where he shows how you can debug into ASP.Net MVC VNext.

I used a VM in Azure where Vs 2014 is installed. enter image description here

I created the global solution folder and placed a global.json file in it where I specified the folder containing the current MVC source cloned from https://github.com/aspnet/Mvc/tree/dev/src. When I try to compile the solution I get a lot of errors because of missing references.

enter image description here

Did anybody try out the method proposed in the blog post? What am I doing wrong?

1
  • 1
    It sounds like a NuGet issue, is the solution set to retrieve missing NuGet packages during build? If it is, perhaps something like stackoverflow.com/questions/24115923/… might help?
    – Klors
    Commented Jul 30, 2014 at 11:30

4 Answers 4

8
+100

I'm shooting blind here because adding the sources to global.json works fine for me.

Try adding a NuGet.config file to your solution with the following content:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
   <packageSources>
     <add key="AspNetVNext" value="https://www.myget.org/F/aspnetvnext/" />
     <add key="NuGet.org" value="https://nuget.org/api/v2/" />
   </packageSources>
</configuration>

Also, try doing running kpm restore at the root of your solution folder.

If this doesn't help, please add a little more information like KRE version, what is in your <user profile>\.kre or <user profile>\.kpm folders

2

add 'http://www.myget.org/F/aspnetvnext/api/v2' to tools -> options -> nuget package manager -> package sources

enter image description here

1

I just ran: git clone https://github.com/aspnet/Mvc.git kvm upgrade kpm restore

Then I opened the mvc solution in vs2014 ctp2 and it opened and compiled correctly. I think that your project.json has version numbers in there which do not match the version numbers used in your cloned version of mvc. Microsoft changed the version numbers some time ago.

The cloned version of mvc on my box uses Microsoft.AspNet.FileSystems version 1.0.0-*, which is not included in the mvc source and is a package reference. It also used Miccrosoft.AspNet.Mvc.Common version "", which is a source code reference. You could try to adjust your project.json to match the numbers.

HTH, Bart

0

And perhaps to answer yourself to your question you may need to read this article:

http://blogs.msdn.com/b/webdev/archive/2015/02/06/debugging-asp-net-5-framework-code-using-visual-studio-2015.aspx

Mixing different versions (yes, ASP.NET 5 / MVC 6 is still a moving target!) may lead to very annoying results. Read and see.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.