ASP.NET 5 (vNext) web project: library conflict upgrading from beta4 to beta6

前端 未结 2 1531
故里飘歌
故里飘歌 2021-01-18 10:31

I upgraded DNVM with dnvm upgrade -Unstable. Running dnvm list shows this to be active: 1.0.0-beta6-12120.

I created a new project using t

相关标签:
2条回答
  • 2021-01-18 11:01

    If building from the command line:

    From the command line do a dnu restore. This will force an update of dependency resolution. Pretty much anytime you change the runtime either upgrading to a new one or switching the active runtime I would do a restore.

    If building from visual studio:

    Visual studio uses the sdk property to determine which runtime to use when building and restoring. This can be different than the runtime set active by dnvm. Setting the active runtime in dnvm does not change the runtime used by the IDE. Setting the target in VS does not change the active runtime on the command line.

    To change the runtime used by Visual Studio either:

    Set the minimum dnx version for the entire solution.

    Edit the global.json (solution level file) manually. Set or change the value for "sdk" to the desired version of the runtime. This sets the defaults for all projects and it can be overridden at the project level below.

    OR

    Set the desired runtime for the project

    Right click on a project > Properties > Application

    Check Use specific DNX version. Set to desired version, platform, and architecture

    0 讨论(0)
  • 2021-01-18 11:19

    beta6-*

    In your project.json file(s), try using beta6-* instead of just beta6. That means it will reference the most recent build of it.

    ~.dnx\runtimes

    Check what runtime directories are in C:\Users\MyUser\.dnx\runtimes. Mine include the following:

    dnx-clr-win-x86.1.0.0-beta6          <-- I made this one via a rename.
    dnx-clr-win-x86.1.0.0-beta6-12085
    dnx-clr-win-x86.1.0.0-beta6-12120
    

    In my global.json file, which is in the same directory as the *.sln, I make sure to reference one of the runtimes like this:

    {
        "projects": [ "src", "test" ],
        "sdk": {
            "version": "1.0.0-beta6-12120"
        }
    }
    
    0 讨论(0)
提交回复
热议问题