Skip to content

Fix build of PNSE assemblies with --no-dependencies #6801

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

Merged
merged 1 commit into from
Jan 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
<Targets>GetCompileItems</Targets>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<OutputItemType>ReferenceSources</OutputItemType>
<BuildReference Condition="'$(BuildingInsideVisualStudio)' == 'true'">false</BuildReference>
<!-- MSBuild ignores the Target name in these cases and invokes GetTargetPath, avoid that by disabling build -->
<BuildReference Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true'">false</BuildReference>
</ProjectReference>
</ItemGroup>

Expand All @@ -41,7 +42,7 @@
Projects="@(ProjectReference)"
Targets="GetCompileItems"
Properties="%(ProjectReference.SetTargetFramework)"
Condition="'%(ProjectReference.Identity)' == '$(ContractProject)' and '$(BuildingInsideVisualStudio)' == 'true'">
Condition="'%(ProjectReference.Targets)' == 'GetCompileItems' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true')">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditioning off the Targets value avoids duplicates when the project is referenced for ResolveMatchingContract.

<Output TaskParameter="TargetOutputs" ItemName="ReferenceSources" />
</MSBuild>

Expand Down