HttpRequest-Getting Build Errors on Windows 10/Visual Studio 15 - community Edition.
Getting Errors on Windows 10/Visual Studio 15 - community Edition.
Severity Code Description Project File Line Source Suppression State
Error CS0012 The type 'HttpRequest' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.AspNet.Http.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. WebController.DNX 4.5.1 D:\ESP8266\NRF2401\MyNodes.NET-2.0.1\MyNodes.NET-2.0.1\WebController\Code\SignalR\SoftNodesHub.cs 46 IntelliSense Active
Also these errors:
Severity Code Description Project File Line Source Suppression State
Error CS1061 'IServiceCollection' does not contain a definition for 'AddSignalR' and no extension method 'AddSignalR' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?) WebController.DNX 4.5.1 D:\ESP8266\NRF2401\MyNodes.NET-2.0.1\MyNodes.NET-2.0.1\WebController\Startup.cs 69 IntelliSense Active
and
Severity Code Description Project File Line Source Suppression State
Error CS0012 The type 'IApplicationBuilder' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.AspNet.Http.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. WebController.DNX 4.5.1 D:\ESP8266\NRF2401\MyNodes.NET-2.0.1\MyNodes.NET-2.0.1\WebController\Startup.cs 148 IntelliSense Active
What could be the issue.
@bkrajendra I hit a bunch of reference issues too. I believe it's because DNX has been deprecated and packages were removed. I created a PR (https://github.com/derwish-pro/MyNodes.NET/pull/18) to migrate the project to ASP.NET Core, which works well on my Windows 10/VS2017.
I made the merge. Bkrajendra, please check if it works now. Gildorwang, thank you.
Hey thanks @derwish-pro and @gildorwang , I tried opening the project in my Visual Studio 15 - community Edition, but i'm getting error while loading project.
D:\ESP8266\NRF2401\MyNodes.NET\WebController\WebController.csproj : error : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. D:\ESP8266\NRF2401\MyNodes.NET\WebController\WebController.csproj
I also tried adding xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to project file. But then its throwing error.
D:\ESP8266\NRF2401\MyNodes.NET\WebController\WebController.csproj : error : The attribute "Version" in element <PackageReference> is unrecognized. D:\ESP8266\NRF2401\MyNodes.NET\WebController\WebController.csproj
Hi @bkrajendra, I upgraded the projects with Visual Studio 2017. Maybe that made it incompatible with VS 15. Can you try with VS 2017 and see if it works?