Wrong target framework selected for project reference
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
### Steps to reproduce
All using the new SDK format project:
Create a root folder, and a `lib` folder inside it.
Create an entry project (net471) in the root folder.
Inside lib folder, use a `Directory.Build.props` to config project inside it to **single** framework `netstandard2.0`.
Create a library project in lib folder, and contain explicit `net461;netcoreapp2.0` to override it to **multiple** frameworks.
Reference the library from the entry.
Create a solution containing them, and build in Visual Studio.
### Expected behavior
The library will be built and referenced for target framework `net461`.
### Actual behavior
The library is built for `net461` and `netcoreapp2.0`.
The entry is requiring `netstandard2.0` one, and cannot find the dll.
If the library project overrides target framework to single, the project reference can pick the right changed framework.
### Environment data
`msbuild /version` output:
15.7.179.6572
OS info:
Windows 10 Pro 17134
If applicable, version of the tool that invokes MSBuild (Visual Studio, dotnet CLI, etc):
Visual Studio 15.7.2
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.