Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET VNext Debugging MVC Source

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?

like image 476
Mathias F Avatar asked Jul 27 '14 19:07

Mathias F


3 Answers

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

like image 143
Victor Hurdugaci Avatar answered Oct 18 '22 05:10

Victor Hurdugaci


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

enter image description here

like image 42
bertt Avatar answered Oct 18 '22 06:10

bertt


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

like image 29
DesDesDes Avatar answered Oct 18 '22 04:10

DesDesDes