Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
5c8503a
Improve handling of RuntimeIdentifier and SelfContained across projec…
dsplaisted Oct 12, 2021
5f4ba10
Add test for SelfContained flowing across project reference
dsplaisted Oct 12, 2021
63ae00b
Move AcceptsRuntimeIdentifier logic and exclude test projects
dsplaisted Oct 12, 2021
bf9b7a3
Add breaking change information
dsplaisted Oct 12, 2021
45f8979
Detect whether SelfContained is a global property inside task
dsplaisted Oct 18, 2021
117a1c9
Handle consuming AcceptsRuntimeIdentifier metadata from multi-targete…
dsplaisted Dec 3, 2021
26df179
Use IsRidAgnostic instead of AcceptsRuntimeIdentifier
dsplaisted Aug 12, 2022
287c73a
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Aug 16, 2022
2909704
Update dependencies from https://github.com/dotnet/fsharp build 20220…
dotnet-maestro[bot] Aug 16, 2022
8c5b93a
Update dependencies from https://github.com/dotnet/linker build 20220…
dotnet-maestro[bot] Aug 17, 2022
ead72e2
[main] Update dependencies from dotnet/linker (#27186)
dotnet-maestro[bot] Aug 16, 2022
6077c5f
Update dependencies from https://github.com/dotnet/fsharp build 20220…
dotnet-maestro[bot] Aug 17, 2022
88b868c
Merge pull request #27219 from dotnet/darc-release/7.0.1xx-rc1-b727ff…
v-wuzhai Aug 17, 2022
b2ae7fb
Merge branch 'release/7.0.1xx-rc1' of https://github.com/dotnet/sdk i…
Aug 17, 2022
046da82
Update dependencies from https://github.com/dotnet/msbuild build 2022…
dotnet-maestro[bot] Aug 17, 2022
4b855aa
Merge pull request #27216 from dotnet/darc-release/7.0.1xx-rc1-896284…
v-wuzhai Aug 17, 2022
8436ee9
Update dependencies from https://github.com/nuget/nuget.client build …
dotnet-maestro[bot] Aug 17, 2022
96742a4
Merge pull request #27234 from dotnet/darc-release/7.0.1xx-rc1-56a750…
marcpopMSFT Aug 17, 2022
2ea6b71
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Aug 17, 2022
579ad7f
Handle more cases of global property flow
dsplaisted Aug 18, 2022
4468b0b
Add tests for global property flow across project references
dsplaisted Aug 18, 2022
33b98c8
Update dependencies from https://github.com/dotnet/templating build 2…
dotnet-maestro[bot] Aug 18, 2022
c99b553
Update dependencies from https://github.com/dotnet/roslyn build 20220…
dotnet-maestro[bot] Aug 18, 2022
6d33fa9
Update dependencies from https://github.com/dotnet/roslyn build 20220…
dotnet-maestro[bot] Aug 18, 2022
170ae6d
Update dependencies from https://github.com/dotnet/roslyn build 20220…
dotnet-maestro[bot] Aug 19, 2022
d7a5fde
Update dependencies from https://github.com/dotnet/roslyn build 20220…
dotnet-maestro[bot] Aug 19, 2022
ec90a39
Merge pull request #27263 from dotnet/darc-release/7.0.1xx-rc1-ff4af0…
v-wuzhai Aug 19, 2022
bdefb9a
Update dependencies from https://github.com/dotnet/roslyn build 20220…
dotnet-maestro[bot] Aug 19, 2022
20f30e0
[release/7.0.1xx-rc1] Update dependencies from dotnet/runtime (#27259)
dotnet-maestro[bot] Aug 19, 2022
ceffc5c
Update dependencies from https://github.com/dotnet/roslyn build 20220…
dotnet-maestro[bot] Aug 19, 2022
abb0064
Merge pull request #27267 from dotnet/darc-release/7.0.1xx-rc1-50c096…
v-wuzhai Aug 19, 2022
c147ccb
Update dependencies from https://github.com/dotnet/roslyn build 20220…
dotnet-maestro[bot] Aug 19, 2022
ff12abb
Update dependencies from https://github.com/dotnet/templating build 2…
dotnet-maestro[bot] Aug 19, 2022
b069d17
Update dependencies from https://github.com/dotnet/fsharp build 20220…
dotnet-maestro[bot] Aug 19, 2022
fe7dab7
Update dependencies from https://github.com/nuget/nuget.client build …
dotnet-maestro[bot] Aug 19, 2022
adf1ab4
Update dependencies from https://github.com/dotnet/windowsdesktop bui…
dotnet-maestro[bot] Aug 19, 2022
f23142b
Merge pull request #27277 from dotnet/darc-release/7.0.1xx-rc1-5bbc01…
marcpopMSFT Aug 19, 2022
b73a54a
Merge pull request #27283 from dotnet/darc-release/7.0.1xx-rc1-5f95c9…
marcpopMSFT Aug 19, 2022
59d18db
Update dependencies from https://github.com/nuget/nuget.client build …
dotnet-maestro[bot] Aug 19, 2022
8a303dd
Code review feedback
dsplaisted Aug 19, 2022
4b7b42c
Merge pull request #27292 from dotnet/darc-release/7.0.1xx-rc1-149e01…
marcpopMSFT Aug 19, 2022
55f8be2
Merge pull request #27288 from dotnet/darc-release/7.0.1xx-rc1-f7d7a8…
marcpopMSFT Aug 19, 2022
cef9d95
Merge pull request #27281 from dotnet/darc-release/7.0.1xx-rc1-2f01c2…
marcpopMSFT Aug 19, 2022
55d8a5a
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Aug 19, 2022
39e6b75
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Aug 20, 2022
d2831bf
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Aug 20, 2022
f4fb829
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Aug 20, 2022
507ce29
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Aug 21, 2022
6970a1f
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Aug 21, 2022
8e9bdc7
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Aug 21, 2022
f25c1a4
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Aug 21, 2022
2b859c9
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Aug 22, 2022
27fe291
Require updated MSBuild for global property flow tests
dsplaisted Aug 22, 2022
4d634e9
Fix tests
dsplaisted Aug 22, 2022
5d20158
Merge pull request #21986 from dsplaisted/selfcontained-flow
dsplaisted Aug 22, 2022
2015c96
Remove js-module-crypto handling in the SDK
eerhardt Aug 19, 2022
f4c17b4
Merge pull request #27307 from dotnet/darc-release/7.0.1xx-rc1-466f93…
dsplaisted Aug 22, 2022
cd71b47
merge f4c17b43e84f6bbdfbed0b3d75ac618faab90c9f
danmoseley Aug 22, 2022
209a5d1
merge
danmoseley Aug 22, 2022
ed423db
Fix FluentAssertions version
danmoseley Aug 22, 2022
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
Next Next commit
Improve handling of RuntimeIdentifier and SelfContained across projec…
…t references
  • Loading branch information
dsplaisted committed Jul 22, 2022
commit 5c8503a7f84ac12f4390a8318812c683ca474c14
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public class ValidateExecutableReferences : TaskBase
{
public bool SelfContained { get; set; }

public bool SelfContainedIsGlobalProperty { get; set; }

public bool IsExecutable { get; set; }

public ITaskItem[] ReferencedProjects { get; set; } = Array.Empty<ITaskItem>();
Expand Down Expand Up @@ -53,6 +55,14 @@ protected override void ExecuteCore()
bool referencedProjectIsExecutable = MSBuildUtilities.ConvertStringToBool(projectAdditionalProperties["_IsExecutable"]);
bool referencedProjectIsSelfContained = MSBuildUtilities.ConvertStringToBool(projectAdditionalProperties["SelfContained"]);

if (SelfContainedIsGlobalProperty && project.GetBooleanMetadata("AcceptsRuntimeIdentifier") == true)
{
// If AcceptsRuntimeIdentifier is true for the project, and SelfContained was set as a global property,
// then the SelfContained value will flow across the project reference when we go to build it, despite the
// fact that we ignored it when doing the GetTargetFrameworks negotiation.
referencedProjectIsSelfContained = SelfContained;
}

if (referencedProjectIsExecutable && shouldBeValidatedAsExecutableReference)
{
if (SelfContained && !referencedProjectIsSelfContained)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ Copyright (c) .NET Foundation. All rights reserved.

<PropertyGroup>
<_IsExecutable Condition="'$(OutputType)' == 'Exe' or '$(OutputType)'=='WinExe'">true</_IsExecutable>

</PropertyGroup>

<!-- Set the AcceptsRuntimeIdentifier property if this project should accept global RuntimeIdentifier and SelfContained
property values from referencing projects. -->
<PropertyGroup Condition="'$(AcceptsRuntimeIdentifier)' == ''">
<AcceptsRuntimeIdentifier Condition="'$(_IsExecutable)' == 'true' Or
'$(RuntimeIdentifier)' != '' Or
'$(RuntimeIdentifiers)' != ''">true</AcceptsRuntimeIdentifier>
</PropertyGroup>

<PropertyGroup Condition="'$(HasRuntimeOutput)' == ''">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1096,12 +1096,25 @@ Copyright (c) .NET Foundation. All rights reserved.
<_UseAttributeForTargetFrameworkInfoPropertyNames Condition="$([MSBuild]::VersionGreaterThanOrEquals($(MSBuildVersion), '17.0'))">true</_UseAttributeForTargetFrameworkInfoPropertyNames>
</PropertyGroup>

<PropertyGroup>
<!-- Check if SelfContained is specified as a global property, by trying to change its value and seeing if that's successful.
We need to know if it's a global property because if it is, then it will flow to referenced projects that had
AcceptsRuntimeIdentifier set to true, possibly overriding the value for SelfContained that we got back from
the GetTargetFrameworks negotiation. -->
<_SelfContainedBackupValue>$(SelfContained)</_SelfContainedBackupValue>
<SelfContained>NotAValue</SelfContained>
<_SelfContainedIsGlobalProperty Condition="'$(SelfContained)' == '$(_SelfContainedBackupValue)'">true</_SelfContainedIsGlobalProperty>
<SelfContained>$(_SelfContainedBackupValue)</SelfContained>
<_SelfContainedBackupValue></_SelfContainedBackupValue>
</PropertyGroup>

<Target Name="ValidateExecutableReferences"
AfterTargets="_GetProjectReferenceTargetFrameworkProperties"
Condition="'$(ValidateExecutableReferencesMatchSelfContained)' != 'false'">

<ValidateExecutableReferences
SelfContained="$(SelfContained)"
SelfContainedIsGlobalProperty="$(_SelfContainedIsGlobalProperty)"
IsExecutable="$(_IsExecutable)"
ReferencedProjects="@(_MSBuildProjectReferenceExistent)"
UseAttributeForTargetFrameworkInfoPropertyNames="$(_UseAttributeForTargetFrameworkInfoPropertyNames)"
Expand Down