chsakell / aspnet-core-signalr-angular

Real-time applications using ASP.NET Core, SignalR & Angular
http://wp.me/p3mRWu-1b2
MIT License
145 stars 51 forks source link

[Bug] Detected package downgrade on dotnet restore #1

Open matthamil opened 7 years ago

matthamil commented 7 years ago

When I clone the project and run npm install, bower install, npm start, and then open a new tab and run dotnet restore, I get the following output:

log  : Restoring packages for /Users/matthamil/workspace/backend/aspnet-core-signalr-angular/project.json...
log  : Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in /Users/matthamil/workspace/backend/aspnet-core-signalr-angular/project.json...
warn : Detected package downgrade: Microsoft.AspNetCore.Hosting.Abstractions from 1.1.0 to 1.1.0-preview2-22683 
warn :  aspnet-core-signalr-angular (>= 1.0.0) -> Microsoft.AspNetCore.SignalR.Server (>= 0.2.0) -> Microsoft.AspNetCore.DataProtection (>= 1.1.0-preview2-22683) -> Microsoft.AspNetCore.Hosting.Abstractions (>= 1.1.0) 
warn :  aspnet-core-signalr-angular (>= 1.0.0) -> Microsoft.AspNetCore.SignalR.Server (>= 0.2.0) -> Microsoft.AspNetCore.Hosting.Abstractions (>= 1.1.0-preview2-22683)
warn : Detected package downgrade: Microsoft.AspNetCore.Hosting.Abstractions from 1.1.0 to 1.1.0-preview2-22683 
warn :  aspnet-core-signalr-angular (>= 1.0.0) -> Microsoft.AspNetCore.SignalR.Server (>= 0.2.0) -> Microsoft.AspNetCore.DataProtection (>= 1.1.0-preview2-22683) -> Microsoft.AspNetCore.Hosting.Abstractions (>= 1.1.0) 
warn :  aspnet-core-signalr-angular (>= 1.0.0) -> Microsoft.AspNetCore.SignalR.Server (>= 0.2.0) -> Microsoft.AspNetCore.Hosting.Abstractions (>= 1.1.0-preview2-22683)
warn : Detected package downgrade: Microsoft.AspNetCore.Hosting.Abstractions from 1.1.0 to 1.1.0-preview2-22683 
warn :  aspnet-core-signalr-angular (>= 1.0.0) -> Microsoft.AspNetCore.SignalR.Server (>= 0.2.0) -> Microsoft.AspNetCore.DataProtection (>= 1.1.0-preview2-22683) -> Microsoft.AspNetCore.Hosting.Abstractions (>= 1.1.0) 
warn :  aspnet-core-signalr-angular (>= 1.0.0) -> Microsoft.AspNetCore.SignalR.Server (>= 0.2.0) -> Microsoft.AspNetCore.Hosting.Abstractions (>= 1.1.0-preview2-22683)
warn : Detected package downgrade: Microsoft.AspNetCore.Hosting.Abstractions from 1.1.0 to 1.1.0-preview2-22683 
warn :  aspnet-core-signalr-angular (>= 1.0.0) -> Microsoft.AspNetCore.SignalR.Server (>= 0.2.0) -> Microsoft.AspNetCore.DataProtection (>= 1.1.0-preview2-22683) -> Microsoft.AspNetCore.Hosting.Abstractions (>= 1.1.0) 
warn :  aspnet-core-signalr-angular (>= 1.0.0) -> Microsoft.AspNetCore.SignalR.Server (>= 0.2.0) -> Microsoft.AspNetCore.Hosting.Abstractions (>= 1.1.0-preview2-22683)
warn : Detected package downgrade: Microsoft.AspNetCore.Hosting.Abstractions from 1.1.0 to 1.1.0-preview2-22683 
warn :  aspnet-core-signalr-angular (>= 1.0.0) -> Microsoft.AspNetCore.SignalR.Server (>= 0.2.0) -> Microsoft.AspNetCore.DataProtection (>= 1.1.0-preview2-22683) -> Microsoft.AspNetCore.Hosting.Abstractions (>= 1.1.0) 
warn :  aspnet-core-signalr-angular (>= 1.0.0) -> Microsoft.AspNetCore.SignalR.Server (>= 0.2.0) -> Microsoft.AspNetCore.Hosting.Abstractions (>= 1.1.0-preview2-22683)
log  : Writing lock file to disk. Path: /Users/matthamil/workspace/backend/aspnet-core-signalr-angular/project.lock.json
log  : /Users/matthamil/workspace/backend/aspnet-core-signalr-angular/project.json
log  : Restore completed in 11291ms.

I'm sure all I have to do to fix this is to manually update my project.json, but I think the project should be updated with the latest version of .NET Core and the dependencies.

I also get the following error on dotnet run

Can not find runtime target for framework '.NETCoreApp,Version=v1.1' compatible with one of the target runtimes: 'osx.10.11-x64'. Possible causes:
1. The project has not been restored or restore failed - run `dotnet restore`
2. The project does not list one of 'osx.10.11-x64' in the 'runtimes' section.
3. You may be trying to publish a library, which is not supported. Use `dotnet pack` to distribute libraries.
matthamil commented 7 years ago

Commenting to say that I resolved this issue by removing the runtimes section of my project.json completely. Perhaps this should be noted in the README as a fix to this issue for OSX users.