Aspnetcore: With .NET Core 2.1 SDK RTM, Default project template fails with HTTP Error 502.5 - Process Failure

Created on 2 Jun 2018  路  6Comments  路  Source: dotnet/aspnetcore

The template for the Server project currently references the 2.1.0-preview2-final of Microsoft.AspNetCore.App, which does not restore since the RTM.

As a workaround until the project template is updated, edit the .csproj file, remove the -preview2-final suffix so that this line:

 <PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0-preview2-final" />

reads

 <PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" />

and then rebuild the solution.

area-blazor

Most helpful comment

I was getting the same error with blazor 0.5.1 It worked for me by changing the sdk version in global.json to my installed one.
image

All 6 comments

The issue will disappear when we release Blazor 0.4.0 this week, which defaults to ASP.NET Core 2.1 final in its project templates.

In the meantime, to use Blazor 0.3.0 you must continue to use .NET Core 2.1.300-preview2-008533 (download link), which can be installed side-by-side with the 2.1.0 RTM final build if you want.

Don't change the dependency in your .csproj to 2.1.0 final, because that's not supported with 0.3.0. You'll need to wait for 0.4.0 for that. Hopefully it will only be another day or two!

Strange.. I've un-installed preview2 in favor of the RTM and edited my global.json accordingly. Running blazor 0.3 and everything seems to run fine.

I was getting the same error with blazor 0.5.1 It worked for me by changing the sdk version in global.json to my installed one.
image

Thanks cubbK, that did it!

Thanks CubbK!

I just successfully built from the Visual Studio Blazor template, running :
Microsoft Visual Studio Community 2017 Preview
Version 15.9.0 Preview 2.0
VisualStudio.15.Preview/15.9.0-pre.2.0+28107.0
Altered my global.json to use 2.1.401 and rebuilt and ran, but I still get the same error:
HTTP Error 502.5 - Process Failure
Finally, I noticed that when I did the build the first or second line in the output said:
"C:\Program Files\dotnet\sdk\2.1.500-preview-009297\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(143,5): message NETSDK1057: You are working with a preview version of the .NET Core SDK. You can define the SDK version via a global.json file in the current project."
I altered my global.json to look like the following and it worked:

{
  "sdk": {
    "version": "2.1.500"
  }
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

rynowak picture rynowak  路  3Comments

aurokk picture aurokk  路  3Comments

FourLeafClover picture FourLeafClover  路  3Comments

markrendle picture markrendle  路  3Comments

groogiam picture groogiam  路  3Comments