diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/PackageRestore/Snapshots/RestoreBuilderTests.cs b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/PackageRestore/Snapshots/RestoreBuilderTests.cs index 9bc31379b4f..239aef90e4b 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/PackageRestore/Snapshots/RestoreBuilderTests.cs +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/PackageRestore/Snapshots/RestoreBuilderTests.cs @@ -62,6 +62,27 @@ public void ToProjectRestoreInfo_WhenNuGetRestoreRuleMissing_ReturnsEmpty() Assert.Empty(targetFramework.Properties); } + [Fact] + public void ToProjectRestoreInfo_RespectsNuGetTargetMonikerIfPresent() + { + var update = IProjectSubscriptionUpdateFactory.FromJson(@" +{ + ""CurrentState"": { + ""NuGetRestore"": { + ""Properties"": { + ""NuGetTargetMoniker"": ""UWP, Version=v10"", + ""TargetFrameworkMoniker"": "".NETFramework, Version=v4.5"" + }, + } + } +} +"); + var result = RestoreBuilder.ToProjectRestoreInfo(update.CurrentState); + var targetFramework = result.TargetFrameworks.Item(0); + + Assert.Equal("UWP, Version=v10", targetFramework.TargetFrameworkMoniker); + } + [Fact] public void ToProjectRestoreInfo_SetsCoreProperties() { diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/PackageRestore/Snapshots/RestoreBuilder.cs b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/PackageRestore/Snapshots/RestoreBuilder.cs index 34f110a394b..0537830922d 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/PackageRestore/Snapshots/RestoreBuilder.cs +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/PackageRestore/Snapshots/RestoreBuilder.cs @@ -28,8 +28,13 @@ public static IVsProjectRestoreInfo2 ToProjectRestoreInfo(IImmutableDictionary - /// Looks up a localized string similar to The value of the 'TargetFrameworkMoniker' property in the '{0}' configuration is empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors.. + /// Looks up a localized string similar to The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the '{0}' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors.. /// internal static string Restore_EmptyTargetFrameworkMoniker { get { diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/VSResources.resx b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/VSResources.resx index e40bcb9b3a7..1c671803bdc 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/VSResources.resx +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/VSResources.resx @@ -304,6 +304,6 @@ In order to debug this project, add an executable project to this solution which The metadata on 'DotNetCliToolReference' item '{0}' is inconsistent between target frameworks. Only the first one will be restored. - The value of the 'TargetFrameworkMoniker' property in the '{0}' configuration is empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. + The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the '{0}' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. \ No newline at end of file diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.cs.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.cs.xlf index 94a381735c0..be3e46dc7dc 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.cs.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.cs.xlf @@ -317,8 +317,8 @@ Pokud chcete projekt ladit, přidejte do řešení spustitelný projekt, který - The value of the 'TargetFrameworkMoniker' property in the '{0}' configuration is empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. - Hodnota vlastnosti TargetFrameworkMoniker v konfiguraci {0} je prázdná. Tato konfigurace se nebude podílet na obnovení přes NuGet, což může mít za následek chyby při obnovení a sestavení. + The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the '{0}' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. + Hodnota vlastnosti TargetFrameworkMoniker v konfiguraci {0} je prázdná. Tato konfigurace se nebude podílet na obnovení přes NuGet, což může mít za následek chyby při obnovení a sestavení. diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.de.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.de.xlf index 9b9bb3f32bc..1482c3479a6 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.de.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.de.xlf @@ -317,8 +317,8 @@ Um das Projekt zu debuggen, fügen Sie dieser Projektmappe ein ausführbares Pro - The value of the 'TargetFrameworkMoniker' property in the '{0}' configuration is empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. - Der Wert der Eigenschaft "TargetFrameworkMoniker" in der "{0}"-Konfiguration ist leer. Diese Konfiguration wird bei der NuGet-Wiederherstellung nicht berücksichtigt, was zu Wiederherstellungs- und Buildfehlern führen kann. + The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the '{0}' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. + Der Wert der Eigenschaft "TargetFrameworkMoniker" in der "{0}"-Konfiguration ist leer. Diese Konfiguration wird bei der NuGet-Wiederherstellung nicht berücksichtigt, was zu Wiederherstellungs- und Buildfehlern führen kann. diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.es.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.es.xlf index 44061e6148d..7250c19d591 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.es.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.es.xlf @@ -317,8 +317,8 @@ Para depurar este proyecto, agregue un proyecto ejecutable a esta solución con - The value of the 'TargetFrameworkMoniker' property in the '{0}' configuration is empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. - El valor de la propiedad "TargetFrameworkMoniker" en la configuración de "{0}" está vacía. Esta configuración no contribuirá a la restauración de NuGet, lo que puede dar lugar a errores de restauración y compilación. + The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the '{0}' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. + El valor de la propiedad "TargetFrameworkMoniker" en la configuración de "{0}" está vacía. Esta configuración no contribuirá a la restauración de NuGet, lo que puede dar lugar a errores de restauración y compilación. diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.fr.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.fr.xlf index 4a03701642a..f6b0600bace 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.fr.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.fr.xlf @@ -317,8 +317,8 @@ Pour déboguer ce projet, ajoutez à cette solution un projet exécutable qui fa - The value of the 'TargetFrameworkMoniker' property in the '{0}' configuration is empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. - La valeur de la propriété TargetFrameworkMoniker dans la configuration « {0} » est vide. Cette configuration ne contribue pas à la restauration NuGet, ce qui peut entraîner des erreurs de restauration et de build. + The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the '{0}' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. + La valeur de la propriété TargetFrameworkMoniker dans la configuration « {0} » est vide. Cette configuration ne contribue pas à la restauration NuGet, ce qui peut entraîner des erreurs de restauration et de build. diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.it.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.it.xlf index 41009e8f6ef..20aec710eba 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.it.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.it.xlf @@ -317,8 +317,8 @@ Per eseguire il debug del progetto, aggiungere a questa soluzione un progetto es - The value of the 'TargetFrameworkMoniker' property in the '{0}' configuration is empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. - Il valore della proprietà 'TargetFrameworkMoniker' nella configurazione '{0}' è vuoto. Questa configurazione non contribuisce al ripristino di NuGet e questo può comportare errori di ripristino e di compilazione. + The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the '{0}' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. + Il valore della proprietà 'TargetFrameworkMoniker' nella configurazione '{0}' è vuoto. Questa configurazione non contribuisce al ripristino di NuGet e questo può comportare errori di ripristino e di compilazione. diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.ja.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.ja.xlf index dc1b8c21210..2de1328072c 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.ja.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.ja.xlf @@ -317,8 +317,8 @@ In order to debug this project, add an executable project to this solution which - The value of the 'TargetFrameworkMoniker' property in the '{0}' configuration is empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. - '{0}' 構成の 'TargetFrameworkMoniker' プロパティの値が空です。この構成は NuGet の復元には影響しませんが、復元およびビルドのエラーが発生する可能性があります。 + The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the '{0}' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. + '{0}' 構成の 'TargetFrameworkMoniker' プロパティの値が空です。この構成は NuGet の復元には影響しませんが、復元およびビルドのエラーが発生する可能性があります。 diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.ko.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.ko.xlf index 03d435f6cf4..3681827b9fc 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.ko.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.ko.xlf @@ -317,8 +317,8 @@ In order to debug this project, add an executable project to this solution which - The value of the 'TargetFrameworkMoniker' property in the '{0}' configuration is empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. - '{0}' 구성의 'TargetFrameworkMoniker' 속성 값이 비어 있습니다. 이 구성은 NuGet 복원에 기여하지 않아 복원 및 빌드 오류가 발생할 수 있습니다. + The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the '{0}' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. + '{0}' 구성의 'TargetFrameworkMoniker' 속성 값이 비어 있습니다. 이 구성은 NuGet 복원에 기여하지 않아 복원 및 빌드 오류가 발생할 수 있습니다. diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.pl.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.pl.xlf index 676901bfcd2..02a7c6fdef7 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.pl.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.pl.xlf @@ -317,8 +317,8 @@ Aby debugować ten projekt, dodaj projekt wykonywalny do tego rozwiązania, któ - The value of the 'TargetFrameworkMoniker' property in the '{0}' configuration is empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. - Wartość właściwości „TargetFrameworkMoniker” w konfiguracji „{0}” jest pusta. Ta konfiguracja nie przyczyni się do przywracania pakietów NuGet, co może skutkować błędami przywracania i kompilacji. + The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the '{0}' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. + Wartość właściwości „TargetFrameworkMoniker” w konfiguracji „{0}” jest pusta. Ta konfiguracja nie przyczyni się do przywracania pakietów NuGet, co może skutkować błędami przywracania i kompilacji. diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.pt-BR.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.pt-BR.xlf index d1b1b149ca2..1bfef254eb4 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.pt-BR.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.pt-BR.xlf @@ -317,8 +317,8 @@ Para depurar esse projeto, adicione um projeto executável a essa solução que - The value of the 'TargetFrameworkMoniker' property in the '{0}' configuration is empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. - O valor da propriedade 'TargetFrameworkMoniker' na configuração '{0}' está vazio. Essa configuração não contribuirá para a restauração do NuGet, o que pode resultar em erros de restauração e de build. + The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the '{0}' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. + O valor da propriedade 'TargetFrameworkMoniker' na configuração '{0}' está vazio. Essa configuração não contribuirá para a restauração do NuGet, o que pode resultar em erros de restauração e de build. diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.ru.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.ru.xlf index c0493218b98..551caef9870 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.ru.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.ru.xlf @@ -317,8 +317,8 @@ In order to debug this project, add an executable project to this solution which - The value of the 'TargetFrameworkMoniker' property in the '{0}' configuration is empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. - Значение свойства "TargetFrameworkMoniker" в конфигурации "{0}" является пустым. Эта конфигурация не будет задействована в восстановлении NuGet, что может привести к ошибкам при восстановлении и сборке. + The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the '{0}' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. + Значение свойства "TargetFrameworkMoniker" в конфигурации "{0}" является пустым. Эта конфигурация не будет задействована в восстановлении NuGet, что может привести к ошибкам при восстановлении и сборке. diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.tr.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.tr.xlf index e3d6a001548..a18c983f409 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.tr.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.tr.xlf @@ -317,8 +317,8 @@ Bu projede hata ayıklamak için bu çözüme, kitaplık projesine başvuran bir - The value of the 'TargetFrameworkMoniker' property in the '{0}' configuration is empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. - '{0}' yapılandırmasındaki 'TargetFrameworkMoniker' özelliğinin değeri boş. Bu yapılandırma NuGet geri yüklemeye katkıda bulunmaz, bu da geri yükleme ve derleme hatalarına neden olabilir. + The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the '{0}' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. + '{0}' yapılandırmasındaki 'TargetFrameworkMoniker' özelliğinin değeri boş. Bu yapılandırma NuGet geri yüklemeye katkıda bulunmaz, bu da geri yükleme ve derleme hatalarına neden olabilir. diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.zh-Hans.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.zh-Hans.xlf index eb95ec9ba94..8a5f2ccb53b 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.zh-Hans.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.zh-Hans.xlf @@ -317,8 +317,8 @@ In order to debug this project, add an executable project to this solution which - The value of the 'TargetFrameworkMoniker' property in the '{0}' configuration is empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. - “{0}”配置中的 TargetFrameworkMoniker 属性的值为空。此配置将影响 NuGet 还原,这可能导致还原并生成错误。 + The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the '{0}' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. + “{0}”配置中的 TargetFrameworkMoniker 属性的值为空。此配置将影响 NuGet 还原,这可能导致还原并生成错误。 diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.zh-Hant.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.zh-Hant.xlf index 3d861de4756..0a015249191 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.zh-Hant.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/xlf/VSResources.zh-Hant.xlf @@ -317,8 +317,8 @@ In order to debug this project, add an executable project to this solution which - The value of the 'TargetFrameworkMoniker' property in the '{0}' configuration is empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. - '{0}' 組態中的 'TargetFrameworkMoniker' 屬性值是空的。這樣的組態不會對 NuGet 還原生效,而可能導致還原及建置錯誤。 + The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the '{0}' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. + '{0}' 組態中的 'TargetFrameworkMoniker' 屬性值是空的。這樣的組態不會對 NuGet 還原生效,而可能導致還原及建置錯誤。 diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/NuGetRestore.xaml b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/NuGetRestore.xaml index 6750648e962..a86e2382286 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/NuGetRestore.xaml +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/NuGetRestore.xaml @@ -93,6 +93,10 @@ ReadOnly="True" Visible="False" /> + +