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

Make it easier to express dependencies among projects without referencing output assembly #2574

Closed
tmat opened this issue Oct 8, 2018 · 3 comments
Milestone

Comments

@tmat
Copy link
Member

tmat commented Oct 8, 2018

It is sometimes necessary to build project A before project B without project B referencing the assembly that A generates. In such cases one can use ProjectReference with ReferenceOutputAssembly="false".

This however is not sufficient in all scenarios, especially when these projects target different, incompatible frameworks and/or multi-target.

Turns out 3 properties need to be set to make this work:

<ProjectReference Include="B.csproj" 
       ReferenceOutputAssembly="false"
       SkipGetTargetFrameworkProperties="true"
       GlobalPropertiesToRemove="TargetFramework" />

This is much more complex than it should be.

Proposal: introduce a new item that can be use to express that this project depends on building another project, but has no implication on references. Such item could be called e.g. ProjectBuildOrderDependency, DependsOnProject, etc.

<DependsOnProject Include="B.csproj" />
@nguerrera
Copy link
Contributor

cc @rainersigwald

@livarcocc livarcocc added this to the Unknown milestone Oct 9, 2018
@rainersigwald
Copy link
Member

Any change here would need to live on the MSBuild side of the fence, because you can have dependencies to SDK projects from non-SDK projects.

@rainersigwald
Copy link
Member

This issue was moved to dotnet/msbuild#3843

wli3 pushed a commit that referenced this issue Feb 7, 2020
….1 (#2574)

- Microsoft.NET.Sdk - 3.0.100-rc1.19453.1
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

4 participants