Skip to content

Commit 3444feb

Browse files
committed
Make PublishAot an optional feature because Mono does not support it.
1 parent da97cb3 commit 3444feb

19 files changed

+78
-3
lines changed

eng/SourceBuild.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<PropertyGroup>
99
<InnerBuildArgs>$(InnerBuildArgs) /p:Projects="$(InnerSourceBuildRepoRoot)\source-build.slnf"</InnerBuildArgs>
1010
<InnerBuildArgs>$(InnerBuildArgs) /p:UseSharedCompilation=false</InnerBuildArgs>
11+
<InnerBuildArgs Condition="'$(SourceBuildUseMonoRuntime)' == 'true'">$(InnerBuildArgs) /p:NativeAotSupported=false</InnerBuildArgs>
1112
</PropertyGroup>
1213
</Target>
1314

src/Layout/redist/targets/BundledSdks.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
<BundledSdk Include="FSharp.NET.Sdk" Version="1.0.4-bundled-0100" />
66
<BundledSdk Include="Microsoft.Docker.Sdk" Version="1.1.0" />
77
<BundledSdk Include="Microsoft.NET.ILLink.Tasks" Version="$(MicrosoftNETILLinkTasksPackageVersion)" />
8-
<BundledSdk Include="Microsoft.DotNet.ILCompiler" Version="$(MicrosoftDotNetILCompilerPackageVersion)" />
8+
<BundledSdk Include="Microsoft.DotNet.ILCompiler" Version="$(MicrosoftDotNetILCompilerPackageVersion)" Condition="'$(NativeAotSupported)' != 'false'" />
99
</ItemGroup>
1010
</Project>

src/Tasks/Common/Resources/Strings.resx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,4 +875,8 @@ You may need to build the project on another operating system or architecture, o
875875
<value>NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported.</value>
876876
<comment>{StrBegin="NETSDK1192: "}</comment>
877877
</data>
878+
<data name="AotNotSupported" xml:space="preserve">
879+
<value>NETSDK1193: The SDK does not support Ahead of time compilation. Set the PublishAot property to false.</value>
880+
<comment>{StrBegin="NETSDK1193: "}</comment>
881+
</data>
878882
</root>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
<target state="needs-review-translation">NETSDK1183: Sestavení nelze optimalizovat pro kompilaci s předstihem: nebyl nalezen platný balíček modulu runtime. Buď nastavte vlastnost PublishAot na hodnotu false, nebo při publikování použijte podporovaný identifikátor modulu runtime. Při cílení na .NET 7 nebo vyšší nezapomeňte obnovit balíčky s vlastností PublishAot nastavenou na hodnotu true.</target>
1313
<note>{StrBegin="NETSDK1183: "}</note>
1414
</trans-unit>
15+
<trans-unit id="AotNotSupported">
16+
<source>NETSDK1193: The SDK does not support Ahead of time compilation. Set the PublishAot property to false.</source>
17+
<target state="new">NETSDK1193: The SDK does not support Ahead of time compilation. Set the PublishAot property to false.</target>
18+
<note>{StrBegin="NETSDK1193: "}</note>
19+
</trans-unit>
1520
<trans-unit id="AppConfigRequiresRootConfiguration">
1621
<source>NETSDK1070: The application configuration file must have root configuration element.</source>
1722
<target state="translated">NETSDK1070: Konfigurační soubor aplikace musí obsahovat kořenový element konfigurace.</target>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
<target state="needs-review-translation">NETSDK1183: Assemblys können nicht für Ahead-of-time-Kompilierung optimiert werden: Es wurde kein gültiges Runtimepaket gefunden. Legen Sie entweder die PublishAot-Eigenschaft auf FALSE fest, oder verwenden Sie beim Veröffentlichen einen unterstützten Runtimebezeichner. Wenn Sie .NET 7 oder höher verwenden, stellen Sie sicher, dass Sie Pakete wiederherstellen, bei denen die PublishAot-Eigenschaft auf TRUE festgelegt ist.</target>
1313
<note>{StrBegin="NETSDK1183: "}</note>
1414
</trans-unit>
15+
<trans-unit id="AotNotSupported">
16+
<source>NETSDK1193: The SDK does not support Ahead of time compilation. Set the PublishAot property to false.</source>
17+
<target state="new">NETSDK1193: The SDK does not support Ahead of time compilation. Set the PublishAot property to false.</target>
18+
<note>{StrBegin="NETSDK1193: "}</note>
19+
</trans-unit>
1520
<trans-unit id="AppConfigRequiresRootConfiguration">
1621
<source>NETSDK1070: The application configuration file must have root configuration element.</source>
1722
<target state="translated">NETSDK1070: Die Anwendungskonfigurationsdatei muss das Stammkonfigurationselement enthalten.</target>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
<target state="needs-review-translation">NETSDK1183: No se pueden optimizar los ensamblados para la compilación Ahead of time: no se ha encontrado un paquete en tiempo de ejecución válido. Establezca la propiedad PublishAot en false o use un identificador de tiempo de ejecución compatible al publicar. Cuando el destino sea .NET 7 o una versión posterior, asegúrese de restaurar los paquetes con la propiedad PublishAot establecida en true.</target>
1313
<note>{StrBegin="NETSDK1183: "}</note>
1414
</trans-unit>
15+
<trans-unit id="AotNotSupported">
16+
<source>NETSDK1193: The SDK does not support Ahead of time compilation. Set the PublishAot property to false.</source>
17+
<target state="new">NETSDK1193: The SDK does not support Ahead of time compilation. Set the PublishAot property to false.</target>
18+
<note>{StrBegin="NETSDK1193: "}</note>
19+
</trans-unit>
1520
<trans-unit id="AppConfigRequiresRootConfiguration">
1621
<source>NETSDK1070: The application configuration file must have root configuration element.</source>
1722
<target state="translated">NETSDK1070: El archivo de configuración de la aplicación debe tener el elemento de configuración raíz.</target>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
<target state="needs-review-translation">NETSDK1183: Impossible d'optimiser les assemblys pour la compilation Ahead of time : un package d'exécution valide n'a pas été trouvé. Définissez la propriété PublishAot sur false ou utilisez un identificateur d'exécution pris en charge lors de la publication. Lorsque vous ciblez .NET 7 ou supérieur, assurez-vous de restaurer les packages avec la propriété PublishAot définie sur true.</target>
1313
<note>{StrBegin="NETSDK1183: "}</note>
1414
</trans-unit>
15+
<trans-unit id="AotNotSupported">
16+
<source>NETSDK1193: The SDK does not support Ahead of time compilation. Set the PublishAot property to false.</source>
17+
<target state="new">NETSDK1193: The SDK does not support Ahead of time compilation. Set the PublishAot property to false.</target>
18+
<note>{StrBegin="NETSDK1193: "}</note>
19+
</trans-unit>
1520
<trans-unit id="AppConfigRequiresRootConfiguration">
1621
<source>NETSDK1070: The application configuration file must have root configuration element.</source>
1722
<target state="translated">NETSDK1070: Le fichier de configuration de l'application doit avoir un élément de configuration racine.</target>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
<target state="needs-review-translation">NETSDK1183: non è possibile ottimizzare gli assembly per la compilazione Ahead Of Time perché non è stato trovato alcun pacchetto di runtime valido. Impostare la proprietà PublishAot su false oppure usare un identificatore di runtime supportato durante la pubblicazione. Quando si usa .NET 7 o versioni successive, assicurarsi di ripristinare i pacchetti con la proprietà PublishAot impostata su true.</target>
1313
<note>{StrBegin="NETSDK1183: "}</note>
1414
</trans-unit>
15+
<trans-unit id="AotNotSupported">
16+
<source>NETSDK1193: The SDK does not support Ahead of time compilation. Set the PublishAot property to false.</source>
17+
<target state="new">NETSDK1193: The SDK does not support Ahead of time compilation. Set the PublishAot property to false.</target>
18+
<note>{StrBegin="NETSDK1193: "}</note>
19+
</trans-unit>
1520
<trans-unit id="AppConfigRequiresRootConfiguration">
1621
<source>NETSDK1070: The application configuration file must have root configuration element.</source>
1722
<target state="translated">NETSDK1070: il file di configurazione dell'applicazione deve avere un elemento di configurazione radice.</target>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
<target state="needs-review-translation">NETSDK1183: Ahead Of Time コンパイル用にアセンブリを最適化できません: 有効なランタイム パッケージが見つかりませんでした。PublishAot プロパティを false に設定するか、公開時に、サポートされているランタイム識別子を使用してください。.NET 7 以降を対象とする場合は、必ず PublishAot プロパティを true に設定してパッケージを復元してください。</target>
1313
<note>{StrBegin="NETSDK1183: "}</note>
1414
</trans-unit>
15+
<trans-unit id="AotNotSupported">
16+
<source>NETSDK1193: The SDK does not support Ahead of time compilation. Set the PublishAot property to false.</source>
17+
<target state="new">NETSDK1193: The SDK does not support Ahead of time compilation. Set the PublishAot property to false.</target>
18+
<note>{StrBegin="NETSDK1193: "}</note>
19+
</trans-unit>
1520
<trans-unit id="AppConfigRequiresRootConfiguration">
1621
<source>NETSDK1070: The application configuration file must have root configuration element.</source>
1722
<target state="translated">NETSDK1070: アプリケーション構成ファイルには、ルート構成要素が必要です。</target>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
<target state="needs-review-translation">NETSDK1183: Ahead of Time 컴파일을 위해 어셈블리를 최적화할 수 없습니다. 유효한 런타임 패키지를 찾을 수 없습니다. PublishAot 속성을 false로 설정하거나 게시할 때 지원되는 런타임 식별자를 사용하세요. .NET 7 이상을 대상으로 하는 경우 PublishAot 속성이 true로 설정된 패키지를 복원해야 합니다.</target>
1313
<note>{StrBegin="NETSDK1183: "}</note>
1414
</trans-unit>
15+
<trans-unit id="AotNotSupported">
16+
<source>NETSDK1193: The SDK does not support Ahead of time compilation. Set the PublishAot property to false.</source>
17+
<target state="new">NETSDK1193: The SDK does not support Ahead of time compilation. Set the PublishAot property to false.</target>
18+
<note>{StrBegin="NETSDK1193: "}</note>
19+
</trans-unit>
1520
<trans-unit id="AppConfigRequiresRootConfiguration">
1621
<source>NETSDK1070: The application configuration file must have root configuration element.</source>
1722
<target state="translated">NETSDK1070: 애플리케이션 구성 파일에는 루트 구성 요소가 있어야 합니다.</target>

0 commit comments

Comments
 (0)