sdk: "dotnet build" failed with error NETSDK1073 for the .NET core 3.0 app with reference to a .NET Standard 2.1 class lib
Steps to reproduce
- Install .NET core sdk 3.0.100-preview6-012012
- Create a .NET core 3.0 app with reference to a .NET Standard 2.1 class lib with below CLI dotnet new console -o consoleapp30 dotnet new classlib -n CSNS21Lib -f netstandard2.1 dotnet add reference …\CSNS21Lib\CSNS21Lib.csproj
- run “dotnet build” to observe the result
##Note
- This issue also repro with VS
- This issue is not repro on the .NET core 3.0 app with reference to a .NET Standard 2.0 class lib
Expected behavior
The project can be built successfully
Actual behavior
Build with error NETSDK1073: The FrameworkReference ‘NETStandard.Library’ was not recognized

Environment data
dotnet --info output:
.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview6-012012
Commit: 94b54a5ef6
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100-preview6-012012\
Host (useful for support): Version: 3.0.0-preview6-27718-08 Commit: 7c7a2e9074
.NET Core SDKs installed: 2.1.800-preview-009677 [C:\Program Files\dotnet\sdk] 2.2.400-preview-010195 [C:\Program Files\dotnet\sdk] 3.0.100-preview6-012012 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.0.0-preview6-19265-03 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.0.0-preview6-27718-08 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.0.0-preview6-27718-08 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 34 (17 by maintainers)
Commits related to this issue
- Work around https://github.com/dotnet/cli/issues/11378 — committed to dotnet/aspnetcore by dougbu 5 years ago
- Move to 3.0 Preview 6 SDK (#11472) * Work around https://github.com/dotnet/cli/issues/11378 * Fix site extensions - thanks @JunTaoLuo❕ — committed to dotnet/aspnetcore by dougbu 5 years ago
- Try older https://github.com/dotnet/cli/issues/11378 workaround - new errors look similar even though TFMs are reversed — committed to dotnet/extensions by dougbu 5 years ago
- Try older https://github.com/dotnet/cli/issues/11378 workaround - new errors look similar even though TFMs are reversed — committed to dotnet/extensions by dougbu 5 years ago
- !fixup! Different problem, different workaround - undo dotnet/cli#11378 - add workaround for new issue (@dplaisted is working on this) - also remove dotnet/core-sdk#2401 workaround now that we're on r... — committed to dotnet/extensions by dougbu 5 years ago
- [master] Update dependencies from dotnet/core-setup dotnet/roslyn dotnet/arcade (#2082) * Update dependencies from https://github.com/dotnet/core-setup build 20190724.06 - Microsoft.NETCore.App.Ref ... — committed to dotnet/extensions by dotnet-maestro[bot] 5 years ago
As a workaround, you can put the following in your .NET Core project which references .NET Standard 2.1:
You have to use the latest Visual Studio preview.
@dsplaisted you say it should be fix now? I still can’t build my solution using Visual Studio Build task in TFS. The VS version installed on the build machine is : 16.3.29324.140 I have the following error : ##[error]C:\Program Files\dotnet\sdk\3.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(263,5): Error NETSDK1073: The FrameworkReference ‘NETStandard.Library’ was not recognized
The CSproj of this project contains : “PropertyGroup <TargetFramework>netstandard2.1</TargetFramework> /PropertyGroup”
The main project.csproj contains : “PropertyGroup <TargetFramework>netcoreapp3.0</TargetFramework> <OutputPath>…..\bin$(Configuration)</OutputPath> /PropertyGroup”
I’m still seeing this issue when building with Azure DevOps using the MSBuild Task, even on the 3.0.100 release of .net core sdk.
Adding this also solves this error in projects that fail to build:
@livarcocc - Specifically which versions? I still get this error with the following versions:
NetCoreApp3.0: preview6-27804-01 Visual Studio: 16.1.3
This is working using the latest VS build and the latest preview6 CLI.