Skip to content

Commit 2643cf4

Browse files
authored
[Breaking] RuntimeIdentifier No Longer Implies SelfContained Apps by Default (#30038)
2 parents 9b9d962 + e92dee7 commit 2643cf4

File tree

65 files changed

+838
-502
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+838
-502
lines changed

src/Assets/TestProjects/BlazorHosted/blazorhosted/blazorhosted.csproj

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
<ProjectReference Include="..\blazorwasm\blazorwasm.csproj" />
99
</ItemGroup>
1010

11+
<!-- Based on .NET 8 breaking change: Add SC like old behavior if RID is defined. -->
12+
<PropertyGroup Condition="'$(RuntimeIdentifier)' != '' and '$(SelfContained)' == ''">
13+
<SelfContained>true</SelfContained>
14+
</PropertyGroup>
15+
1116
<!-- Enabling compression increases build time. We want to avoid this for tests so we
1217
disable it here. This doesn't affect any test assertions. -->
1318
<PropertyGroup>

src/Assets/TestProjects/BlazorHosted/blazorwasm/blazorwasm.csproj

+5
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,9 @@
3737
<_BlazorBrotliCompressionLevel>NoCompression</_BlazorBrotliCompressionLevel>
3838
</PropertyGroup>
3939

40+
<!-- Based on .NET 8 breaking change: Add SC like old behavior if RID is defined. -->
41+
<PropertyGroup Condition="'$(RuntimeIdentifier)' != '' and '$(SelfContained)' == ''">
42+
<SelfContained>true</SelfContained>
43+
</PropertyGroup>
44+
4045
</Project>

src/Assets/TestProjects/BlazorHostedRID/blazorhosted/blazorhosted-rid.csproj

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
<KnownFrameworkReference Remove="Microsoft.AspNetCore.App" />
1515
</ItemGroup>
1616

17+
<!-- Based on .NET 8 breaking change: Add SC like old behavior if RID is defined. -->
18+
<PropertyGroup Condition="'$(RuntimeIdentifier)' != '' and '$(SelfContained)' == ''">
19+
<SelfContained>true</SelfContained>
20+
</PropertyGroup>
21+
1722
<!-- Enabling compression increases build time. We want to avoid this for tests so we
1823
disable it here. This doesn't affect any test assertions. -->
1924
<PropertyGroup>

src/Assets/TestProjects/BlazorWasmMinimal/blazorwasm-minimal.csproj

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
<PackageReference Include="System.Net.Http.Json" Version="5.0.0" />
1111
</ItemGroup>
1212

13+
<!-- Based on .NET 8 breaking change: Add SelfContained if RuntimeIdentifier is defined to match old behavior.. -->
14+
<PropertyGroup Condition="'$(RuntimeIdentifier)' != '' and '$(SelfContained)' == ''">
15+
<SelfContained>true</SelfContained>
16+
</PropertyGroup>
17+
1318
<!-- Enabling compression increases build time. We want to avoid this for tests so we
1419
disable it here. This doesn't affect any test assertions. -->
1520
<PropertyGroup>

src/Assets/TestProjects/BlazorWasmWithLibrary/blazorwasm/blazorwasm.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,8 @@
3636
<_BlazorBrotliCompressionLevel>NoCompression</_BlazorBrotliCompressionLevel>
3737
</PropertyGroup>
3838

39+
<!-- Based on .NET 8 breaking change: Add SC like old behavior if RID is defined. -->
40+
<PropertyGroup Condition="'$(RuntimeIdentifier)' != '' and '$(SelfContained)' == ''">
41+
<SelfContained>true</SelfContained>
42+
</PropertyGroup>
3943
</Project>

src/Assets/TestProjects/TrimmedAppWithReferences/App/App.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<TargetFramework>$(CurrentTargetFramework)</TargetFramework>
66
<PublishTrimmed>true</PublishTrimmed>
77
<EnableTrimAnalyzer>false</EnableTrimAnalyzer>
8+
<SelfContained>True</SelfContained>
89
</PropertyGroup>
910

1011
<Target Name="BuildLocalNuget" BeforeTargets="Restore">

src/Tasks/Common/Resources/Strings.resx

+4-1
Original file line numberDiff line numberDiff line change
@@ -904,5 +904,8 @@ You may need to build the project on another operating system or architecture, o
904904
<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>
905905
<comment>{StrBegin="NETSDK1200: "}</comment>
906906
</data>
907-
907+
<data name="RuntimeIdentifierWillNoLongerImplySelfContained" xml:space="preserve">
908+
<value>NETSDK1201: For projects targeting .NET 8.0 and higher, specifying a RuntimeIdentifier will no longer produce a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use the --self-contained argument.</value>
909+
<comment>{StrBegin="NETSDK1201: "}</comment>
910+
</data>
908911
</root>

src/Tasks/Common/Resources/xlf/Strings.cs.xlf

+5
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,11 @@ The following are names of parameters or literal values and should not be transl
795795
<target state="translated">NETSDK1028: Zadejte parametr RuntimeIdentifier.</target>
796796
<note>{StrBegin="NETSDK1028: "}</note>
797797
</trans-unit>
798+
<trans-unit id="RuntimeIdentifierWillNoLongerImplySelfContained">
799+
<source>NETSDK1201: For projects targeting .NET 8.0 and higher, specifying a RuntimeIdentifier will no longer produce a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use the --self-contained argument.</source>
800+
<target state="new">NETSDK1201: For projects targeting .NET 8.0 and higher, specifying a RuntimeIdentifier will no longer produce a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use the --self-contained argument.</target>
801+
<note>{StrBegin="NETSDK1201: "}</note>
802+
</trans-unit>
798803
<trans-unit id="RuntimeListNotFound">
799804
<source>NETSDK1109: Runtime list file '{0}' was not found. Report this error to the .NET team here: https://aka.ms/dotnet-sdk-issue.</source>
800805
<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>

src/Tasks/Common/Resources/xlf/Strings.de.xlf

+5
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,11 @@ The following are names of parameters or literal values and should not be transl
795795
<target state="translated">NETSDK1028: Geben Sie einen RuntimeIdentifier an.</target>
796796
<note>{StrBegin="NETSDK1028: "}</note>
797797
</trans-unit>
798+
<trans-unit id="RuntimeIdentifierWillNoLongerImplySelfContained">
799+
<source>NETSDK1201: For projects targeting .NET 8.0 and higher, specifying a RuntimeIdentifier will no longer produce a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use the --self-contained argument.</source>
800+
<target state="new">NETSDK1201: For projects targeting .NET 8.0 and higher, specifying a RuntimeIdentifier will no longer produce a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use the --self-contained argument.</target>
801+
<note>{StrBegin="NETSDK1201: "}</note>
802+
</trans-unit>
798803
<trans-unit id="RuntimeListNotFound">
799804
<source>NETSDK1109: Runtime list file '{0}' was not found. Report this error to the .NET team here: https://aka.ms/dotnet-sdk-issue.</source>
800805
<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>

src/Tasks/Common/Resources/xlf/Strings.es.xlf

+5
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,11 @@ The following are names of parameters or literal values and should not be transl
795795
<target state="translated">NETSDK1028: Especificar un valor para RuntimeIdentifier</target>
796796
<note>{StrBegin="NETSDK1028: "}</note>
797797
</trans-unit>
798+
<trans-unit id="RuntimeIdentifierWillNoLongerImplySelfContained">
799+
<source>NETSDK1201: For projects targeting .NET 8.0 and higher, specifying a RuntimeIdentifier will no longer produce a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use the --self-contained argument.</source>
800+
<target state="new">NETSDK1201: For projects targeting .NET 8.0 and higher, specifying a RuntimeIdentifier will no longer produce a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use the --self-contained argument.</target>
801+
<note>{StrBegin="NETSDK1201: "}</note>
802+
</trans-unit>
798803
<trans-unit id="RuntimeListNotFound">
799804
<source>NETSDK1109: Runtime list file '{0}' was not found. Report this error to the .NET team here: https://aka.ms/dotnet-sdk-issue.</source>
800805
<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>

src/Tasks/Common/Resources/xlf/Strings.fr.xlf

+5
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,11 @@ The following are names of parameters or literal values and should not be transl
795795
<target state="translated">NETSDK1028: Spécifiez un RuntimeIdentifier</target>
796796
<note>{StrBegin="NETSDK1028: "}</note>
797797
</trans-unit>
798+
<trans-unit id="RuntimeIdentifierWillNoLongerImplySelfContained">
799+
<source>NETSDK1201: For projects targeting .NET 8.0 and higher, specifying a RuntimeIdentifier will no longer produce a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use the --self-contained argument.</source>
800+
<target state="new">NETSDK1201: For projects targeting .NET 8.0 and higher, specifying a RuntimeIdentifier will no longer produce a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use the --self-contained argument.</target>
801+
<note>{StrBegin="NETSDK1201: "}</note>
802+
</trans-unit>
798803
<trans-unit id="RuntimeListNotFound">
799804
<source>NETSDK1109: Runtime list file '{0}' was not found. Report this error to the .NET team here: https://aka.ms/dotnet-sdk-issue.</source>
800805
<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>

src/Tasks/Common/Resources/xlf/Strings.it.xlf

+5
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,11 @@ The following are names of parameters or literal values and should not be transl
795795
<target state="translated">NETSDK1028: specificare un elemento RuntimeIdentifier</target>
796796
<note>{StrBegin="NETSDK1028: "}</note>
797797
</trans-unit>
798+
<trans-unit id="RuntimeIdentifierWillNoLongerImplySelfContained">
799+
<source>NETSDK1201: For projects targeting .NET 8.0 and higher, specifying a RuntimeIdentifier will no longer produce a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use the --self-contained argument.</source>
800+
<target state="new">NETSDK1201: For projects targeting .NET 8.0 and higher, specifying a RuntimeIdentifier will no longer produce a self contained app by default. To continue building self-contained apps, set the SelfContained property to true or use the --self-contained argument.</target>
801+
<note>{StrBegin="NETSDK1201: "}</note>
802+
</trans-unit>
798803
<trans-unit id="RuntimeListNotFound">
799804
<source>NETSDK1109: Runtime list file '{0}' was not found. Report this error to the .NET team here: https://aka.ms/dotnet-sdk-issue.</source>
800805
<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>

0 commit comments

Comments
 (0)