diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index e71fa5622adb..b3f19ea23c70 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -483,8 +483,8 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. {StrBegin="NETSDK1094: "} - - NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are publishing a self-contained application using a supported runtime identifier, or set the PublishReadyToRun property to false. + + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. {StrBegin="NETSDK1095: "} @@ -534,4 +534,4 @@ The following are names of parameters or literal values and should not be transl NETSDK1106: Microsoft.NET.Sdk.WindowsDesktop requires 'UseWpf' or 'UseWindowsForms' to be set to 'true' {StrBegin="NETSDK1106: "} - \ No newline at end of file + diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index 60c96c45f7e9..a22c0856712b 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -431,9 +431,9 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Nepovedlo se optimalizovat sestavení pro výkonnost: nenašel se platný balíček modulu runtime. Buď nastavte vlastnost PublishReadyToRun na false, nebo při publikování použijte podporovaný identifikátor modulu runtime. {StrBegin="NETSDK1094: "} - - NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are publishing a self-contained application using a supported runtime identifier, or set the PublishReadyToRun property to false. - NETSDK1095: Optimalizace sestavení z hlediska výkonu není u vybrané cílové platformy nebo architektury podporovaná. Ujistěte se prosím, že publikujete samostatnou aplikaci používající identifikátor podporovaného modulu runtime, nebo nastavte vlastnost PublishReadyToRun na hodnotu False. + + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. {StrBegin="NETSDK1095: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 1d57a18f7133..740f4633bb29 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -431,9 +431,9 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Die Leistungsoptimierung ist für Assemblys nicht möglich: Es wurde kein gültiges Runtimepaket gefunden. Legen Sie die PublishReadyToRun-Eigenschaft auf FALSE fest, oder verwenden Sie bei der Veröffentlichung eine unterstützte Runtime-ID. {StrBegin="NETSDK1094: "} - - NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are publishing a self-contained application using a supported runtime identifier, or set the PublishReadyToRun property to false. - NETSDK1095: Die Leistungsoptimierung von Assemblys wird für die ausgewählte Zielplattform oder -architektur nicht unterstützt. Bitte überprüfen Sie, ob Sie eine eigenständige Anwendung mit einem unterstützten Runtimebezeichner veröffentlichen, oder legen Sie die PublishReadyToRun-Eigenschaft auf FALSE fest. + + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. {StrBegin="NETSDK1095: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index 1c4c71c4092e..e31896fcadc5 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -431,9 +431,9 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: No se puede optimizar el rendimiento de los ensamblados: no se encontró ningún paquete de tiempo de ejecución válido. Establezca la propiedad PublishReadyToRun en false o use un identificador de tiempo de ejecución admitido al publicar. {StrBegin="NETSDK1094: "} - - NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are publishing a self-contained application using a supported runtime identifier, or set the PublishReadyToRun property to false. - NETSDK1095: No se admite la optimización del rendimiento de los ensamblados para la plataforma o la arquitectura de destino seleccionadas. Compruebe que va a publicar una aplicación autónoma con un identificador de tiempo de ejecución compatible o establezca la propiedad PublishReadyToRun en false. + + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. {StrBegin="NETSDK1095: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index b70bb76b4aed..b672e217ad68 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -431,9 +431,9 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: impossible d'optimiser les assemblys pour améliorer le niveau de performance. Aucun package de runtime valide n'a été localisé. Affectez la valeur false à la propriété PublishReadyToRun, ou utilisez un identificateur de runtime pris en charge au moment de la publication. {StrBegin="NETSDK1094: "} - - NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are publishing a self-contained application using a supported runtime identifier, or set the PublishReadyToRun property to false. - NETSDK1095: l'optimisation des assemblys afin d'améliorer le niveau de performance n'est pas prise en charge pour la plateforme ou l'architecture cible sélectionnée. Vérifiez que vous publiez une application autonome à l'aide d'un identificateur de runtime pris en charge, ou affectez la valeur false à la propriété PublishReadyToRun. + + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. {StrBegin="NETSDK1095: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index 9f855f1bdd88..d1c50fb77dd4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -431,9 +431,9 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: non è possibile ottimizzare gli assembly per le prestazioni perché non è stato trovato alcun pacchetto di runtime valido. Impostare la proprietà PublishReadyToRun su false oppure usare un identificatore di runtime supportato durante la pubblicazione. {StrBegin="NETSDK1094: "} - - NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are publishing a self-contained application using a supported runtime identifier, or set the PublishReadyToRun property to false. - NETSDK1095: l'ottimizzazione degli assembly per le prestazioni non è supportata per la piattaforma o l'architettura di destinazione selezionata. Verificare che per la pubblicazione di un'applicazione indipendente viene usato un identificatore di runtime supportato oppure impostare la proprietà PublishReadyToRun su false. + + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. {StrBegin="NETSDK1095: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index ca726aeebcfb..8b16015ad94f 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -431,9 +431,9 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: アセンブリのパフォーマンスを最適化できません。有効なランタイム パッケージが見つかりませんでした。PublishReadyToRun プロパティを false に設定するか、公開するときに、サポートされているランタイム識別子を使用してください。 {StrBegin="NETSDK1094: "} - - NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are publishing a self-contained application using a supported runtime identifier, or set the PublishReadyToRun property to false. - NETSDK1095: アセンブリのパフォーマンスの最適化は、選択されたターゲット プラットフォームまたはアーキテクチャに対してはサポートされていません。サポートされているランタイム識別子を使用して、自己完結型のアプリケーションを発行することを確認するか、PublishReadyToRun プロパティを false に設定してください。 + + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. {StrBegin="NETSDK1095: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index 52da444f0f50..fdb4b33bc00c 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -431,9 +431,9 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: 성능 향상을 위해 어셈블리를 최적화할 수 없습니다. 유효한 런타임 패키지를 찾을 수 없습니다. PublishReadyToRun 속성을 false로 설정하거나, 게시할 때 지원되는 런타임 식별자를 사용하세요. {StrBegin="NETSDK1094: "} - - NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are publishing a self-contained application using a supported runtime identifier, or set the PublishReadyToRun property to false. - NETSDK1095: 선택한 대상 플랫폼 또는 아키텍처의 경우 성능 향상을 위해 어셈블리를 최적화할 수 없습니다. 지원되는 런타임 식별자를 사용하여 자체 포함 애플리케이션을 게시 중인지 확인하거나 PublishReadyToRun 속성을 false로 설정하세요. + + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. {StrBegin="NETSDK1095: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 8335cf2368c9..e839059e6023 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -431,9 +431,9 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Nie można zoptymalizować zestawów pod kątem wydajności — nie odnaleziono prawidłowego pakietu środowiska wykonawczego. Ustaw właściwość PublishReadyToRun na wartość false lub użyj obsługiwanego identyfikatora środowiska uruchomieniowego podczas publikowania. {StrBegin="NETSDK1094: "} - - NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are publishing a self-contained application using a supported runtime identifier, or set the PublishReadyToRun property to false. - NETSDK1095: Optymalizacja zestawów pod kątem wydajności nie jest obsługiwana dla wybranej platformy lub architektury docelowej. Upewnij się, że publikujesz aplikację autonomiczną, korzystając z identyfikatora obsługiwanego środowiska wykonawczego, lub ustaw dla właściwości PublishReadyToRun wartość false. + + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. {StrBegin="NETSDK1095: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index 3168c21bb4cc..fabec9672c61 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -431,9 +431,9 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: não é possível otimizar assemblies para desempenho: não foi encontrado um pacote válido do tempo de execução. Defina a propriedade PublishReadyToRun como false ou use um identificador compatível durante a publicação. {StrBegin="NETSDK1094: "} - - NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are publishing a self-contained application using a supported runtime identifier, or set the PublishReadyToRun property to false. - NETSDK1095: não há suporte para otimizar assemblies para desempenho na arquitetura ou plataforma de destino selecionada. Verifique se você está publicando um aplicativo autossuficiente usando um identificador de tempo de execução com suporte ou defina a propriedade PublishReadyToRun como false. + + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. {StrBegin="NETSDK1095: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index 626f6624450e..ab7b22486044 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -431,9 +431,9 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: не удалось оптимизировать сборки для производительности: не найден допустимый пакет среды выполнения. Задайте для свойства PublishReadyToRun значение false либо используйте поддерживаемый идентификатор среды выполнения при публикации. {StrBegin="NETSDK1094: "} - - NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are publishing a self-contained application using a supported runtime identifier, or set the PublishReadyToRun property to false. - NETSDK1095: оптимизация сборок для повышения производительности не поддерживается для выбранной целевой платформы или архитектуры. Убедитесь, что вы публикуете автономное приложение с поддерживаемым идентификатором среды выполнения, или установите значение false для свойства PublishReadyToRun. + + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. {StrBegin="NETSDK1095: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index c73fb07c9a46..b5e61d632158 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -431,9 +431,9 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Derlemeler performans için iyileştirilemiyor: Geçerli bir çalışma zamanı paketi bulunamadı. PublishReadyToRun özelliğini false olarak ayarlayın veya yayımlarken desteklenen bir çalışma zamanı tanımlayıcısı kullanın. {StrBegin="NETSDK1094: "} - - NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are publishing a self-contained application using a supported runtime identifier, or set the PublishReadyToRun property to false. - NETSDK1095: Derlemelerin performans için iyileştirilmesi, seçilen hedef platform veya mimari için desteklenmiyor. Lütfen desteklenen bir çalışma zamanı tanımlayıcısı kullanarak kendi içinde bulunan bir uygulamayı yayımladığınızı doğrulayın veya PublishReadyToRun özelliğini false olarak ayarlayın. + + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. {StrBegin="NETSDK1095: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index 0f845c39379e..3e94e35dac9c 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -431,9 +431,9 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. {StrBegin="NETSDK1094: "} - - NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are publishing a self-contained application using a supported runtime identifier, or set the PublishReadyToRun property to false. - NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are publishing a self-contained application using a supported runtime identifier, or set the PublishReadyToRun property to false. + + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. {StrBegin="NETSDK1095: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index 6c8f59180b32..f199e6dfd6a4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -431,9 +431,9 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: 無法最佳化組件的效能: 找不到有效的執行階段套件。請將 ReadyToRun 屬性設定為 false,或在發佈時使用支援的執行階段識別碼。 {StrBegin="NETSDK1094: "} - - NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are publishing a self-contained application using a supported runtime identifier, or set the PublishReadyToRun property to false. - NETSDK1095: 選取的目標平台或架構不支援最佳化組件的效能。請務必使用支援的執行階段識別碼發佈獨立式應用程式,或將 ReadyToRun 屬性設為 false。 + + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. + NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false. {StrBegin="NETSDK1095: "} diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/GenerateDepsFile.cs b/src/Tasks/Microsoft.NET.Build.Tasks/GenerateDepsFile.cs index 83e79327301e..13315cb5fc7b 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/GenerateDepsFile.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks/GenerateDepsFile.cs @@ -141,7 +141,7 @@ private void WriteDepsFile(string depsFilePath) IEnumerable excludeFromPublishAssets = PackageReferenceConverter.GetPackageIds(ExcludeFromPublishPackageReferences); IEnumerable runtimePackAssets = - RuntimePackAssets.Select(item => RuntimePackAssetInfo.FromItem(item)); + IsSelfContained ? RuntimePackAssets.Select(item => RuntimePackAssetInfo.FromItem(item)) : Enumerable.Empty(); ProjectContext projectContext = lockFile.CreateProjectContext( diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/PrepareForReadyToRunCompilation.cs b/src/Tasks/Microsoft.NET.Build.Tasks/PrepareForReadyToRunCompilation.cs index 351f66ae8ec9..cee7245d557e 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/PrepareForReadyToRunCompilation.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks/PrepareForReadyToRunCompilation.cs @@ -95,13 +95,13 @@ protected override void ExecuteCore() !ExtractTargetPlatformAndArchitecture(hostRuntimeIdentifier, out string hostPlatform, out Architecture hostArchitecture) || targetPlatform != hostPlatform) { - Log.LogError(Strings.ReadyToRunTargetNotSuppotedError); + Log.LogError(Strings.ReadyToRunTargetNotSupportedError); return; } if (!GetCrossgenComponentsPaths() || !File.Exists(_crossgenPath) || !File.Exists(_clrjitPath)) { - Log.LogError(Strings.ReadyToRunTargetNotSuppotedError); + Log.LogError(Strings.ReadyToRunTargetNotSupportedError); return; } diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/RunReadyToRunCompiler.cs b/src/Tasks/Microsoft.NET.Build.Tasks/RunReadyToRunCompiler.cs index 6d6430f22f2e..4b72edff336a 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/RunReadyToRunCompiler.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks/RunReadyToRunCompiler.cs @@ -90,6 +90,12 @@ bool IsManagedAssemblyToUseAsCrossgenReference(ITaskItem file) { // Reference only managed assemblies that will be published to the root directory. string relativeOutputPath = file.GetMetadata(MetadataKeys.RelativePath); + + if (string.IsNullOrEmpty(relativeOutputPath)) + { + relativeOutputPath = file.GetMetadata(MetadataKeys.DestinationSubPath); + } + if (!String.IsNullOrEmpty(Path.GetDirectoryName(relativeOutputPath))) { return false; @@ -172,7 +178,7 @@ private string GetAssemblyReferencesCommands() if (IsPdbCompilation && String.Equals(Path.GetFileName(runtimeAssembly.ItemSpec), Path.GetFileName(_outputR2RImage), StringComparison.OrdinalIgnoreCase)) continue; - // TODO: Delete check when fixing https://github.com/dotnet/sdk/issues/3110 + // TODO: Delete check when fixing https://github.com/dotnet/sdk/issues/3109 if (!IsManagedAssemblyToUseAsCrossgenReference(runtimeAssembly)) continue; diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets index becc0245b265..659d5b1cc2dd 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets @@ -237,9 +237,6 @@ Copyright (c) .NET Foundation. All rights reserved. <_ReadyToRunOutputPath>$(IntermediateOutputPath)R2R - - - + + + <_ReadyToRunImplementationAssemblies Include="@(ResolvedFileToPublish)" /> + + + + + <_ReadyToRunImplementationAssemblies Include="@(RuntimePackAsset)" /> + + + + + + + + <_ReadyToRunImplementationAssemblies Remove="@(_ReadyToRunImplementationAssemblies)" /> + <_ReadyToRunImplementationAssemblies Include="@(_ReadyToRunImplementationAssembliesWithoutConflicts)" /> + @@ -300,9 +318,8 @@ Copyright (c) .NET Foundation. All rights reserved. Inputs="@(_ReadyToRunSymbolsCompileList)" Outputs="%(_ReadyToRunSymbolsCompileList.OutputPDBImage)"> - @@ -456,7 +473,7 @@ Copyright (c) .NET Foundation. All rights reserved. - <_ResolvedCopyLocalPublishAssets Include="@(RuntimePackAsset)" /> + <_ResolvedCopyLocalPublishAssets Include="@(RuntimePackAsset)" Condition="'$(SelfContained)' == 'true'" /> diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.TargetingPackResolution.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.TargetingPackResolution.targets index 2820cdb659ac..2cf980cf1d20 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.TargetingPackResolution.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.TargetingPackResolution.targets @@ -50,7 +50,7 @@ Copyright (c) .NET Foundation. All rights reserved. TargetingPackRoot="$(NetCoreTargetingPackRoot)" RuntimeGraphPath="$(BundledRuntimeIdentifierGraphFile)" SelfContained="$(SelfContained)" - ReadyToRunEnabled="$(ReadyToRun)" + ReadyToRunEnabled="$(PublishReadyToRun)" RuntimeIdentifier="$(RuntimeIdentifier)" RuntimeIdentifiers="$(RuntimeIdentifiers)" RuntimeFrameworkVersion="$(RuntimeFrameworkVersion)" @@ -253,7 +253,7 @@ Copyright (c) .NET Foundation. All rights reserved. + Condition="'$(CopyLocalLockFileAssemblies)' == 'true' and '$(SelfContained)' == 'true'" /> diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunCrossgen.cs b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunCrossgen.cs index 14d55d1c21bc..0d402e76885b 100644 --- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunCrossgen.cs +++ b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunCrossgen.cs @@ -34,15 +34,17 @@ public void It_only_runs_readytorun_compiler_when_switch_is_enabled(string targe .Restore(Log, testProject.Name); var publishCommand = new PublishCommand(Log, Path.Combine(testProjectInstance.Path, testProject.Name)); - publishCommand.Execute("/v:n").Should().Pass(); + publishCommand.Execute().Should().Pass(); DirectoryInfo publishDirectory = publishCommand.GetOutputDirectory( targetFramework, "Debug", - EnvironmentInfo.GetCompatibleRid(targetFramework)); + testProject.RuntimeIdentifier); - DoesImageHaveR2RInfo(Path.Combine(publishDirectory.FullName, $"{projectName}.dll")).ToString().Should().Be(false.ToString()); - DoesImageHaveR2RInfo(Path.Combine(publishDirectory.FullName, "ClassLib.dll")).ToString().Should().Be(false.ToString()); + DoesImageHaveR2RInfo(Path.Combine(publishDirectory.FullName, $"{projectName}.dll")).Should().BeFalse(); + DoesImageHaveR2RInfo(Path.Combine(publishDirectory.FullName, "ClassLib.dll")).Should().BeFalse(); + + publishDirectory.Should().HaveFile("System.Private.CoreLib.dll"); // self-contained } [Theory] @@ -63,12 +65,12 @@ public void It_creates_readytorun_images_for_all_assemblies_except_excluded_ones .Restore(Log, testProject.Name); var publishCommand = new PublishCommand(Log, Path.Combine(testProjectInstance.Path, testProject.Name)); - publishCommand.Execute("/v:n").Should().Pass(); + publishCommand.Execute().Should().Pass(); DirectoryInfo publishDirectory = publishCommand.GetOutputDirectory( targetFramework, - "Debug", - EnvironmentInfo.GetCompatibleRid(targetFramework)); + "Debug", + testProject.RuntimeIdentifier); var mainProjectDll = Path.Combine(publishDirectory.FullName, $"{projectName}.dll"); var classLibDll = Path.Combine(publishDirectory.FullName, $"ClassLib.dll"); @@ -81,8 +83,10 @@ public void It_creates_readytorun_images_for_all_assemblies_except_excluded_ones }); } - DoesImageHaveR2RInfo(mainProjectDll).ToString().Should().Be(true.ToString()); - DoesImageHaveR2RInfo(classLibDll).ToString().Should().Be(false.ToString()); + DoesImageHaveR2RInfo(mainProjectDll).Should().BeTrue(); + DoesImageHaveR2RInfo(classLibDll).Should().BeFalse(); + + publishDirectory.Should().HaveFile("System.Private.CoreLib.dll"); // self-contained } [Theory] @@ -103,12 +107,12 @@ public void It_creates_readytorun_symbols_when_switch_is_used(string targetFrame .Restore(Log, testProject.Name); var publishCommand = new PublishCommand(Log, Path.Combine(testProjectInstance.Path, testProject.Name)); - publishCommand.Execute("/v:n").Should().Pass(); + publishCommand.Execute().Should().Pass(); DirectoryInfo publishDirectory = publishCommand.GetOutputDirectory( targetFramework, "Debug", - EnvironmentInfo.GetCompatibleRid(targetFramework)); + testProject.RuntimeIdentifier); var mainProjectDll = Path.Combine(publishDirectory.FullName, $"{projectName}.dll"); var classLibDll = Path.Combine(publishDirectory.FullName, $"ClassLib.dll"); @@ -121,13 +125,15 @@ public void It_creates_readytorun_symbols_when_switch_is_used(string targetFrame }); } - DoesImageHaveR2RInfo(mainProjectDll).ToString().Should().Be(true.ToString()); - DoesImageHaveR2RInfo(classLibDll).ToString().Should().Be(true.ToString()); + DoesImageHaveR2RInfo(mainProjectDll).Should().BeTrue(); + DoesImageHaveR2RInfo(classLibDll).Should().BeTrue(); + + publishDirectory.Should().HaveFile("System.Private.CoreLib.dll"); // self-contained } [Theory] [InlineData("netcoreapp3.0")] - public void It_does_not_support_framework_dependent_publishing(string targetFramework) + public void It_supports_framework_dependent_publishing(string targetFramework) { var projectName = "FrameworkDependent"; @@ -137,18 +143,35 @@ public void It_does_not_support_framework_dependent_publishing(string targetFram "ClassLib"); testProject.AdditionalProperties["PublishReadyToRun"] = "True"; + testProject.AdditionalProperties["PublishReadyToRunEmitSymbols"] = "True"; + testProject.AdditionalProperties["SelfContained"] = "False"; var testProjectInstance = _testAssetsManager.CreateTestProject(testProject) .Restore(Log, testProject.Name); - // TODO: This test should be changed to expect publishing to succeed when fixing #3109 and #3110. - // When fixing the issues, change the function name to reflect what we're testing, and change the test's expected - // behavior (check that the output assemblies exist and are R2R images). var publishCommand = new PublishCommand(Log, Path.Combine(testProjectInstance.Path, testProject.Name)); - publishCommand.Execute("/p:SelfContained=false", "/v:n") - .Should() - .Fail() - .And.HaveStdOutContainingIgnoreCase("NETSDK1095"); + publishCommand.Execute().Should().Pass(); + + DirectoryInfo publishDirectory = publishCommand.GetOutputDirectory( + targetFramework, + "Debug", + testProject.RuntimeIdentifier); + + var mainProjectDll = Path.Combine(publishDirectory.FullName, $"{projectName}.dll"); + var classLibDll = Path.Combine(publishDirectory.FullName, $"ClassLib.dll"); + + if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + publishDirectory.Should().HaveFiles(new[] { + GetPDBFileName(mainProjectDll), + GetPDBFileName(classLibDll), + }); + } + + DoesImageHaveR2RInfo(mainProjectDll).Should().BeTrue(); + DoesImageHaveR2RInfo(classLibDll).Should().BeTrue(); + + publishDirectory.Should().NotHaveFile("System.Private.CoreLib.dll"); // framework-dependent } [Theory] @@ -201,7 +224,7 @@ public void It_does_not_support_cross_platform_readytorun_compilation(string tar var publishCommand = new PublishCommand(Log, Path.Combine(testProjectInstance.Path, testProject.Name)); - publishCommand.Execute("/v:n") + publishCommand.Execute() .Should() .Fail() .And.HaveStdOutContainingIgnoreCase("NETSDK1095");