I am trying to get a basic .NET Core app up and running. I created an empty Core Web application in Visual Studio 2015. I did not make any changes before trying to build and run. I am getting an error on the package restore. I have one project in the solution. How should I fix this?
error: Version conflict detected for System.Net.Http.
error: Test (>= 1.0.0) -> Microsoft.NETCore.App (>= 1.0.0) -> System.Net.Requests (>= 4.0.11) -> System.Net.Http (>= 4.1.0)
error: Test (>= 1.0.0) -> Microsoft.NETCore.App (>= 1.0.0) -> NETStandard.Library (>= 1.6.0) -> System.Net.Http (>= 4.1.0).
error: Project System.Net.Http is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Project System.Net.Http supports: net451 (.NETFramework,Version=v4.5.1)
error: One or more projects are incompatible with .NETCoreApp,Version=v1.0.
project.json file:
{
"dependencies": {
"Microsoft.NETCore.App": "1.1.0",
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Microsoft.Extensions.Logging.Console": "1.0.0"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"publishOptions": {
"include": [
"wwwroot",
"web.config"
]
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}
project.json
- AndriusMicrosoft.NETCore.App
dependency (3 line in project.json) like that:"Microsoft.NETCore.App": { "version": "1.1.0", "type": "platform" }
- Andrius