New type of project for ASP.NET 5 control their references through
project.json
file. This blurs boundary between NuGet reference, some framework reference, project reference and COM reference that exists in classic projects. It’s very convenient but what if you would like to step through & debug external source code?
Solution is to create or edit global.json
file in your solution. The projects
value tells DNU where to find your source code. You may add there relative or non relative paths. For example:
1 2 3 4 5 6 |
{ "projects": [ "src", "test", "c:\\sources\\Configuration\\src" ], "sdk": { "version": "1.0.0-rc1-final" } } |
Remember – DNU will use only those projects which project.json
is one level below folders you have pointed (eg. src\MyProject\project.json
, c:\\sources\\Configuration\\src\\Microsoft.Extensions.Configuration\\project.json
).
If DNU previously downloaded project into cache you will have to run dnu restore
and dnu build
again to make sure you pick up proper code.