0

How can I reference a local build of Microsoft.AspNetCore.Mvc in my Asp.Net Core application? I'm trying to debug something in the framework. I've pulled down the source and have it compiled, but I can't get my application to see the location to pick-up the code.

My global.json file:

{
  "projects": [
    "src",
    "test",
    "c:/source/repos/mvc/src"
  ],
  "sdk": {
    "version": "1.0.0-preview2-003131"
  }
}

Snippet of my package.json file. The version is the same version as the DLL that is built:

"dependencies": {
    "Microsoft.AspNetCore.Mvc": {
      "version": "1.2.0-preview1",
      "type": "build"
    },

1 Answer 1

1

If you want to be sure it will use the project reference instead of the nuget reference you can specify the dependency target:

"Microsoft.AspNetCore.Mvc": {
  "version": "1.2.0-preview1",
  "type": "build",
  "target" : "project" //this will make sure it only looks for a project
},

Also make sure you run dotnet restore before you build the project.

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

Comments

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.