Closed
Description
Our initial philosophy with the .NET Core SDK was that “the latest SDK is always good enough to build your projects.” That isn’t the case for “webapp” projects.
thundera:webapp21 rich$ cat webapp.csproj
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All" />
</ItemGroup>
</Project>
thundera:webapp21 rich$ dotnet --list-sdks
3.0.100-preview7-012821 [/usr/local/share/dotnet/sdk]
thundera:webapp21 rich$
thundera:webapp21 rich$ dotnet build
Microsoft (R) Build Engine version 16.3.0-preview-19329-01+d31fdbf01 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 7.51 sec for /Users/rich/webapp21/webapp.csproj.
You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview
It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '2.0.7' was not found.
- The following frameworks were found:
3.0.0-preview7-27912-14 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The .NET Core frameworks can be found at:
- https://aka.ms/dotnet-download
/Users/rich/.nuget/packages/microsoft.aspnetcore.razor.design/2.1.2/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets(69,5): error : rzc discover exited with code 150. [/Users/rich/webapp21/webapp.csproj]
Build FAILED.
/Users/rich/.nuget/packages/microsoft.aspnetcore.razor.design/2.1.2/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets(69,5): error : rzc discover exited with code 150. [/Users/rich/webapp21/webapp.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:29.26
Originally reported @ https://github.com/dotnet/cli/issues/12009