msbuild
msbuild copied to clipboard
'dotnet build' assumes "Build Dependencies -> Project Dependencies" are project references
From @evildour on July 5, 2017 15:54
Steps to reproduce
Create new .NET Core class library (and solution) in VS 2017 Right click solution and add new .NET Core class library Edit csproj file for the 2nd class library Change its TargetFramework from netcoreapp1.1 to net45 Right click on the first class library's project and click "Build dependencies -> Project dependencies..." Check the box to make it depend on the other class library Rebuild in VS (everything works fine) Open a command line and go to the sln file's directory Run 'dotnet build'
Expected behavior
The build succeeds as it did in VS.
Actual behavior
The following error occurs: Project '...' targets '.NETFramework,Version=v4.5'. It cannot be referenced by a project that targets '.NETCoreApp,Version=v1.1'.
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.4)
Product Information: Version: 1.0.4 Commit SHA-1 hash: af1e6684fd
Runtime Environment: OS Name: Windows OS Version: 10.0.10586 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\1.0.4
Copied from original issue: dotnet/cli#7075