dotnet / dotnet/msbuild

'dotnet build' assumes "Build Dependencies -> Project Dependencies" are project references

Open
#2,274 11 comments 2 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

_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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.