Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting 'Project Dependencies' in sln cause inconsistent behavior between VS & dotnet build #2844

Closed
ReubenBond opened this issue Sep 21, 2017 · 3 comments

Comments

@ReubenBond
Copy link
Member

ReubenBond commented Sep 21, 2017

Building our solution involves first building a tool which is used later in the build process.

In order to ensure the tooling is built first, I attempted to configure Project Dependencies in VS to create a dependency between a netstandard2.0 library and a net461 app (tool).

This works in VS and everything builds correctly, but it fails when building the solution using dotnet build with the error:
C:\Program Files\dotnet\sdk\2.0.0\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.Common.targets(87,5): error : Project 'C:\tmp\BuildOrderRepro\NetCoreApp\NetCoreApp.csproj' targets '.NETCoreApp,Version=v2.0'. It cannot be referenced by a project that targets '.NETStandard,Version=v2.0'. [C:\tmp\BuildOrderRepro\NetCoreApp\NetCoreApp.csproj]

Repro project:
BuildOrderRepro.zip

@davkean
Copy link
Member

davkean commented Sep 21, 2017

Thanks - known and a dup of dotnet/msbuild#2274.

@davkean davkean closed this as completed Sep 21, 2017
@ReubenBond
Copy link
Member Author

Thanks - sorry, I failed to find the original issue.

@davkean
Copy link
Member

davkean commented Sep 21, 2017

No probs, I don't mind duping them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants