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

[Breaking] RuntimeIdentifier No Longer Implies SelfContained Apps by Default #30038

Merged
merged 67 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
8bce0b6
Make the breaking change of RID -> No Longer -> SC
nagilson Jan 20, 2023
ee5d568
Update XLF and remove breaking change error.
nagilson Jan 20, 2023
38491c6
Improve the error message quality.
nagilson Jan 20, 2023
61c2c32
Fix a test which did not properly check if app was SelfContained or not
nagilson Jan 20, 2023
298649f
Update global property flow test to not expect rid to infer sc
nagilson Jan 23, 2023
08ae557
Update blazor wasm tests to add SC with the new RID change
nagilson Jan 24, 2023
3fd0e6d
Fix test with missing framework for RID breaking change
nagilson Jan 25, 2023
2228361
Update Framework References tests to add SelfContained per breaking c…
nagilson Jan 25, 2023
2202db1
Update WPF tests that expected RID to give SC
nagilson Jan 25, 2023
2eb3e94
Update framework reference invalid rid and trimmable tests to no long…
nagilson Jan 25, 2023
3e4f40d
Repair some publish profile tests to add SelfContained and update ano…
nagilson Jan 25, 2023
a8ef8c3
Update dotnet build tests to add SelfContained explicitly when needed…
nagilson Jan 25, 2023
0042e6e
Update publish profile tests to add SC explicitly per .net 8 breaking…
nagilson Jan 25, 2023
07848f6
Fix EXE global property flow tests to add SelfContained now when a RI…
nagilson Jan 25, 2023
552b1b3
Blazor: Add SelfContained in SDK tasks project instead of the test pr…
nagilson Jan 25, 2023
836ca0d
Revert "Blazor: Add SelfContained in SDK tasks project instead of the…
nagilson Jan 25, 2023
c0ce586
Update warning and remove old warning
nagilson Jan 26, 2023
0e27149
Update newly added breaking change test to also assert SelfContained …
nagilson Jan 26, 2023
d4ed80c
Don't add `SelfContained` twice in the IL Link test, as this was a mi…
nagilson Jan 26, 2023
3026631
Don't add `SelfContained` twice in the test, as this was a mistake
nagilson Jan 26, 2023
fb31004
Don't add `SelfContained` twice in the test, as this was a mistake
nagilson Jan 26, 2023
ada4f72
Improve test code quality by adding SelfContained in less places wher…
nagilson Jan 27, 2023
3c6c89f
Add SelfContained where needed still in IL Link
nagilson Jan 27, 2023
561553c
Fix remaining IL Link Tests with the new change to not add SelfContai…
nagilson Jan 27, 2023
19323d9
merge with main
nagilson Jan 27, 2023
9d71845
Imply SC for some publish properties as we decided to in the partner …
nagilson Apr 24, 2023
8e05d08
Merge by updating string resx
nagilson Apr 24, 2023
9423934
update global property flow test on merge to have the breaking change…
nagilson Apr 24, 2023
1dc3859
Remove the binlog added to a test
nagilson Apr 24, 2023
03a5105
update xlf and add test for publish property inference behavior
nagilson Apr 24, 2023
12d72f6
Merge branch 'nagilson-rid-no-more-sc-2.0' of https://github.com/nagi…
nagilson Apr 24, 2023
ef50ea6
fix bad msbuild syntax
nagilson Apr 25, 2023
7d7f707
fix path too long in test
nagilson Apr 25, 2023
1093e5c
make the tests pass by recollecting that sc still infers rid
nagilson Apr 25, 2023
704490e
fix global property flow tests to acc for new behaviour again
nagilson Apr 25, 2023
d20b510
Make the framework reference flow in a test by adding self contained …
nagilson Apr 25, 2023
e16385b
remove selfcontained added to test lib because it should get inferred
nagilson Apr 25, 2023
4a4f5b4
merge string resx with artifact path
nagilson Apr 25, 2023
28d4899
Merge branch 'nagilson-rid-no-more-sc-2.0' of https://github.com/nagi…
nagilson Apr 25, 2023
3ea20a3
add empty targetframeworkversion check
nagilson Apr 25, 2023
6bc5a45
update xlf
nagilson Apr 25, 2023
698325f
Revert "remove selfcontained added to test lib because it should get …
nagilson Apr 26, 2023
5d166a5
remove binlogs from tests
nagilson Apr 26, 2023
915089d
use the msbuild version comparison function instead of lt and rt in r…
nagilson Apr 26, 2023
000c4a6
fix container test which had different bl syntax
nagilson Apr 26, 2023
5d15152
add the empty tfm check back as the msbuild function will fail if giv…
nagilson Apr 26, 2023
72b31a4
Update container tests to push to correct net8 base images
baronfel Apr 26, 2023
0e735e5
Improve clarity of warning message for breaking change
nagilson Apr 26, 2023
26550ed
undo blazor wasm self contained test additions because they prepared …
nagilson Apr 27, 2023
586ddd5
Revert "undo blazor wasm self contained test additions because they p…
nagilson Apr 27, 2023
c0a6f47
respond to most pr feedback
nagilson Apr 27, 2023
f3e8af4
WIP: Modify validate exe reference test to account for tfm
nagilson Apr 27, 2023
f2c674a
wip fix exe reference framework error but tfm isnt available in the …
nagilson Apr 27, 2023
5f33273
Fix referenced exe error to be tfm gateD
nagilson Apr 28, 2023
de300bf
Add selfcontained to blazor wasm library project because it still see…
nagilson Apr 28, 2023
30e5d61
Add SelfContained to the TestProject Library and clean up the tests
nagilson Apr 29, 2023
fafde81
Add SelfContained back into the blazor tests because they havent full…
nagilson Apr 29, 2023
66806ca
fix remaining tests
nagilson May 1, 2023
485149e
update container tag to 8 becuase older tfms dont appear to work so I…
nagilson May 1, 2023
5909dd1
remove the binlog i forgot in the test
nagilson May 2, 2023
912ed9f
Change Test for ReferenceExe to not Specify SelfContained if RuntimeI…
nagilson May 3, 2023
51920b9
Account for targetframework aliases while parsing the target framewor…
nagilson May 4, 2023
aa38fe0
Refer to the new variable we created instead of the old one that shou…
nagilson May 8, 2023
3faa0f2
Use an integer to compare versions instead of comparing with a create…
nagilson May 8, 2023
0415c78
remove unneeeded boolean as we took a different approach to consider …
nagilson May 8, 2023
dcd802b
Merge remote-tracking branch 'upstream/main' into nagilson-rid-no-mor…
nagilson May 8, 2023
e92dee7
fix merge conflict that vscode did not save for some reason
nagilson May 8, 2023
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 @@ -8,6 +8,11 @@
<ProjectReference Include="..\blazorwasm\blazorwasm.csproj" />
</ItemGroup>

<!-- Based on .NET 8 breaking change: Add SelfContained if RuntimeIdentifier is defined to match old behavior.. -->
<PropertyGroup Condition="'$(RuntimeIdentifier)' != '' and '$(SelfContained)' == ''">
<SelfContained>true</SelfContained>
</PropertyGroup>
nagilson marked this conversation as resolved.
Show resolved Hide resolved

<!-- Enabling compression increases build time. We want to avoid this for tests so we
disable it here. This doesn't affect any test assertions. -->
<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@
<_BlazorBrotliCompressionLevel>NoCompression</_BlazorBrotliCompressionLevel>
</PropertyGroup>

<!-- Based on .NET 8 breaking change: Add SelfContained if RuntimeIdentifier is defined to match old behavior.. -->
<PropertyGroup Condition="'$(RuntimeIdentifier)' != '' and '$(SelfContained)' == ''">
<SelfContained>true</SelfContained>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<KnownFrameworkReference Remove="Microsoft.AspNetCore.App" />
</ItemGroup>

<!-- Based on .NET 8 breaking change: Add SelfContained if RuntimeIdentifier is defined to match old behavior.. -->
<PropertyGroup Condition="'$(RuntimeIdentifier)' != '' and '$(SelfContained)' == ''">
<SelfContained>true</SelfContained>
</PropertyGroup>

<!-- Enabling compression increases build time. We want to avoid this for tests so we
disable it here. This doesn't affect any test assertions. -->
<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
<PackageReference Include="System.Net.Http.Json" Version="5.0.0" />
</ItemGroup>

<!-- Based on .NET 8 breaking change: Add SelfContained if RuntimeIdentifier is defined to match old behavior.. -->
<PropertyGroup Condition="'$(RuntimeIdentifier)' != '' and '$(SelfContained)' == ''">
<SelfContained>true</SelfContained>
</PropertyGroup>

<!-- Enabling compression increases build time. We want to avoid this for tests so we
disable it here. This doesn't affect any test assertions. -->
<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@
<_BlazorBrotliCompressionLevel>NoCompression</_BlazorBrotliCompressionLevel>
</PropertyGroup>

<!-- Based on .NET 8 breaking change: Add SelfContained if RuntimeIdentifier is defined to match old behavior.. -->
<PropertyGroup Condition="'$(RuntimeIdentifier)' != '' and '$(SelfContained)' == ''">
<SelfContained>true</SelfContained>
</PropertyGroup>


</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<TargetFramework>$(CurrentTargetFramework)</TargetFramework>
<PublishTrimmed>true</PublishTrimmed>
<EnableTrimAnalyzer>false</EnableTrimAnalyzer>
<SelfContained>True</SelfContained>
nagilson marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>

<Target Name="BuildLocalNuget" BeforeTargets="Restore">
Expand Down
5 changes: 4 additions & 1 deletion src/Tasks/Common/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -904,5 +904,8 @@ You may need to build the project on another operating system or architecture, o
<value>NETSDK1200: If UseArtifactsPath is set to true and ArtifactsPath is not set, there must be a Directory.Build.props file in order to determine where the artifacts folder should be located.</value>
<comment>{StrBegin="NETSDK1200: "}</comment>
</data>

<data name="RuntimeIdentifierWillNoLongerImplySelfContained" xml:space="preserve">
<value>NETSDK1201: For projects with TargetFramework(s) >= 8.0, specifying a RuntimeIdentifier no longer produces a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use --self-contained argument.</value>
nagilson marked this conversation as resolved.
Show resolved Hide resolved
<comment>{StrBegin="NETSDK1201: "}</comment>
</data>
</root>
5 changes: 5 additions & 0 deletions src/Tasks/Common/Resources/xlf/Strings.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,11 @@ The following are names of parameters or literal values and should not be transl
<target state="translated">NETSDK1028: Zadejte parametr RuntimeIdentifier.</target>
<note>{StrBegin="NETSDK1028: "}</note>
</trans-unit>
<trans-unit id="RuntimeIdentifierWillNoLongerImplySelfContained">
<source>NETSDK1201: For projects with TargetFramework(s) &gt;= 8.0, specifying a RuntimeIdentifier no longer produces a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use --self-contained argument.</source>
<target state="new">NETSDK1201: For projects with TargetFramework(s) &gt;= 8.0, specifying a RuntimeIdentifier no longer produces a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use --self-contained argument.</target>
<note>{StrBegin="NETSDK1201: "}</note>
</trans-unit>
<trans-unit id="RuntimeListNotFound">
<source>NETSDK1109: Runtime list file '{0}' was not found. Report this error to the .NET team here: https://aka.ms/dotnet-sdk-issue.</source>
<target state="translated">NETSDK1109: Soubor seznamu modulu runtime {0} nebyl nalezen. Tady můžete tuto chybu nahlásit týmu .NET: https://aka.ms/dotnet-sdk-issue.</target>
Expand Down
5 changes: 5 additions & 0 deletions src/Tasks/Common/Resources/xlf/Strings.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,11 @@ The following are names of parameters or literal values and should not be transl
<target state="translated">NETSDK1028: Geben Sie einen RuntimeIdentifier an.</target>
<note>{StrBegin="NETSDK1028: "}</note>
</trans-unit>
<trans-unit id="RuntimeIdentifierWillNoLongerImplySelfContained">
<source>NETSDK1201: For projects with TargetFramework(s) &gt;= 8.0, specifying a RuntimeIdentifier no longer produces a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use --self-contained argument.</source>
<target state="new">NETSDK1201: For projects with TargetFramework(s) &gt;= 8.0, specifying a RuntimeIdentifier no longer produces a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use --self-contained argument.</target>
<note>{StrBegin="NETSDK1201: "}</note>
</trans-unit>
<trans-unit id="RuntimeListNotFound">
<source>NETSDK1109: Runtime list file '{0}' was not found. Report this error to the .NET team here: https://aka.ms/dotnet-sdk-issue.</source>
<target state="translated">NETSDK1109: Die Runtimelistendatei "{0}" wurde nicht gefunden. Melden Sie diesen Fehler hier dem .NET-Team: https://aka.ms/dotnet-sdk-issue.</target>
Expand Down
5 changes: 5 additions & 0 deletions src/Tasks/Common/Resources/xlf/Strings.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,11 @@ The following are names of parameters or literal values and should not be transl
<target state="translated">NETSDK1028: Especificar un valor para RuntimeIdentifier</target>
<note>{StrBegin="NETSDK1028: "}</note>
</trans-unit>
<trans-unit id="RuntimeIdentifierWillNoLongerImplySelfContained">
<source>NETSDK1201: For projects with TargetFramework(s) &gt;= 8.0, specifying a RuntimeIdentifier no longer produces a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use --self-contained argument.</source>
<target state="new">NETSDK1201: For projects with TargetFramework(s) &gt;= 8.0, specifying a RuntimeIdentifier no longer produces a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use --self-contained argument.</target>
<note>{StrBegin="NETSDK1201: "}</note>
</trans-unit>
<trans-unit id="RuntimeListNotFound">
<source>NETSDK1109: Runtime list file '{0}' was not found. Report this error to the .NET team here: https://aka.ms/dotnet-sdk-issue.</source>
<target state="translated">NETSDK1109: No se encontró el archivo de lista del entorno de ejecución "{0}". Notifique este error al equipo de .NET aquí: https://aka.ms/dotnet-sdk-issue.</target>
Expand Down
5 changes: 5 additions & 0 deletions src/Tasks/Common/Resources/xlf/Strings.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,11 @@ The following are names of parameters or literal values and should not be transl
<target state="translated">NETSDK1028: Spécifiez un RuntimeIdentifier</target>
<note>{StrBegin="NETSDK1028: "}</note>
</trans-unit>
<trans-unit id="RuntimeIdentifierWillNoLongerImplySelfContained">
<source>NETSDK1201: For projects with TargetFramework(s) &gt;= 8.0, specifying a RuntimeIdentifier no longer produces a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use --self-contained argument.</source>
<target state="new">NETSDK1201: For projects with TargetFramework(s) &gt;= 8.0, specifying a RuntimeIdentifier no longer produces a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use --self-contained argument.</target>
<note>{StrBegin="NETSDK1201: "}</note>
</trans-unit>
<trans-unit id="RuntimeListNotFound">
<source>NETSDK1109: Runtime list file '{0}' was not found. Report this error to the .NET team here: https://aka.ms/dotnet-sdk-issue.</source>
<target state="translated">NETSDK1109: Le fichier de liste de runtime '{0}' est introuvable. Signalez cette erreur à l'équipe .NET ici : https://aka.ms/dotnet-sdk-issue.</target>
Expand Down
5 changes: 5 additions & 0 deletions src/Tasks/Common/Resources/xlf/Strings.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,11 @@ The following are names of parameters or literal values and should not be transl
<target state="translated">NETSDK1028: specificare un elemento RuntimeIdentifier</target>
<note>{StrBegin="NETSDK1028: "}</note>
</trans-unit>
<trans-unit id="RuntimeIdentifierWillNoLongerImplySelfContained">
<source>NETSDK1201: For projects with TargetFramework(s) &gt;= 8.0, specifying a RuntimeIdentifier no longer produces a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use --self-contained argument.</source>
<target state="new">NETSDK1201: For projects with TargetFramework(s) &gt;= 8.0, specifying a RuntimeIdentifier no longer produces a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use --self-contained argument.</target>
<note>{StrBegin="NETSDK1201: "}</note>
</trans-unit>
<trans-unit id="RuntimeListNotFound">
<source>NETSDK1109: Runtime list file '{0}' was not found. Report this error to the .NET team here: https://aka.ms/dotnet-sdk-issue.</source>
<target state="translated">NETSDK1109: il file di elenco di runtime '{0}' non è stato trovato. Segnalare questo errore al team di .NET all'indirizzo: https://aka.ms/dotnet-sdk-issue.</target>
Expand Down
Loading