I want to update my C# web application to the next asp.net version.
I ran
dnvm use 1.0.0-rc1-update1 -r clr arch x64 -p
and dnvm list shows that the active version has been set to rc1-update1
Now I want to update my VS2015 solution to use rc1-update1
I edited project.json to update the version from rc1-final to rc1-update1
however VS now indicates "package restore failed". and I have error messages like this.
Severity Code Description Project File Line Suppression State
Error CS0234 The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) MyBootStrap.DNX 4.5.1
Hovering my mouse over the edited dependencies in project.json shows
I must be missing a step. How do I upgrade my project to use the Active Version of the framework?
[Update] When I create a new web application from the template I notice that it is still using rc1-final.
There is also a message in the Solution Explorer window "Package restore failed" The Output shows the following
PATH=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External;
%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git
C:\Users\kirsten\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update1\bin\dnx.exe "C:\Users\kirsten\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update1\bin\lib\Microsoft.Dnx.Tooling\Microsoft.Dnx.Tooling.dll"
restore "E:\EShared\Dev2016\MyBootStrap\src\MyBootStrap" -f "C:\Program Files (x86)\Microsoft Web Tools\DNU"
Microsoft .NET Development Utility Clr-x86-1.0.0-rc1-16231
CACHE https://www.nuget.org/api/v2/
Restoring packages for E:\EShared\Dev2016\MyBootStrap\src\MyBootStrap\project.json
CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Diagnostics'
CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.IISPlatformHandler'
CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc'
CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.TagHelpers'
CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.Kestrel'
CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.StaticFiles'
CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Tooling.Razor'
CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Extensions.Configuration.FileProviderExtensions'
CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Extensions.Configuration.Json'
CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Extensions.Logging'
CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Extensions.Logging.Console'
CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Extensions.Logging.Debug'
CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.VisualStudio.Web.BrowserLink.Loader'
Unable to locate Dependency Microsoft.AspNet.Diagnostics >= 1.0.0-rc1-update1
Unable to locate Dependency Microsoft.AspNet.IISPlatformHandler >= 1.0.0-rc1-update1
Unable to locate Dependency Microsoft.AspNet.Mvc >= 6.0.0-rc1-update1
Unable to locate Dependency Microsoft.AspNet.Mvc.TagHelpers >= 6.0.0-rc1-update1
Unable to locate Dependency Microsoft.AspNet.Server.Kestrel >= 1.0.0-rc1-update1
Unable to locate Dependency Microsoft.AspNet.StaticFiles >= 1.0.0-rc1-update1
Unable to locate Dependency Microsoft.AspNet.Tooling.Razor >= 1.0.0-rc1-update1
Unable to locate Dependency Microsoft.Extensions.Configuration.FileProviderExtensions >= 1.0.0-rc1-update1
Unable to locate Dependency Microsoft.Extensions.Configuration.Json >= 1.0.0-rc1-update1
Unable to locate Dependency Microsoft.Extensions.Logging >= 1.0.0-rc1-update1
Unable to locate Dependency Microsoft.Extensions.Logging.Console >= 1.0.0-rc1-update1
Unable to locate Dependency Microsoft.Extensions.Logging.Debug >= 1.0.0-rc1-update1
Unable to locate Dependency Microsoft.VisualStudio.Web.BrowserLink.Loader >= 14.0.0-rc1-update1
Writing lock file E:\EShared\Dev2016\MyBootStrap\src\MyBootStrap\project.lock.json
Restore complete, 413ms elapsed
from this I see it is trying to run the x86 version of dnx. Why would that be?
[Update] I am wondering why it would be using nuget.org/api/v2 so I reinstalled nuget using extension manager. It shows version 3.3.0.167 in Extension Manager, yet the output window for Package Manager still metions V2.
I am running Windows 7
[Update] project.json is
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.AspNet.Diagnostics": "1.0.0-rc1-update1",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-update1",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-update1",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-update1",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-update1",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-update1",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-update1",
"Microsoft.Extensions.Configuration.FileProviderExtensions" : "1.0.0-rc1-update1",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-update1",
"Microsoft.Extensions.Logging": "1.0.0-rc1-update1",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-update1",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-update1",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc1-update1"
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel"
},
"frameworks": {
"dnx451": { },
"dnxcore50": { }
},
"exclude": [
"wwwroot",
"node_modules"
],
"publishExclude": [
"**.user",
"**.vspscc"
],
"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
}
}
Here is my NuGet.Config file
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<packageSources>
<add key="SBD" value="E:\EShared\NuGet" />
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</packageSources>
<activePackageSource>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</activePackageSource>
</configuration>
Here is my package sources
The SBD one is just a few we developed in house. I don't think it should affect things.