diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 3b8c5d88ab1d..346fd082fcfb 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -43,11 +43,11 @@ stages: queue: BuildPool.Windows.10.Amd64.VS2019.Pre.Open ${{ if ne(variables['System.TeamProject'], 'public') }}: name: NetCoreInternal-Pool - queue: buildpool.windows.10.amd64.vs2017 + queue: BuildPool.Windows.10.Amd64.VS2019.Pre helixTargetQueue: Windows.10.Amd64.ClientRS5.VS2019.BT.Open strategy: matrix: - ${{ if eq(variables['System.TeamProject'], 'public') }}: + ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: Build_Debug: _BuildConfig: Debug _PublishType: none @@ -55,22 +55,29 @@ stages: _Test: -test Build_Release: _BuildConfig: Release - ${{ if eq(variables['System.TeamProject'], 'public') }}: + ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: _PublishType: none _SignType: test _Test: -test - ${{ if ne(variables['System.TeamProject'], 'public') }}: + ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: _PublishType: blob _SignType: real _Test: '' - - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - template: /eng/build.yml parameters: agentOs: Windows_NT_FullFramework pool: - name: NetCorePublic-Pool - queue: BuildPool.Windows.10.Amd64.VS2019.Pre.Open - helixTargetQueue: Windows.10.Amd64.ClientRS5.VS2019.BT.Open + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: NetCorePublic-Pool + queue: BuildPool.Windows.10.Amd64.VS2019.Pre.Open + ${{ if ne(variables['System.TeamProject'], 'public') }}: + name: NetCoreInternal-Pool + queue: BuildPool.Windows.10.Amd64.VS2019.Pre + ${{ if eq(variables['System.TeamProject'], 'public') }}: + helixTargetQueue: Windows.10.Amd64.ClientRS5.VS2019.BT.Open + ${{ if ne(variables['System.TeamProject'], 'public') }}: + helixTargetQueue: Windows.10.Amd64.ClientRS5.VS2019.BT strategy: matrix: Build_Debug: @@ -88,8 +95,12 @@ stages: parameters: agentOs: Windows_NT_TestAsTools pool: - name: NetCorePublic-Pool - queue: BuildPool.Windows.10.Amd64.VS2019.Pre.Open + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: NetCorePublic-Pool + queue: BuildPool.Windows.10.Amd64.VS2019.Pre.Open + ${{ if ne(variables['System.TeamProject'], 'public') }}: + name: NetCoreInternal-Pool + queue: BuildPool.Windows.10.Amd64.VS2019.Pre strategy: matrix: Build_Debug: @@ -101,9 +112,16 @@ stages: parameters: agentOs: Ubuntu_16_04 pool: - name: NetCorePublic-Pool - queue: BuildPool.Ubuntu.1604.Amd64.Open - helixTargetQueue: Ubuntu.1604.Amd64.Open + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: NetCorePublic-Pool + queue: BuildPool.Ubuntu.1604.Amd64.Open + ${{ if ne(variables['System.TeamProject'], 'public') }}: + name: NetCoreInternal-Pool + queue: BuildPool.Ubuntu.1604.Amd64 + ${{ if eq(variables['System.TeamProject'], 'public') }}: + helixTargetQueue: Ubuntu.1604.Amd64.Open + ${{ if ne(variables['System.TeamProject'], 'public') }}: + helixTargetQueue: Ubuntu.1604.Amd64 strategy: matrix: Build_Debug: @@ -120,7 +138,10 @@ stages: agentOs: Darwin pool: name: Hosted macOS - helixTargetQueue: OSX.1014.Amd64.Open + ${{ if eq(variables['System.TeamProject'], 'public') }}: + helixTargetQueue: OSX.1014.Amd64.Open + ${{ if ne(variables['System.TeamProject'], 'public') }}: + helixTargetQueue: OSX.1014.Amd64 strategy: matrix: Build_Debug: diff --git a/eng/Version.Details.xml.orig b/eng/Version.Details.xml.orig new file mode 100644 index 000000000000..f2791df581d8 --- /dev/null +++ b/eng/Version.Details.xml.orig @@ -0,0 +1,148 @@ + + + + + https://github.com/dotnet/templating + d3fea50b8720f9a581826da79a7559975982fc19 + + + https://github.com/dotnet/runtime + d8cf13e0ba9b369a15a83472b6b97463c6d07fe2 + + + https://github.com/dotnet/runtime + d8cf13e0ba9b369a15a83472b6b97463c6d07fe2 + + + https://github.com/dotnet/arcade + ff5d4b6c8dbdaeacb6e6159d3f8185118dffd915 + + + https://github.com/dotnet/runtime + d8cf13e0ba9b369a15a83472b6b97463c6d07fe2 + + + https://github.com/dotnet/runtime + d8cf13e0ba9b369a15a83472b6b97463c6d07fe2 + + + https://github.com/dotnet/runtime + d8cf13e0ba9b369a15a83472b6b97463c6d07fe2 + + + https://github.com/dotnet/CliCommandLineParser + 0e89c2116ad28e404ba56c14d1c3f938caa25a01 + + + https://github.com/microsoft/msbuild + e8338f5ad91d42c3196218648859e9e837099842 + + + https://github.com/microsoft/msbuild + e8338f5ad91d42c3196218648859e9e837099842 + +<<<<<<< HEAD + + https://github.com/dotnet/fsharp + 9abe1ba94b260429e5d055f1cc1b9e2a83fddf30 +======= + + https://github.com/dotnet/fsharp + 494e1dca147f0454b4627bfce625148e7815d81e +>>>>>>> master + + + https://github.com/dotnet/roslyn + fc5f6179a2521062cb61d44d0e41e1ef596907d9 + + + https://github.com/dotnet/aspnetcore + 3a819929a7fb969ac260d55c003944d1d9dbac27 + + + https://github.com/dotnet/aspnetcore + 3a819929a7fb969ac260d55c003944d1d9dbac27 + +<<<<<<< HEAD +======= + + https://github.com/dotnet/aspnetcore + 3a819929a7fb969ac260d55c003944d1d9dbac27 + +>>>>>>> master + + https://github.com/NuGet/NuGet.Client + d428c2a79aae81ade1caa326e04f65a119025f42 + + + https://github.com/microsoft/vstest + df62aca07cacc5c018dc8e828f03a0cd79ee52da + + + https://github.com/mono/linker + 8224c7254fc4aa5da70bb7d2e0d1c55bca1e19bf + + + https://github.com/dotnet/runtime + d8cf13e0ba9b369a15a83472b6b97463c6d07fe2 + + + https://github.com/dotnet/runtime + d8cf13e0ba9b369a15a83472b6b97463c6d07fe2 + + + https://github.com/dotnet/runtime + d8cf13e0ba9b369a15a83472b6b97463c6d07fe2 + + + https://github.com/dotnet/runtime + d8cf13e0ba9b369a15a83472b6b97463c6d07fe2 + + + https://github.com/dotnet/windowsdesktop + e0c53c38b065bb6b88e280adc142060c53356795 + + + https://github.com/dotnet/wpf + 917538415b23b55ae220bd993a5951c7cfb27d08 + + + https://github.com/dotnet/aspnetcore + 3a819929a7fb969ac260d55c003944d1d9dbac27 + + + https://github.com/dotnet/aspnetcore + 3a819929a7fb969ac260d55c003944d1d9dbac27 + + + https://github.com/dotnet/aspnetcore + 3a819929a7fb969ac260d55c003944d1d9dbac27 + + + https://github.com/dotnet/aspnetcore + 3a819929a7fb969ac260d55c003944d1d9dbac27 + + + https://github.com/aspnet/xdt + c01a538851a8ab1a1fbeb2e6243f391fff7587b4 + + + https://github.com/dotnet/roslyn-analyzers + 59425baad150d854245a8498140caf115d4807d9 + + + + + https://github.com/dotnet/arcade + ff5d4b6c8dbdaeacb6e6159d3f8185118dffd915 + + + https://github.com/dotnet/arcade + ff5d4b6c8dbdaeacb6e6159d3f8185118dffd915 + + + https://github.com/dotnet/arcade + ff5d4b6c8dbdaeacb6e6159d3f8185118dffd915 + + + diff --git a/eng/Versions.props.orig b/eng/Versions.props.orig new file mode 100644 index 000000000000..a446b62b59b2 --- /dev/null +++ b/eng/Versions.props.orig @@ -0,0 +1,157 @@ + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + + true + + + + 5.0.100 + rc + 1 + + + + 15.4.8 + 15.4.8 + 15.4.8 + 2.1.0-preview2-26306-03 + 2.0.0 + 2.0.1-servicing-26011-01 + 11.0.1 + $(NewtonsoftJsonPackageVersion) + 4.0.0 + 1.8.0 + 5.0.0-beta.20364.3 + 3.1.0 + 5.0.0-rc.1.20371.13 + 4.3.0 + 4.3.0 + 4.0.5 + 4.7.2 + + + + 5.0.0-rc.1.20371.13 + 5.0.0-rc.1.20371.13 + $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) + 5.0.0-rc.1.20371.13 + 5.0.0-rc.1.20371.13 + 5.0.0-rc.1.20371.13 + $(MicrosoftExtensionsDependencyModelPackageVersion) + + + + 5.8.0-preview.1.6718 + $(NuGetBuildTasksPackageVersion) + $(NuGetBuildTasksPackageVersion) + $(NuGetBuildTasksPackageVersion) + $(NuGetBuildTasksPackageVersion) + $(NuGetBuildTasksPackageVersion) + $(NuGetBuildTasksPackageVersion) + $(NuGetBuildTasksPackageVersion) + $(NuGetBuildTasksPackageVersion) + $(NuGetBuildTasksPackageVersion) + $(NuGetBuildTasksPackageVersion) + $(NuGetPackagingPackageVersion) + $(NuGetProjectModelPackageVersion) + + + + 16.7.0-release-20200612-02 + $(MicrosoftNETTestSdkPackageVersion) + $(MicrosoftNETTestSdkPackageVersion) + + + + 5.0.0-preview.3.20374.1 + + + + 5.0.0-rc.1.20371.13 + 5.0.0-rc.1.20371.13 + 5.0.0-preview.7.20307.4 + 5.0.0-rc.1.20371.13 + + + + 3.3.0-beta3.20373.3 + + + + 16.8.0-preview-20371-01 + $(MicrosoftBuildPackageVersion) + $(MicrosoftBuildPackageVersion) + 16.8.0-preview-20371-01 + $(MicrosoftBuildPackageVersion) + $(MicrosoftBuildPackageVersion) + $(MicrosoftBuildFrameworkPackageVersion) + $(MicrosoftBuildUtilitiesCorePackageVersion) + + + + 1.0.0-preview.19208.1 + + + + 5.0.0-rc.1.20371.1 + $(MicrosoftTemplateEngineCliPackageVersion) + $(MicrosoftTemplateEngineCliPackageVersion) + $(MicrosoftTemplateEngineCliPackageVersion) + $(MicrosoftTemplateEngineCliPackageVersion) + $(MicrosoftTemplateEngineCliPackageVersion) + + + +<<<<<<< HEAD + 11.0.0-beta.20375.2 +======= + 11.0.0-beta.20373.2 +>>>>>>> master + + + + 3.8.0-1.20373.6 + + + + 5.0.0-rc.1.20374.1 + 5.0.0-rc.1.20374.1 + 5.0.0-rc.1.20374.1 + 5.0.0-rc.1.20374.1 + 5.0.0-rc.1.20374.1 + 5.0.0-rc.1.20374.1 + 5.0.0-rc.1.20374.1 + + + + 5.0.0-rc.1.20372.2 + + + + 5.0.0-rc.1.20372.3 + + + + true + + + + 4.19.2 + 4.19.0 + 5.0.0-beta.20364.3 + + + .exe + + + <_DotNetHiveRoot>$(DOTNET_INSTALL_DIR) + <_DotNetHiveRoot Condition="'$(_DotNetHiveRoot)' == ''">$(RepoRoot).dotnet/ + <_DotNetHiveRoot Condition="!HasTrailingSlash('$(_DotNetHiveRoot)')">$(_DotNetHiveRoot)/ + $(_DotNetHiveRoot)dotnet$(ExeExtension) + + diff --git a/eng/build.yml b/eng/build.yml index 4d8274a3c1c1..545d16f4d243 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -36,7 +36,8 @@ jobs: - _OfficialBuildIdArgs: '' - _PublishArgs: '' - _SignArgs: '' - - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - _InternalRuntimeDownloadArgs: '' + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - group: DotNet-Symbol-Server-PATs - group: DotNet-HelixApi-Access - group: dotnet-benchview @@ -52,7 +53,21 @@ jobs: /p:PublishToAzure=$(_PublishToAzure) - _SignArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) - _PerfIterations: 25 + + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - group: DotNet-MSRC-Storage + - name: _InternalRuntimeDownloadArgs + value: /p:DotNetRuntimeSourceFeed=https://dotnetclimsrc.blob.core.windows.net/dotnet + /p:DotNetRuntimeSourceFeedKey=$(dotnetclimsrc-read-sas-token-base64) steps: + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - task: PowerShell@2 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - script: eng\CIBuild.cmd -configuration $(_BuildConfig) @@ -60,6 +75,7 @@ jobs: $(_SignArgs) $(_OfficialBuildIdArgs) $(_Test) + $(_InternalRuntimeDownloadArgs) displayName: Build env: BuildConfig: $(_BuildConfig) @@ -88,6 +104,7 @@ jobs: $(_SignArgs) $(_OfficialBuildIdArgs) $(_Test) + $(_InternalRuntimeDownloadArgs) displayName: Build env: BuildConfig: $(_BuildConfig) @@ -118,6 +135,7 @@ jobs: $(_SignArgs) $(_OfficialBuildIdArgs) $(_Test) + $(_InternalRuntimeDownloadArgs) /p:RunTestsAsTool=true displayName: Build env: @@ -131,6 +149,7 @@ jobs: $(_PublishArgs) $(_SignArgs) $(_OfficialBuildIdArgs) + $(_InternalRuntimeDownloadArgs) displayName: Build env: BuildConfig: $(_BuildConfig) diff --git a/eng/restore-toolset.ps1 b/eng/restore-toolset.ps1 index 38854e4dc10a..353b2d817ae3 100644 --- a/eng/restore-toolset.ps1 +++ b/eng/restore-toolset.ps1 @@ -1,6 +1,6 @@ function InitializeCustomSDKToolset { if ($env:TestFullMSBuild -eq "true") { - $env:DOTNET_SDK_TEST_MSBUILD_PATH = InitializeVisualStudioMSBuild -install:$false -vsRequirements:$GlobalJson.tools.'vs-opt' + $env:DOTNET_SDK_TEST_MSBUILD_PATH = InitializeVisualStudioMSBuild -install:$true -vsRequirements:$GlobalJson.tools.'vs-opt' Write-Host "INFO: Tests will run against full MSBuild in $env:DOTNET_SDK_TEST_MSBUILD_PATH" } diff --git a/global.json b/global.json index 7538e2e725c6..295d0a1010dd 100644 --- a/global.json +++ b/global.json @@ -7,8 +7,9 @@ ] }, "vs-opt": { - "version": "15.9" - } + "version": "16.8" + }, + "xcopy-msbuild": "16.8.0-preview1" }, "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20364.3", diff --git a/src/Assets/TestProjects/TestAppWithLaunchSettings/Program.cs b/src/Assets/TestProjects/TestAppWithLaunchSettings/Program.cs new file mode 100644 index 000000000000..6292216dd517 --- /dev/null +++ b/src/Assets/TestProjects/TestAppWithLaunchSettings/Program.cs @@ -0,0 +1,16 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +namespace ConsoleApplication +{ + public class Program + { + public static void Main(string[] args) + { + Console.WriteLine("Hello world"); + Console.WriteLine($"MyCoolEnvironmentVariableKey={Environment.GetEnvironmentVariable("MyCoolEnvironmentVariableKey")}"); + } + } +} diff --git a/src/Assets/TestProjects/TestAppWithLaunchSettings/Properties/launchSettings.json b/src/Assets/TestProjects/TestAppWithLaunchSettings/Properties/launchSettings.json new file mode 100644 index 000000000000..d9381bec04f0 --- /dev/null +++ b/src/Assets/TestProjects/TestAppWithLaunchSettings/Properties/launchSettings.json @@ -0,0 +1,11 @@ +{ + "profiles": { + "TestAppWithLaunchSettings": { + "commandName": "Project", + "dotnetRunMessages": "true", + "environmentVariables": { + "MyCoolEnvironmentVariableKey": "MyCoolEnvironmentVariableValue" + } + } + } +} \ No newline at end of file diff --git a/src/Assets/TestProjects/TestAppWithLaunchSettings/TestAppWithLaunchSettings.csproj b/src/Assets/TestProjects/TestAppWithLaunchSettings/TestAppWithLaunchSettings.csproj new file mode 100644 index 000000000000..1319a1bcba1f --- /dev/null +++ b/src/Assets/TestProjects/TestAppWithLaunchSettings/TestAppWithLaunchSettings.csproj @@ -0,0 +1,8 @@ + + + + + netcoreapp3.0 + Exe + + \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/ILaunchSettingsProvider.cs b/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/ILaunchSettingsProvider.cs index 681daee24a98..0b0e8bdc108d 100644 --- a/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/ILaunchSettingsProvider.cs +++ b/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/ILaunchSettingsProvider.cs @@ -5,9 +5,7 @@ namespace Microsoft.DotNet.Tools.Run.LaunchSettings { internal interface ILaunchSettingsProvider { - string CommandName { get; } - - LaunchSettingsApplyResult TryApplySettings(JsonElement model, ref ICommand command); + LaunchSettingsApplyResult TryGetLaunchSettings(JsonElement model); } } diff --git a/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/LaunchSettingsApplyResult.cs b/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/LaunchSettingsApplyResult.cs index 04b9dca3be3b..983faa214605 100644 --- a/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/LaunchSettingsApplyResult.cs +++ b/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/LaunchSettingsApplyResult.cs @@ -1,18 +1,21 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + namespace Microsoft.DotNet.Tools.Run.LaunchSettings { public class LaunchSettingsApplyResult { - public LaunchSettingsApplyResult(bool success, string failureReason, string runAfterLaunch = null) + public LaunchSettingsApplyResult(bool success, string failureReason, ProjectLaunchSettingsModel launchSettings = null) { Success = success; FailureReason = failureReason; - RunAfterLaunch = runAfterLaunch; + LaunchSettings = launchSettings; } public bool Success { get; } public string FailureReason { get; } - public string RunAfterLaunch { get; } + public ProjectLaunchSettingsModel LaunchSettings { get; } } } diff --git a/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/LaunchSettingsManager.cs b/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/LaunchSettingsManager.cs index d8f4b5f3c276..1b7bd802c76a 100644 --- a/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/LaunchSettingsManager.cs +++ b/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/LaunchSettingsManager.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; using System.Collections.Generic; using System.Linq; using System.Text.Json; @@ -21,7 +24,7 @@ static LaunchSettingsManager() }; } - public static LaunchSettingsApplyResult TryApplyLaunchSettings(string launchSettingsJsonContents, ref ICommand command, string profileName = null) + public static LaunchSettingsApplyResult TryApplyLaunchSettings(string launchSettingsJsonContents, string profileName = null) { try { @@ -90,7 +93,7 @@ public static LaunchSettingsApplyResult TryApplyLaunchSettings(string launchSett return new LaunchSettingsApplyResult(false, string.Format(LocalizableStrings.LaunchProfileHandlerCannotBeLocated, commandName)); } - return provider.TryApplySettings(profileObject, ref command); + return provider.TryGetLaunchSettings(profileObject); } } catch (JsonException ex) diff --git a/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/ProjectLaunchSettingsModel.cs b/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/ProjectLaunchSettingsModel.cs new file mode 100644 index 000000000000..df50d702ba90 --- /dev/null +++ b/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/ProjectLaunchSettingsModel.cs @@ -0,0 +1,23 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Collections.Generic; + +namespace Microsoft.DotNet.Tools.Run.LaunchSettings +{ + public class ProjectLaunchSettingsModel + { + public string CommandLineArgs { get; set; } + + public bool LaunchBrowser { get; set; } + + public string LaunchUrl { get; set; } + + public string ApplicationUrl { get; set; } + + public string DotNetRunMessages { get; set; } + + public Dictionary EnvironmentVariables { get; } = new Dictionary(StringComparer.Ordinal); + } +} diff --git a/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/ProjectLaunchSettingsProvider.cs b/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/ProjectLaunchSettingsProvider.cs index 52f86b4db845..e93e01c17be2 100644 --- a/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/ProjectLaunchSettingsProvider.cs +++ b/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/ProjectLaunchSettingsProvider.cs @@ -1,7 +1,8 @@ -using System; -using System.Collections.Generic; +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; using System.Text.Json; -using Microsoft.DotNet.Cli.Utils; namespace Microsoft.DotNet.Tools.Run.LaunchSettings { @@ -11,7 +12,7 @@ internal class ProjectLaunchSettingsProvider : ILaunchSettingsProvider public string CommandName => CommandNameValue; - public LaunchSettingsApplyResult TryApplySettings(JsonElement model, ref ICommand command) + public LaunchSettingsApplyResult TryGetLaunchSettings(JsonElement model) { var config = new ProjectLaunchSettingsModel(); foreach (var property in model.EnumerateObject()) @@ -52,6 +53,15 @@ public LaunchSettingsApplyResult TryApplySettings(JsonElement model, ref IComman config.ApplicationUrl = applicationUrlValue; } + else if (string.Equals(property.Name, nameof(ProjectLaunchSettingsModel.DotNetRunMessages), StringComparison.OrdinalIgnoreCase)) + { + if (!TryGetStringValue(property.Value, out var dotNetRunMessages)) + { + return new LaunchSettingsApplyResult(false, string.Format(LocalizableStrings.CouldNotConvertToString, property.Name)); + } + + config.DotNetRunMessages = dotNetRunMessages; + } else if (string.Equals(property.Name, nameof(ProjectLaunchSettingsModel.EnvironmentVariables), StringComparison.OrdinalIgnoreCase)) { if (property.Value.ValueKind != JsonValueKind.Object) @@ -59,7 +69,7 @@ public LaunchSettingsApplyResult TryApplySettings(JsonElement model, ref IComman return new LaunchSettingsApplyResult(false, string.Format(LocalizableStrings.ValueMustBeAnObject, property.Name)); } - foreach(var environmentVariable in property.Value.EnumerateObject()) + foreach (var environmentVariable in property.Value.EnumerateObject()) { if (TryGetStringValue(environmentVariable.Value, out var environmentVariableValue)) { @@ -69,21 +79,7 @@ public LaunchSettingsApplyResult TryApplySettings(JsonElement model, ref IComman } } - if (!string.IsNullOrEmpty(config.ApplicationUrl)) - { - command.EnvironmentVariable("ASPNETCORE_URLS", config.ApplicationUrl); - } - - //For now, ignore everything but the environment variables section - - foreach (var entry in config.EnvironmentVariables) - { - string value = Environment.ExpandEnvironmentVariables(entry.Value); - //NOTE: MSBuild variables are not expanded like they are in VS - command.EnvironmentVariable(entry.Key, value); - } - - return new LaunchSettingsApplyResult(true, null, config.LaunchUrl); + return new LaunchSettingsApplyResult(true, null, config); } private static bool TryGetBooleanValue(JsonElement element, out bool value) @@ -136,23 +132,5 @@ private static bool TryGetStringValue(JsonElement element, out string value) return false; } } - - private class ProjectLaunchSettingsModel - { - public ProjectLaunchSettingsModel() - { - EnvironmentVariables = new Dictionary(StringComparer.Ordinal); - } - - public string CommandLineArgs { get; set; } - - public bool LaunchBrowser { get; set; } - - public string LaunchUrl { get; set; } - - public string ApplicationUrl { get; set; } - - public Dictionary EnvironmentVariables { get; } - } } } diff --git a/src/Cli/dotnet/commands/dotnet-run/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-run/LocalizableStrings.resx index 24c591290b4d..59f9d4b94494 100644 --- a/src/Cli/dotnet/commands/dotnet-run/LocalizableStrings.resx +++ b/src/Cli/dotnet/commands/dotnet-run/LocalizableStrings.resx @@ -147,6 +147,9 @@ The target runtime to run for. + + Building... + The build failed. Fix the build errors and run again. @@ -214,4 +217,4 @@ The current {1} is '{2}'. The property '{0}' must be an object if it is specified. - \ No newline at end of file + diff --git a/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs b/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs index 1bd02d65e6b5..7c54dc4cbfd6 100644 --- a/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs @@ -8,8 +8,6 @@ using Microsoft.Build.Execution; using Microsoft.Build.Exceptions; using Microsoft.DotNet.Cli.Utils; -using Microsoft.DotNet.Tools; -using Microsoft.DotNet.Tools.MSBuild; using Microsoft.DotNet.Tools.Run.LaunchSettings; using Microsoft.DotNet.CommandFactory; @@ -41,17 +39,37 @@ public int Execute() { Initialize(); + if (!TryGetLaunchProfileSettingsIfNeeded(out var launchSettings)) + { + return 1; + } + if (ShouldBuild) { + if (string.Equals("true", launchSettings?.DotNetRunMessages, StringComparison.OrdinalIgnoreCase)) + { + Reporter.Output.WriteLine(LocalizableStrings.RunCommandBuilding); + } + EnsureProjectIsBuilt(); } try { ICommand targetCommand = GetTargetCommand(); - if (!ApplyLaunchProfileSettingsIfNeeded(ref targetCommand)) + if (launchSettings != null) { - return 1; + if (!string.IsNullOrEmpty(launchSettings.ApplicationUrl)) + { + targetCommand.EnvironmentVariable("ASPNETCORE_URLS", launchSettings.ApplicationUrl); + } + + foreach (var entry in launchSettings.EnvironmentVariables) + { + string value = Environment.ExpandEnvironmentVariables(entry.Value); + //NOTE: MSBuild variables are not expanded like they are in VS + targetCommand.EnvironmentVariable(entry.Key, value); + } } // Ignore Ctrl-C for the remainder of the command's execution @@ -92,8 +110,9 @@ public RunCommand(string configuration, Interactive = interactive; } - private bool ApplyLaunchProfileSettingsIfNeeded(ref ICommand targetCommand) + private bool TryGetLaunchProfileSettingsIfNeeded(out ProjectLaunchSettingsModel launchSettingsModel) { + launchSettingsModel = default; if (!UseLaunchProfile) { return true; @@ -117,7 +136,8 @@ private bool ApplyLaunchProfileSettingsIfNeeded(ref ICommand targetCommand) if (File.Exists(launchSettingsPath)) { - if (!HasQuietVerbosity) { + if (!HasQuietVerbosity) + { Reporter.Output.WriteLine(string.Format(LocalizableStrings.UsingLaunchSettingsFromMessage, launchSettingsPath)); } @@ -126,11 +146,15 @@ private bool ApplyLaunchProfileSettingsIfNeeded(ref ICommand targetCommand) try { var launchSettingsFileContents = File.ReadAllText(launchSettingsPath); - var applyResult = LaunchSettingsManager.TryApplyLaunchSettings(launchSettingsFileContents, ref targetCommand, LaunchProfile); + var applyResult = LaunchSettingsManager.TryApplyLaunchSettings(launchSettingsFileContents, LaunchProfile); if (!applyResult.Success) { Reporter.Error.WriteLine(string.Format(LocalizableStrings.RunCommandExceptionCouldNotApplyLaunchSettings, profileName, applyResult.FailureReason).Bold().Red()); } + else + { + launchSettingsModel = applyResult.LaunchSettings; + } } catch (IOException ex) { @@ -155,7 +179,7 @@ private void EnsureProjectIsBuilt() new RestoringCommand( restoreArgs.Prepend(Project), restoreArgs, - new [] { Project }, + new[] { Project }, NoRestore ).Execute(); diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf index 3d4b5a0bfbbd..4db4cc36cc5b 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf @@ -32,6 +32,11 @@ Hodnotu vlastnosti {0} nejde převést na řetězec. + + Building... + Building... + + The build failed. Fix the build errors and run again. Sestavení se nepovedlo. Opravte v sestavení chyby a spusťte ho znovu. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf index 894850a8306a..44fd789c877d 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf @@ -32,6 +32,11 @@ Der Wert der Eigenschaft "{0}" konnte nicht in eine Zeichenfolge konvertiert werden. + + Building... + Building... + + The build failed. Fix the build errors and run again. Fehler beim Buildvorgang. Beheben Sie die Buildfehler, und versuchen Sie es anschließend noch mal. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf index b0f5cfd3adc8..3fdd4adb282c 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf @@ -32,6 +32,11 @@ No se pudo convertir el valor de la propiedad "{0}" en una cadena. + + Building... + Building... + + The build failed. Fix the build errors and run again. No se pudo llevar a cabo la compilación. Corrija los errores de compilación y vuelva a ejecutar el proyecto. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf index efd4b5464273..454b69ba74b0 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf @@ -32,6 +32,11 @@ Impossible de convertir la valeur de la propriété '{0}' en chaîne. + + Building... + Building... + + The build failed. Fix the build errors and run again. La build a échoué. Corrigez les erreurs de la build et réexécutez-la. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf index a50fd3663ea2..a6c18ea6b1f6 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf @@ -32,6 +32,11 @@ Non è stato possibile convertire il valore della proprietà '{0}' in una stringa. + + Building... + Building... + + The build failed. Fix the build errors and run again. La compilazione non è riuscita. Correggere gli errori di compilazione e ripetere l'esecuzione. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf index f43c361d0475..39c8e8d6632c 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf @@ -32,6 +32,11 @@ プロパティ '{0}' の値を文字列に変換できませんでした。 + + Building... + Building... + + The build failed. Fix the build errors and run again. ビルドに失敗しました。ビルド エラーを修正して、もう一度実行してください。 diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf index 0a141e6b14b1..6bce6cdf9a98 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf @@ -32,6 +32,11 @@ '{0}' 속성 값을 문자열로 변환할 수 없습니다. + + Building... + Building... + + The build failed. Fix the build errors and run again. 빌드하지 못했습니다. 빌드 오류를 수정하고 다시 실행하세요. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf index 1f196db2c3ea..f7d703ccba64 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf @@ -32,6 +32,11 @@ Nie można przekonwertować wartości właściwości „{0}” na ciąg. + + Building... + Building... + + The build failed. Fix the build errors and run again. Kompilacja nie powiodła się. Napraw błędy kompilacji i uruchom ją ponownie. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf index eaf3313d4271..c2ad38c4d521 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf @@ -32,6 +32,11 @@ Não foi possível converter o valor da propriedade '{0}' em uma cadeia de caracteres. + + Building... + Building... + + The build failed. Fix the build errors and run again. Ocorreu uma falha no build. Corrija os erros de build e execute novamente. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf index ae48a6218aa2..3aad37723a9a 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf @@ -32,6 +32,11 @@ Не удалось преобразовать значение свойства "{0}" в строку. + + Building... + Building... + + The build failed. Fix the build errors and run again. Ошибка сборки. Устраните ошибки сборки и повторите попытку. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf index b15f6a6ec8d8..eac14f47d350 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf @@ -32,6 +32,11 @@ '{0}' özelliğinin değeri dizeye dönüştürülemedi. + + Building... + Building... + + The build failed. Fix the build errors and run again. Derleme başarısız oldu. Derleme hatalarını düzeltip yeniden çalıştırın. diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf index d29d59941f4a..a53e764a4d99 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf @@ -32,6 +32,11 @@ 无法将属性“{0}”的值转换为字符串。 + + Building... + Building... + + The build failed. Fix the build errors and run again. 生成失败。请修复生成错误并重新运行。 diff --git a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf index 1e96ecaa985e..c3a6053a9615 100644 --- a/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf @@ -32,6 +32,11 @@ 無法將屬性 '{0}' 的值轉換為字串。 + + Building... + Building... + + The build failed. Fix the build errors and run again. 建置失敗。請修正建置錯誤後,再執行一次。 diff --git a/src/Layout/redist/minimumMSBuildVersion b/src/Layout/redist/minimumMSBuildVersion index 2e4239c31313..93eef160e899 100644 --- a/src/Layout/redist/minimumMSBuildVersion +++ b/src/Layout/redist/minimumMSBuildVersion @@ -1 +1 @@ -16.7.0 +16.8.0 diff --git a/src/Layout/redist/minimumMSBuildVersion.orig b/src/Layout/redist/minimumMSBuildVersion.orig new file mode 100644 index 000000000000..ac67ff5f7a27 --- /dev/null +++ b/src/Layout/redist/minimumMSBuildVersion.orig @@ -0,0 +1,5 @@ +<<<<<<< HEAD +16.8.0 +======= +16.7.0 +>>>>>>> master diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index e6c8dc85e9a4..66ac8f2da9d2 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -653,4 +653,13 @@ The following are names of parameters or literal values and should not be transl NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. {StrBegin="NETSDK1137: "} + + NETSDK1138: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1138: "} + + + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + {StrBegin="NETSDK1139: "} + diff --git a/src/Tasks/Common/Resources/Strings.resx.orig b/src/Tasks/Common/Resources/Strings.resx.orig new file mode 100644 index 000000000000..29e3c00138ba --- /dev/null +++ b/src/Tasks/Common/Resources/Strings.resx.orig @@ -0,0 +1,666 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + NETSDK1001: At least one possible target framework must be specified. + {StrBegin="NETSDK1001: "} + + + NETSDK1002: Project '{0}' targets '{2}'. It cannot be referenced by a project that targets '{1}'. + {StrBegin="NETSDK1002: "} + + + NETSDK1003: Invalid framework name: '{0}'. + {StrBegin="NETSDK1003: "} + + + NETSDK1004: Assets file '{0}' not found. Run a NuGet package restore to generate this file. + {StrBegin="NETSDK1004: "} + + + NETSDK1005: Assets file '{0}' doesn't have a target for '{1}'. Ensure that restore has run and that you have included '{2}' in the TargetFrameworks for your project. + {StrBegin="NETSDK1005: "} + + + NETSDK1006: Assets file path '{0}' is not rooted. Only full paths are supported. + {StrBegin="NETSDK1006: "} + + + NETSDK1007: Cannot find project info for '{0}'. This can indicate a missing project reference. + {StrBegin="NETSDK1007: "} + + + NETSDK1008: Missing '{0}' metadata on '{1}' item '{2}'. + {StrBegin="NETSDK1008: "} + + + NETSDK1009: Unrecognized preprocessor token '{0}' in '{1}'. + {StrBegin="NETSDK1009: "} + + + NETSDK1010: The '{0}' task must be given a value for parameter '{1}' in order to consume preprocessed content. + {StrBegin="NETSDK1010: "} + + + NETSDK1011: Assets are consumed from project '{0}', but no corresponding MSBuild project path was found in '{1}'. + {StrBegin="NETSDK1011: "} + + + NETSDK1012: Unexpected file type for '{0}'. Type is both '{1}' and '{2}'. + {StrBegin="NETSDK1012: "} + + + NETSDK1013: The TargetFramework value '{0}' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. + {StrBegin="NETSDK1013: "} + + + NETSDK1014: Content item for '{0}' sets '{1}', but does not provide '{2}' or '{3}'. + {StrBegin="NETSDK1014: "} + + + NETSDK1015: The preprocessor token '{0}' has been given more than one value. Choosing '{1}' as the value. + {StrBegin="NETSDK1015: "} + + + NETSDK1016: Unable to find resolved path for '{0}'. + {StrBegin="NETSDK1016: "} + + + NETSDK1017: Asset preprocessor must be configured before assets are processed. + {StrBegin="NETSDK1017: "} + + + NETSDK1018: Invalid NuGet version string: '{0}'. + {StrBegin="NETSDK1018: "} + + + NETSDK1019: {0} is an unsupported framework. + {StrBegin="NETSDK1019: "} + + + NETSDK1020: Package Root {0} was incorrectly given for Resolved library {1} + {StrBegin="NETSDK1020: "} + + + NETSDK1021: More than one file found for {0} + {StrBegin="NETSDK1021: "} + + + NETSDK1022: Duplicate '{0}' items were included. The .NET SDK includes '{0}' items from your project directory by default. You can either remove these items from your project file, or set the '{1}' property to '{2}' if you want to explicitly include them in your project file. For more information, see {4}. The duplicate items were: {3} + {StrBegin="NETSDK1022: "} + + + NETSDK1023: A PackageReference for '{0}' was included in your project. This package is implicitly referenced by the .NET SDK and you do not typically need to reference it from your project. For more information, see {1} + {StrBegin="NETSDK1023: "} + + + NETSDK1024: Folder '{0}' already exists either delete it or provide a different ComposeWorkingDir + {StrBegin="NETSDK1024: "} + + + NETSDK1025: The target manifest {0} provided is of not the correct format + {StrBegin="NETSDK1025: "} + + + NETSDK1028: Specify a RuntimeIdentifier + {StrBegin="NETSDK1028: "} + + + NETSDK1029: Unable to use '{0}' as application host executable as it does not contain the expected placeholder byte sequence '{1}' that would mark where the application name would be written. + {StrBegin="NETSDK1029: "} + + + NETSDK1030: Given file name '{0}' is longer than 1024 bytes + {StrBegin="NETSDK1030: "} + + + NETSDK1031: It is not supported to build or publish a self-contained application without specifying a RuntimeIdentifier. You must either specify a RuntimeIdentifier or set SelfContained to false. + {StrBegin="NETSDK1031: "} + + + NETSDK1032: The RuntimeIdentifier platform '{0}' and the PlatformTarget '{1}' must be compatible. + {StrBegin="NETSDK1032: "} + + + Choosing '{0}' because AssemblyVersion '{1}' is greater than '{2}'. + + + Choosing '{0}' because file version '{1}' is greater than '{2}'. + + + Choosing '{0}' because it is a platform item. + + + Choosing '{0}' because it comes from a package that is preferred. + + + Choosing '{0}' arbitrarily as both items are copy-local and have equal file and assembly versions. + + + Could not determine winner due to equal file and assembly versions. + + + Could not determine winner because '{0}' does not exist. + + + Could not determine a winner because '{0}' has no file version. + + + Could not determine a winner because '{0}' is not an assembly. + + + Encountered conflict between '{0}' and '{1}'. + + + NETSDK1042: Could not load PlatformManifest from '{0}' because it did not exist. + {StrBegin="NETSDK1042: "} + + + NETSDK1043: Error parsing PlatformManifest from '{0}' line {1}. Lines must have the format {2}. + {StrBegin="NETSDK1043: "} + + + NETSDK1044: Error parsing PlatformManifest from '{0}' line {1}. {2} '{3}' was invalid. + {StrBegin="NETSDK1044: "} + + + NETSDK1045: The current .NET SDK does not support targeting {0} {1}. Either target {0} {2} or lower, or use a version of the .NET SDK that supports {0} {1}. + {StrBegin="NETSDK1045: "} + + + NETSDK1046: The TargetFramework value '{0}' is not valid. To multi-target, use the 'TargetFrameworks' property instead. + {StrBegin="NETSDK1046: "} + + + NETSDK1047: Assets file '{0}' doesn't have a target for '{1}'. Ensure that restore has run and that you have included '{2}' in the TargetFrameworks for your project. You may also need to include '{3}' in your project's RuntimeIdentifiers. + {StrBegin="NETSDK1047: "} + + + NETSDK1048: 'AdditionalProbingPaths' were specified for GenerateRuntimeConfigurationFiles, but are being skipped because 'RuntimeConfigDevPath' is empty. + {StrBegin="NETSDK1048: "} + + + NETSDK1049: Resolved file has a bad image, no metadata, or is otherwise inaccessible. {0} {1} + {StrBegin="NETSDK1049: "} + + + NETSDK1050: The version of Microsoft.NET.Sdk used by this project is insufficient to support references to libraries targeting .NET Standard 1.5 or higher. Please install version 2.0 or higher of the .NET Core SDK. + {StrBegin="NETSDK1050: "} + + + NETSDK1051: Error parsing FrameworkList from '{0}'. {1} '{2}' was invalid. + {StrBegin="NETSDK1051: "} + + + NETSDK1052: Framework list file path '{0}' is not rooted. Only full paths are supported. + {StrBegin="NETSDK1052: "} + + + NETSDK1053: Pack as tool does not support self contained. + {StrBegin="NETSDK1053: "} + + + NETSDK1054: only supports .NET Core. + {StrBegin="NETSDK1054: "} + + + NETSDK1055: DotnetTool does not support target framework lower than netcoreapp2.1. + {StrBegin="NETSDK1055: "} + + + NETSDK1056: Project is targeting runtime '{0}' but did not resolve any runtime-specific packages. This runtime may not be supported by the target framework. + {StrBegin="NETSDK1056: "} + + + You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview + + + NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' + {StrBegin="NETSDK1058: "} +The following are names of parameters or literal values and should not be translated: ItemSpecToUse, Left, Right + + + NETSDK1059: The tool '{0}' is now included in the .NET SDK. Information on resolving this warning is available at (https://aka.ms/dotnetclitools-in-box). + {StrBegin="NETSDK1059: "} + + + NETSDK1060: Error reading assets file: {0} + {StrBegin="NETSDK1060: "} + + + NETSDK1061: The project was restored using {0} version {1}, but with current settings, version {2} would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection. + {StrBegin="NETSDK1061: "} +{0} - Package Identifier for platform package +{1} - Restored version of platform package +{2} - Current version of platform package + + + Unable to use package assets cache due to I/O error. This can occur when the same project is built more than once in parallel. Performance may be degraded, but the build result will not be impacted. + + + NETSDK1063: The path to the project assets file was not set. Run a NuGet package restore to generate this file. + {StrBegin="NETSDK1063: "} + + + NETSDK1064: Package {0}, version {1} was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions. + {StrBegin="NETSDK1064: "} + + + NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog. + {StrBegin="NETSDK1065: "} + + + NETSDK1067: Self-contained applications are required to use the application host. Either set SelfContained to false or set UseAppHost to true. + {StrBegin="NETSDK1067: "} + + + NETSDK1068: The framework-dependent application host requires a target framework of at least 'netcoreapp2.1'. + {StrBegin="NETSDK1068: "} + + + NETSDK1069: This project uses a library that targets .NET Standard 1.5 or higher, and the project targets a version of .NET Framework that doesn't have built-in support for that version of .NET Standard. Visit https://aka.ms/net-standard-known-issues for a set of known issues. Consider retargeting to .NET Framework 4.7.2. + {StrBegin="NETSDK1069: "} + + + NETSDK1070: The application configuration file must have root configuration element. + {StrBegin="NETSDK1070: "} + + + NETSDK1071: A PackageReference to '{0}' specified a Version of `{1}`. Specifying the version of this package is not recommended. For more information, see https://aka.ms/sdkimplicitrefs + {StrBegin="NETSDK1071: "} + + + NETSDK1072: Unable to use '{0}' as application host executable because it's not a Windows executable for the CUI (Console) subsystem. + {StrBegin="NETSDK1072: "} + + + NETSDK1073: The FrameworkReference '{0}' was not recognized + {StrBegin="NETSDK1073: "} + + + NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows (excluding Nano Server). + {StrBegin="NETSDK1074: "} + + + NETSDK1075: Update handle is invalid. This instance may not be used for further updates. + {StrBegin="NETSDK1075: "} + + + NETSDK1076: AddResource can only be used with integer resource types. + {StrBegin="NETSDK1076: "} + + + NETSDK1077: Failed to lock resource. + {StrBegin="NETSDK1077: "} + + + NETSDK1078: Unable to use '{0}' as application host executable because it's not a Windows PE file. + {StrBegin="NETSDK1078: "} + + + NETSDK1079: The Microsoft.AspNetCore.All package is not supported when targeting .NET Core 3.0 or higher. A FrameworkReference to Microsoft.AspNetCore.App should be used instead, and will be implicitly included by Microsoft.NET.Sdk.Web. + {StrBegin="NETSDK1079: "} + + + NETSDK1080: A PackageReference to Microsoft.AspNetCore.App is not necessary when targeting .NET Core 3.0 or higher. If Microsoft.NET.Sdk.Web is used, the shared framework will be referenced automatically. Otherwise, the PackageReference should be replaced with a FrameworkReference. + {StrBegin="NETSDK1080: "} + + + NETSDK1081: The targeting pack for {0} was not found. You may be able to resolve this by running a NuGet restore on the project. + {StrBegin="NETSDK1081: "} + + + NETSDK1082: There was no runtime pack for {0} available for the specified RuntimeIdentifier '{1}'. + {StrBegin="NETSDK1082: "} + + + NETSDK1083: The specified RuntimeIdentifier '{0}' is not recognized. + {StrBegin="NETSDK1083: "} + + + NETSDK1084: There is no application host available for the specified RuntimeIdentifier '{0}'. + {StrBegin="NETSDK1084: "} + + + NETSDK1085: The 'NoBuild' property was set to true but the 'Build' target was invoked. + {StrBegin="NETSDK1085: "} + + + NETSDK1086: A FrameworkReference for '{0}' was included in the project. This is implicitly referenced by the .NET SDK and you do not typically need to reference it from your project. For more information, see {1} + {StrBegin="NETSDK1086: "} + + + NETSDK1087: Multiple FrameworkReference items for '{0}' were included in the project. + {StrBegin="NETSDK1087: "} + + + NETSDK1088: The COMVisible class '{0}' must have a GuidAttribute with the CLSID of the class to be made visible to COM in .NET Core. + {StrBegin="NETSDK1088: "} +{0} - The ComVisible class that doesn't have a GuidAttribute on it. + + + NETSDK1089: The '{0}' and '{1}' types have the same CLSID '{2}' set in their GuidAttribute. Each COMVisible class needs to have a distinct guid for their CLSID. + {StrBegin="NETSDK1089: "} +{0} - The first type with the conflicting guid. +{1} - The second type with the conflicting guid. +{2} - The guid the two types have. + + + NETSDK1090: The supplied assembly '{0}' is not valid. Cannot generate a CLSIDMap from it. + {StrBegin="NETSDK1090: "} +{0} - The path to the invalid assembly. + + + NETSDK1091: Unable to find a .NET Core COM host. The .NET Core COM host is only available on .NET Core 3.0 or higher when targeting Windows. + {StrBegin="NETSDK1091: "} + + + NETSDK1092: The CLSIDMap cannot be embedded on the COM host because adding resources requires that the build be performed on Windows (excluding Nano Server). + {StrBegin="NETSDK1092: "} + + + NETSDK1093: Project tools (DotnetCliTool) only support targeting .NET Core 2.2 and lower. + {StrBegin="NETSDK1093: "} + + + 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 using a supported runtime identifier, or set the PublishReadyToRun property to false. + {StrBegin="NETSDK1095: "} + + + NETSDK1096: Optimizing assemblies for performance failed. You can either exclude the failing assemblies from being optimized, or set the PublishReadyToRun property to false. + {StrBegin="NETSDK1096: "} + + + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. You must either specify a RuntimeIdentifier or set PublishSingleFile to false. + {StrBegin="NETSDK1097: "} + + + NETSDK1098: Applications published to a single-file are required to use the application host. You must either set PublishSingleFile to false or set UseAppHost to true. + {StrBegin="NETSDK1098: "} + + + NETSDK1099: Publishing to a single-file is only supported for executable applications. + {StrBegin="NETSDK1099: "} + + + NETSDK1100: Windows is required to build Windows desktop applications. + {StrBegin="NETSDK1100: "} + + + Optimizing assemblies for size, which may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink + + + NETSDK1102: Optimizing assemblies for size is not supported for the selected publish configuration. Please ensure that you are publishing a self-contained app. + {StrBegin="NETSDK1102: "} + + + NETSDK1103: RollForward setting is only supported on .NET Core 3.0 or higher. + {StrBegin="NETSDK1103: "} + + + NETSDK1104: RollForward value '{0}' is invalid. Allowed values are {1}. + {StrBegin="NETSDK1104: "} + + + NETSDK1105: Windows desktop applications are only supported on .NET Core 3.0 or higher. + {StrBegin="NETSDK1105: "} + + + NETSDK1106: Microsoft.NET.Sdk.WindowsDesktop requires 'UseWpf' or 'UseWindowsForms' to be set to 'true' + {StrBegin="NETSDK1106: "} + + + NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. + {StrBegin="NETSDK1107: "} + + + Some ReadyToRun compilations emitted warnings, indicating potential missing dependencies. Missing dependencies could potentially cause runtime failures. To show the warnings, set the PublishReadyToRunShowWarnings property to true. + + + NETSDK1109: Runtime list file '{0}' was not found. Report this error to the .NET team here: https://aka.ms/dotnet-sdk-issue. + {StrBegin="NETSDK1109: "} + + + NETSDK1110: More than one asset in the runtime pack has the same destination sub-path of '{0}'. Report this error to the .NET team here: https://aka.ms/dotnet-sdk-issue. + {StrBegin="NETSDK1110: "} + + + NETSDK1111: Failed to delete output apphost: {0} + {StrBegin="NETSDK1111: "} + + + NETSDK1112: The runtime pack for {0} was not downloaded. Try running a NuGet restore with the RuntimeIdentifier '{1}'. + {StrBegin="NETSDK1112: "} + + + NETSDK1113: Failed to create apphost (attempt {0} out of {1}): {2} + {StrBegin="NETSDK1113: "} + + + NETSDK1114: Unable to find a .NET Core IJW host. The .NET Core IJW host is only available on .NET Core 3.1 or higher when targeting Windows. + {StrBegin="NETSDK1114: "} + + + NETSDK1115: The current .NET SDK does not support .NET Framework without using .NET SDK Defaults. It is likely due to a mismatch between C++/CLI project CLRSupport property and TargetFramework. + {StrBegin="NETSDK1115: "} + + + NETSDK1116: C++/CLI projects targeting .NET Core must be dynamic libraries. + {StrBegin="NETSDK1116: "} + + + NETSDK1117: Does not support publish of C++/CLI project targeting dotnet core. + {StrBegin="NETSDK1117: "} + + + NETSDK1118: C++/CLI projects targeting .NET Core cannot be packed. + {StrBegin="NETSDK1118: "} + + + NETSDK1119: C++/CLI projects targeting .NET Core cannot use EnableComHosting=true. + {StrBegin="NETSDK1119: "} + + + NETSDK1120: C++/CLI projects targeting .NET Core require a target framework of at least 'netcoreapp3.1'. + {StrBegin="NETSDK1120: "} + + + NETSDK1121: C++/CLI projects targeting .NET Core cannot use SelfContained=true. + {StrBegin="NETSDK1121: "} + + + NETSDK1122: ReadyToRun compilation will be skipped because it is only supported for .NET Core 3.0 or higher. + {StrBegin="NETSDK1122: "} + + + NETSDK1123: Publishing an application to a single-file requires .NET Core 3.0 or higher. + {StrBegin="NETSDK1123: "} + + + NETSDK1124: Trimming assemblies requires .NET Core 3.0 or higher. + {StrBegin="NETSDK1124: "} + + + NETSDK1125: Publishing to a single-file is only supported for netcoreapp target. + {StrBegin="NETSDK1125: "} + + + NETSDK1126: Publishing ReadyToRun using Crossgen2 is only supported for self-contained applications. + {StrBegin="NETSDK1126: "} + + + NETSDK1127: The targeting pack {0} is not installed. Please restore and try again. + {StrBegin="NETSDK1127: "} + + + NETSDK1128: COM hosting does not support self-contained deployments. + {StrBegin="NETSDK1128: "} + + + NETSDK1129: The 'Publish' target is not supported without specifying a target framework. The current project targets multiple frameworks, you must specify the framework for the published application. + {StrBegin="NETSDK1129: "} + + + NETSDK1130: Referencing a Windows Metadata component directly when targeting {0} is not supported. Use the C#/WinRT projection tool (https://aka.ms/cswinrt) or a provided projection for this target. + {StrBegin="NETSDK1130: "} + + + NETSDK1131: Producing a managed Windows Metadata component with WinMDExp is not supported when targeting {0}. + {StrBegin="NETSDK1131: "} + + + NETSDK1132: No runtime pack information was available for {0}. + {StrBegin="NETSDK1132: "} + + + NETSDK1133: There was conflicting information about runtime packs available for {0}: +{1} + {StrBegin="NETSDK1133: "} + + + NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. + {StrBegin="NETSDK1134: "} + + + NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + {StrBegin="NETSDK1135: "} + +<<<<<<< HEAD + + NETSDK1136: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1136: "} + + + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} +======= + + NETSDK1136: The target platform must be set to Windows (usually by including '-windows' in the TargetFramework property) when using Windows Forms or WPF, or referencing projects or packages that do so. + {StrBegin="NETSDK1136: "} + + + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. +>>>>>>> master + {StrBegin="NETSDK1137: "} + + diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index 803ffeca50aa..cfdd301e2776 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -395,6 +395,13 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: Hodnota RollForward {0} je neplatná. Povolené jsou tyto hodnoty: {1}. {StrBegin="NETSDK1104: "} + + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + {StrBegin="NETSDK1139: "} + NETSDK1061: The project was restored using {0} version {1}, but with current settings, version {2} would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection. NETSDK1061: Projekt byl obnoven pomocí aplikace {0} verze {1}, ale s aktuálním nastavením by se místo toho použít verze {2}. Tento problém vyřešíte tak, že zkontrolujete, že se pro obnovení a následné operace, například sestavení nebo publikování, používá stejné nastavení. Obvykle k tomuto problému může dojít, pokud je vlastnost RuntimeIdentifier nastavena při sestavování nebo publikování, ale ne při obnovování. Další informace najdete na stránce https://aka.ms/dotnet-runtime-patch-selection. @@ -648,6 +655,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1045: Aktuální sada .NET SDK nepodporuje cílení {0} {1}. Buď zacilte {0} {2} nebo nižší, nebo použijte verzi sady .NET SDK, která podporuje {0} {1}. {StrBegin="NETSDK1045: "} + + NETSDK1138: The target platform identifier {0} was not recognized. + NETSDK1138: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1138: "} + NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. NETSDK1107: K sestavování desktopových aplikací pro Windows se vyžaduje Microsoft.NET.Sdk.WindowsDesktop. Aktuální verze sady SDK nepodporuje hodnoty UseWpf a UseWindowsForms. diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index f4477e505c1c..932d989441a4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -395,6 +395,13 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: Der RollForward-Wert "{0}" ist ungültig. Zulässige Werte: {1}. {StrBegin="NETSDK1104: "} + + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + {StrBegin="NETSDK1139: "} + NETSDK1061: The project was restored using {0} version {1}, but with current settings, version {2} would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection. NETSDK1061: Das Projekt wurde mit {0}, Version {1} wiederhergestellt, aber mit den aktuellen Einstellungen würde stattdessen Version {2} verwendet werden. Um dieses Problem zu beheben, müssen Sie sicherstellen, dass für die Wiederherstellung und für nachfolgende Vorgänge wie das Kompilieren oder Veröffentlichen dieselben Einstellungen verwendet werden. Dieses Problem tritt typischerweise auf, wenn die RuntimeIdentifier-Eigenschaft bei der Kompilierung oder Veröffentlichung, aber nicht bei der Wiederherstellung festgelegt wird. Weitere Informationen finden Sie unter https://aka.ms/dotnet-runtime-patch-selection. @@ -648,6 +655,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1045: Das aktuelle .NET SDK unterstützt {0} {1} nicht als Ziel. Geben Sie entweder {0} {2} oder niedriger als Ziel an, oder verwenden Sie eine .NET SDK-Version, die {0} {1} unterstützt. {StrBegin="NETSDK1045: "} + + NETSDK1138: The target platform identifier {0} was not recognized. + NETSDK1138: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1138: "} + NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. NETSDK1107: Für das Erstellen von Windows-Desktopanwendungen ist Microsoft.NET.Sdk.WindowsDesktop erforderlich. "UseWpf" und "UseWindowsForms" werden vom aktuellen SDK nicht unterstützt. diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index e608cbae9852..12b009af02a5 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -395,6 +395,13 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: El valor "{0}" de RollForward no es válido. Los valores permitidos son: {1}. {StrBegin="NETSDK1104: "} + + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + {StrBegin="NETSDK1139: "} + NETSDK1061: The project was restored using {0} version {1}, but with current settings, version {2} would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection. NETSDK1061: El proyecto fue restaurado utilizando la versión {0} {1}, pero con la configuración actual, la versión {2} se utilizaría en su lugar. Para resolver este problema, asegúrese de que la misma configuración se utiliza para restaurar y para operaciones posteriores como compilar o publicar. Normalmente, este problema puede producirse si la `propiedad RuntimeIdentifier se establece durante la compilación o la publicación pero no durante la restauración. Para obtener más información, consulte https://aka.ms/dotnet-runtime-patch-selection. @@ -648,6 +655,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1045: El SDK de .NET actual no admite el destino {0} {1}. Use el destino {0} {2} u otro inferior, o bien una versión del SDK de .NET que admita {0} {1}. {StrBegin="NETSDK1045: "} + + NETSDK1138: The target platform identifier {0} was not recognized. + NETSDK1138: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1138: "} + NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. NETSDK1107: Se requiere Microsoft.NET.Sdk.WindowsDesktop para compilar las aplicaciones de escritorio de Windows. El SDK actual no admite "UseWpf" ni "UseWindowsForms". diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index 64ae2d07a01a..ad6d99edeae3 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -395,6 +395,13 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: la valeur RollForward '{0}' est non valide. Les valeurs autorisées sont {1}. {StrBegin="NETSDK1104: "} + + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + {StrBegin="NETSDK1139: "} + NETSDK1061: The project was restored using {0} version {1}, but with current settings, version {2} would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection. NETSDK1061: Le projet a été restauré avec la version {0} {1}, mais avec les paramètres actuels, la version {2} serait utilisée à la place. Pour résoudre ce problème, assurez-vous que les mêmes paramètres sont utilisés pour la restauration et pour les opérations ultérieures telles que la génération et la publication. Généralement, ce problème peut se produire si la propriété RuntimeIdentifier est définie au cours de la génération ou de la publication, mais pas pendant la restauration. Pour plus d’informations, consultez https://aka.ms/dotnet-runtime-patch-selection. @@ -648,6 +655,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1045: Le kit .NET SDK actuel ne prend pas en charge le ciblage de {0} {1}. Vous devez soit cibler {0} {2} ou une version antérieure, soit utiliser une version du kit .NET SDK qui prend en charge {0} {1}. {StrBegin="NETSDK1045: "} + + NETSDK1138: The target platform identifier {0} was not recognized. + NETSDK1138: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1138: "} + NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. NETSDK1107: vous devez disposer de Microsoft.NET.Sdk.WindowsDesktop pour générer des applications de bureau Windows. 'UseWpf' et 'UseWindowsForms' ne sont pas pris en charge par le kit SDK actuel. diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index e1718c7e5309..8907bdd16159 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -395,6 +395,13 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: il valore '{0}' di RollForward non è valido. I valori consentiti sono {1}. {StrBegin="NETSDK1104: "} + + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + {StrBegin="NETSDK1139: "} + NETSDK1061: The project was restored using {0} version {1}, but with current settings, version {2} would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection. NETSDK1061: per il ripristino del progetto è stato usato {0} versione {1}, ma con le impostazioni correnti viene usata la versione {2}. Per risolvere il problema, assicurarsi di usare le stesse impostazioni per il ripristino e per le operazioni successive, quali compilazione o pubblicazione. In genere questo problema può verificarsi se la proprietà RuntimeIdentifier viene impostata durante la compilazione o la pubblicazione, ma non durante il ripristino. Per altre informazioni, vedere https://aka.ms/dotnet-runtime-patch-selection. @@ -648,6 +655,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1045: la versione corrente di .NET SDK non supporta {0} {1} come destinazione. Impostare come destinazione {0} {2} o una versione precedente oppure usare una versione di .NET SDK che supporta {0} {1}. {StrBegin="NETSDK1045: "} + + NETSDK1138: The target platform identifier {0} was not recognized. + NETSDK1138: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1138: "} + NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. NETSDK1107: per compilare applicazioni desktop di Windows, è necessario Microsoft.NET.Sdk.WindowsDesktop. 'UseWpf' e 'UseWindowsForms' non sono supportati dall'SDK corrente. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index 04c61f5eb2f4..94eb8c881ed6 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -395,6 +395,13 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: ロールフォワード値 '{0}' が無効です。許可されている値は {1} です。 {StrBegin="NETSDK1104: "} + + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + {StrBegin="NETSDK1139: "} + NETSDK1061: The project was restored using {0} version {1}, but with current settings, version {2} would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection. NETSDK1061: プロジェクトは {0} バージョン {1} を使用して復元されましたが、現在の設定では、バージョン {2} が代わりに使用されます。この問題を解決するには、復元およびこれ以降の操作 (ビルドや公開など) で同じ設定を使用していることをご確認ください。通常この問題は、ビルドや公開の実行時に RuntimeIdentifier プロパティを設定したが、復元時には設定していない場合に発生することがあります。詳しくは、https://aka.ms/dotnet-runtime-patch-selection を参照してください。 @@ -648,6 +655,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1045: 現在の .NET SDK は、ターゲットとする {0} {1} をサポートしていません。{0} {2} 以下をターゲットとするか、{0} {1} をサポートする .NET SDK のバージョンを使用してください。 {StrBegin="NETSDK1045: "} + + NETSDK1138: The target platform identifier {0} was not recognized. + NETSDK1138: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1138: "} + NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. NETSDK1107: Windows デスクトップ アプリケーションを作成するには、Microsoft.NET.Sdk.WindowsDesktop が必要です。現在の SDK では、'UseWpf' と 'UseWindowsForms' はサポートされていません。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index 1f390807feaf..9bda9a150071 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -395,6 +395,13 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: RollForward 값 '{0}'이(가) 잘못되었습니다. 허용되는 값은 {1}입니다. {StrBegin="NETSDK1104: "} + + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + {StrBegin="NETSDK1139: "} + NETSDK1061: The project was restored using {0} version {1}, but with current settings, version {2} would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection. NETSDK1061: {0} 버전 {1}을(를) 사용하여 프로젝트가 복원되었지만, 현재 설정에서는 버전 {2}을(를) 대신 사용합니다. 이 문제를 해결하려면 복원 및 후속 작업(예: 빌드 또는 게시)에 동일한 설정을 사용해야 합니다. 일반적으로 이 문제는 RuntimeIdentifier 속성이 빌드 또는 게시 중에 설정되었지만, 복원 중에는 설정되지 않은 경우에 발생할 수 있습니다. 자세한 내용은 https://aka.ms/dotnet-runtime-patch-selection을 참조하세요. @@ -648,6 +655,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1045: 현재 .NET SDK에서는 {0} {1}을(를) 대상으로 하는 것을 지원하지 않습니다. {0} {2} 이하를 대상으로 하거나 {0} {1}을(를) 지원하는 .NET SDK 버전을 사용하세요. {StrBegin="NETSDK1045: "} + + NETSDK1138: The target platform identifier {0} was not recognized. + NETSDK1138: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1138: "} + NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop을 사용하려면 Windows 데스크톱 애플리케이션을 빌드해야 합니다. 'UseWpf' 및 'UseWindowsForms'는 현재 SDK에서 지원하지 않습니다. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 1ab444365d29..e664a7c86d6e 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -395,6 +395,13 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: Wartość RollForward „{0}” jest nieprawidłowa. Dozwolone wartości to {1}. {StrBegin="NETSDK1104: "} + + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + {StrBegin="NETSDK1139: "} + NETSDK1061: The project was restored using {0} version {1}, but with current settings, version {2} would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection. NETSDK1061: Projekt został przywrócony przy użyciu pakietu {0} w wersji {1}, ale w przypadku bieżących ustawień zamiast niej zostałaby użyta wersja {2}. Aby rozwiązać ten problem, upewnij się, że te same ustawienia są używane do przywracania i dla kolejnych operacji, takich jak kompilacja lub publikowanie. Ten problem zazwyczaj występuje, gdy właściwość RuntimeIdentifier jest ustawiona podczas kompilacji lub publikowania, ale nie podczas przywracania. Aby uzyskać więcej informacji, zobacz https://aka.ms/dotnet-runtime-patch-selection. @@ -648,6 +655,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1045: Bieżący zestaw .NET SDK nie obsługuje używania środowiska docelowego {0} {1}. Użyj jako środowiska docelowego wersji {0} {2} lub starszej albo użyj wersji zestawu .NET SDK obsługującej środowisko {0} {1}. {StrBegin="NETSDK1045: "} + + NETSDK1138: The target platform identifier {0} was not recognized. + NETSDK1138: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1138: "} + NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. NETSDK1107: Do kompilowania aplikacji klasycznych systemu Windows konieczny jest zestaw Microsoft.NET.Sdk.WindowsDesktop. Właściwości „UseWpf” i „UseWindowsForms” nie są obsługiwane przez bieżący zestaw SDK. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index 5d1f8fc295a3..4cc49be58ab4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -395,6 +395,13 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: o valor de RollForward '{0}' é inválido. Os valores permitidos são {1}. {StrBegin="NETSDK1104: "} + + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + {StrBegin="NETSDK1139: "} + NETSDK1061: The project was restored using {0} version {1}, but with current settings, version {2} would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection. NETSDK1061: o projeto foi restaurado usando o {0} versão {1}, mas, com as configurações atuais, a versão {2} seria usada. Para resolver esse problema, verifique se as mesmas configurações são usadas para restauração e para operações subsequentes, como compilação ou publicação. Normalmente, esse problema poderá ocorrer se a propriedade RuntimeIdentifier for definida durante a compilação ou a publicação, mas não durante a restauração. Para obter mais informações, consulte https://aka.ms/dotnet-runtime-patch-selection. @@ -648,6 +655,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1045: O SDK do .NET atual não dá suporte para direcionar a {0} {1}. Direcione a {0} {2} ou inferior, ou use uma versão do SDK do .NET compatível com {0} {1}. {StrBegin="NETSDK1045: "} + + NETSDK1138: The target platform identifier {0} was not recognized. + NETSDK1138: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1138: "} + NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop é necessário para compilar aplicativos da área de trabalho do Windows. Não há suporte para 'UseWpf' e 'UseWindowsForms' no SDK atual. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index be3856391b6c..066fd22b63a8 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -395,6 +395,13 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: недопустимое значение RollForward "{0}". Разрешенные значения — {1}. {StrBegin="NETSDK1104: "} + + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + {StrBegin="NETSDK1139: "} + NETSDK1061: The project was restored using {0} version {1}, but with current settings, version {2} would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection. NETSDK1061: Проект был восстановлен с использованием {0} версии {1}, но с текущими параметрами вместо этой версии будет использована версия {2}. Чтобы устранить эту проблему, убедитесь, что для восстановления и последующих операций (таких как сборка или публикация) используются одинаковые параметры. Обычно эта проблема возникает, когда свойство RuntimeIdentifier устанавливается во время сборки или публикации, но не во время восстановления. Дополнительные сведения см. на странице https://aka.ms/dotnet-runtime-patch-selection. @@ -648,6 +655,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1045: текущий пакет SDK для .NET не поддерживает целевой объект {0} {1}. Выберите {0} {2} или более раннюю версию либо используйте версию пакета SDK для .NET, которая поддерживает {0} {1}. {StrBegin="NETSDK1045: "} + + NETSDK1138: The target platform identifier {0} was not recognized. + NETSDK1138: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1138: "} + NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. NETSDK1107: для сборки классических приложений для Windows требуется Microsoft.NET.Sdk.WindowsDesktop. "UseWpf" и "UseWindowsForms" не поддерживаются текущим пакетом SDK. diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index c12ae3fdc98f..8f08de105b7a 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -395,6 +395,13 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: '{0}' RollForward değeri geçersiz. İzin verilen değerler {1}. {StrBegin="NETSDK1104: "} + + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + {StrBegin="NETSDK1139: "} + NETSDK1061: The project was restored using {0} version {1}, but with current settings, version {2} would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection. NETSDK1061: Proje, {0} sürüm {1} kullanılarak geri yüklendi, ancak geçerli ayarlarla, bunun yerine sürüm {2} kullanılması gerekiyordu. Bu sorunu çözmek amacıyla, geri yükleme için ve derleme veya yayımlama gibi sonraki işlemler için aynı ayarların kullanıldığından emin olun. Bu sorun genellikle RuntimeIdentifier özelliği derleme veya yayımlama sırasında ayarlandığında ancak geri yükleme sırasında ayarlanmadığında oluşur. Daha fazla bilgi için bkz. https://aka.ms/dotnet-runtime-patch-selection. @@ -648,6 +655,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1045: Geçerli .NET SDK’sı {0} {1} sürümünü hedeflemeyi desteklemiyor. {0} {2} veya daha düşük bir sürümü hedefleyin veya {0} {1} destekleyen bir .NET SDK’sı kullanın. {StrBegin="NETSDK1045: "} + + NETSDK1138: The target platform identifier {0} was not recognized. + NETSDK1138: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1138: "} + NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. NETSDK1107: Windows Masaüstü uygulamalarını derlemek için Microsoft.NET.Sdk.WindowsDesktop gereklidir. 'UseWpf' ve 'UseWindowsForms' geçerli SDK tarafından desteklenmiyor. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index 3b6407cd29b9..090e069030d0 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -395,6 +395,13 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: RollForward 值“{0}”无效。允许的值为 {1}。 {StrBegin="NETSDK1104: "} + + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + {StrBegin="NETSDK1139: "} + NETSDK1061: The project was restored using {0} version {1}, but with current settings, version {2} would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection. NETSDK1061: 项目是使用 {0} 版本 {1} 还原的, 但使用当前设置, 将改用版本 {2}。要解决此问题, 请确保将相同的设置用于还原和后续操作 (如生成或发布)。通常, 如果 RuntimeIdentifier 属性是在生成或发布过程中设置的, 而不是在还原过程中进行的, 则会发生此问题。有关详细信息, 请参阅 https://aka.ms/dotnet-runtime-patch-selection。 @@ -648,6 +655,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1045: 当前 .NET SDK 不支持将 {0} {1} 设置为目标。请将 {0} {2} 或更低版本设置为目标,或使用支持 {0} {1} 的 .NET SDK 版本。 {StrBegin="NETSDK1045: "} + + NETSDK1138: The target platform identifier {0} was not recognized. + NETSDK1138: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1138: "} + NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. NETSDK1107: 要构建 Windows 桌面应用程序,需使用 Microsoft.NET.Sdk.WindowsDesktop。当前 SDK 不支持 "UseWpf" 和 "UseWindowsForms"。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index 2b561ccacf47..5bf479e15412 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -395,6 +395,13 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: RollForward 值 '{0}' 無效。允許的值為 {1}。 {StrBegin="NETSDK1104: "} + + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + {StrBegin="NETSDK1139: "} + NETSDK1061: The project was restored using {0} version {1}, but with current settings, version {2} would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection. NETSDK1061: 專案是使用 {0} 版本 {1} 還原的,但依照目前設定,使用的版本會是 {2}。若要解決此問題,請確認用於還原與後續作業 (例如建置或發佈) 的設定相同。一般而言,若在建置或發佈期間設定了 RuntimeIdentifier,但在還原期間未加以設定,就可能發生這個問題。如需詳細資訊,請參閱 https://aka.ms/dotnet-runtime-patch-selection。 @@ -648,6 +655,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1045: 目前的 .NET SDK 不支援以 {0} {1} 作為目標。請以 {0} {2} 或更低版本作為目標,或是使用支援 {0} {1} 的 .NET SDK 版本。 {StrBegin="NETSDK1045: "} + + NETSDK1138: The target platform identifier {0} was not recognized. + NETSDK1138: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1138: "} + NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. NETSDK1107: 需有 Microsoft.NET.Sdk.WindowsDesktop 才能建置 Windows 傳統型應用程式。目前的 SDK 不支援 'UseWpf' 和 'UseWindowsForms'。 diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.BeforeCommon.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.BeforeCommon.targets index 3703921cac95..09b0d7bd5b68 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.BeforeCommon.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.BeforeCommon.targets @@ -16,6 +16,7 @@ Copyright (c) .NET Foundation. All rights reserved. + + + + diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets index d6c8cb76c293..632dcbc931a6 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets @@ -46,36 +46,28 @@ Copyright (c) .NET Foundation. All rights reserved. - - - <_ShortFrameworkIdentifier>$(TargetFramework.TrimEnd('.0123456789')) - <_ShortFrameworkVersion>$(TargetFramework.Substring($(_ShortFrameworkIdentifier.Length))) - - - - - v$(_ShortFrameworkVersion) - + + - - - v$(_ShortFrameworkVersion[0]).0 - v$(_ShortFrameworkVersion[0]).$(_ShortFrameworkVersion[1]) - v$(_ShortFrameworkVersion[0]).$(_ShortFrameworkVersion[1]).$(_ShortFrameworkVersion[2]) + $([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) + v$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)', 3)) + <_TargetFrameworkVersionLength Condition="$(TargetFrameworkVersion.EndsWith('.0'))" >$([MSBuild]::Subtract($(TargetFrameworkVersion.Length), 2)) + $(TargetFrameworkVersion.Substring(0, $(_TargetFrameworkVersionLength))) - - - - .NETStandard - .NETCoreApp - - .NETFramework - .NETCoreApp + + + $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) + $([MSBuild]::GetTargetPlatformVersion('$(TargetFramework)', 3)) + + <_TargetPlatformVersionLength Condition="$(TargetPlatformVersion.EndsWith('.0'))" >$([MSBuild]::Subtract($(TargetPlatformVersion.Length), 2)) + $(TargetPlatformVersion.Substring(0, $(_TargetPlatformVersionLength))) + + Windows - + <_UnsupportedTargetFrameworkError>true @@ -114,6 +106,19 @@ Copyright (c) .NET Foundation. All rights reserved. FormatArguments="$([MSBuild]::Escape('$(TargetFramework)'))" /> + + + + true + + + + + @@ -193,6 +198,24 @@ Copyright (c) .NET Foundation. All rights reserved. FormatArguments="$(MinimumOSPlatform);$(TargetPlatformVersion)"/> + + + + + + + true + @(SupportedTargetPlatform, '%0a') + None + + + + + 7.0 + + Windows,Version=7.0 + Windows 7.0 diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.WindowsSupportedTargetPlatforms.props b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.WindowsSupportedTargetPlatforms.props new file mode 100644 index 000000000000..273924989c4c --- /dev/null +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.WindowsSupportedTargetPlatforms.props @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliNonLibraryProject.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliNonLibraryProject.cs index 0b6fa90a7106..a77c0b9fd15c 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliNonLibraryProject.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliNonLibraryProject.cs @@ -20,7 +20,7 @@ public GivenThatWeWantToBuildACppCliNonLibraryProject(ITestOutputHelper log) : b { } - [FullMSBuildOnlyFact] + [FullMSBuildOnlyFact(Skip = "https://github.com/dotnet/sdk/issues/12560")] public void Given_an_exe_project_It_should_fail_with_error_message() { var testAsset = _testAssetsManager @@ -34,7 +34,7 @@ public void Given_an_exe_project_It_should_fail_with_error_message() .And.HaveStdOutContaining(Strings.NoSupportCppNonDynamicLibraryDotnetCore); } - [FullMSBuildOnlyFact] + [FullMSBuildOnlyFact(Skip = "https://github.com/dotnet/sdk/issues/12560")] public void Given_an_StaticLibrary_project_It_should_fail_with_error_message() { var testAsset = _testAssetsManager diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliProject.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliProject.cs index f2741dece790..3bf65f2a8c49 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliProject.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliProject.cs @@ -78,7 +78,7 @@ public void Given_Wpf_framework_reference_It_builds_cpp_project() .Pass(); } - [FullMSBuildOnlyFact] + [FullMSBuildOnlyFact(Skip = "https://github.com/dotnet/sdk/issues/12560")] public void It_fails_with_error_message_on_EnableComHosting() { var testAsset = _testAssetsManager @@ -106,7 +106,7 @@ public void It_fails_with_error_message_on_EnableComHosting() .HaveStdOutContaining(Strings.NoSupportCppEnableComHosting); } - [FullMSBuildOnlyFact] + [FullMSBuildOnlyFact(Skip = "https://github.com/dotnet/sdk/issues/12560")] public void It_fails_with_error_message_on_fullframework() { var testAsset = _testAssetsManager @@ -123,7 +123,7 @@ public void It_fails_with_error_message_on_fullframework() .HaveStdOutContaining(Strings.NETFrameworkWithoutUsingNETSdkDefaults); } - [FullMSBuildOnlyFact] + [FullMSBuildOnlyFact(Skip = "https://github.com/dotnet/sdk/issues/12560")] public void It_fails_with_error_message_on_tfm_lower_than_3_1() { var testAsset = _testAssetsManager @@ -140,7 +140,7 @@ public void It_fails_with_error_message_on_tfm_lower_than_3_1() .HaveStdOutContaining(Strings.CppRequiresTFMVersion31); } - [FullMSBuildOnlyFact] + [FullMSBuildOnlyFact(Skip = "https://github.com/dotnet/sdk/issues/12560")] public void When_run_with_selfcontained_It_fails_with_error_message() { var testAsset = _testAssetsManager diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs index d1a420bea719..dfb19aaba2d8 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs @@ -417,13 +417,13 @@ public void It_implicitly_defines_compilation_constants_for_the_target_framework itemGroup.Add(supportedFramework); }); - AssertDefinedConstantsOutput(testAsset, targetFramework, new[] { "NETCOREAPP", "NET" }.Concat(expectedDefines).ToArray()); + AssertDefinedConstantsOutput(testAsset, targetFramework, new[] { "NETCOREAPP", "NET"}.Concat(expectedDefines).ToArray()); } [Theory] [InlineData("ios", "1.1", new[] { "IOS", "IOS1_1" })] [InlineData("android", "2.2", new[] { "ANDROID", "ANDROID2_2" })] - [InlineData("windows", "10.1", new[] { "WINDOWS", "WINDOWS10_1" })] + [InlineData("windows", "7.0", new[] { "WINDOWS", "WINDOWS7_0" })] public void It_implicitly_defines_compilation_constants_for_the_target_platform(string targetPlatformIdentifier, string targetPlatformVersion, string[] expectedDefines) { var targetFramework = "net5.0"; @@ -442,6 +442,8 @@ public void It_implicitly_defines_compilation_constants_for_the_target_platform( propGroup.Add(platformIdentifier); var platformVersion = new XElement(ns + "TargetPlatformVersion", targetPlatformVersion); propGroup.Add(platformVersion); + var platformSupported = new XElement(ns + "TargetPlatformSupported", true); + propGroup.Add(platformSupported); var disableUnnecessaryImplicitFrameworkReferencesForThisTest = new XElement(ns + "DisableImplicitFrameworkReferences", "true"); propGroup.Add(disableUnnecessaryImplicitFrameworkReferencesForThisTest); }); @@ -452,7 +454,7 @@ public void It_implicitly_defines_compilation_constants_for_the_target_platform( [Theory] [InlineData(new[] { "1.0", "1.1" }, "ios", "1.1", new[] { "IOS", "IOS1_1", "IOS1_0" })] [InlineData(new[] { "11.11", "12.12", "13.13" }, "android", "12.12", new[] { "ANDROID", "ANDROID11_11", "ANDROID12_12" })] - [InlineData(new[] { "7.0", "8.0", "10.0.19041", "11.0.0" }, "windows", "11.0.0", new[] { "WINDOWS", "WINDOWS7_0", "WINDOWS8_0", "WINDOWS10_0_19041", "WINDOWS11_0_0" })] + [InlineData(new string[] { /* Use the built in SupportedTargetPlatform items */}, "windows", "10.0.19041", new[] { "WINDOWS", "WINDOWS7_0", "WINDOWS8_0", "WINDOWS10_0_17763", "WINDOWS10_0_18362", "WINDOWS10_0_19041" })] public void It_implicitly_defines_compilation_constants_for_the_target_platform_with_backwards_compatibility(string[] supportedTargetPlatform, string targetPlatformIdentifier, string targetPlatformVersion, string[] expectedDefines) { var targetFramework = "net5.0"; @@ -471,6 +473,8 @@ public void It_implicitly_defines_compilation_constants_for_the_target_platform_ propGroup.Add(platformIdentifier); var platformVersion = new XElement(ns + "TargetPlatformVersion", targetPlatformVersion); propGroup.Add(platformVersion); + var platformSupported = new XElement(ns + "TargetPlatformSupported", true); + propGroup.Add(platformSupported); var disableUnnecessaryImplicitFrameworkReferencesForThisTest = new XElement(ns + "DisableImplicitFrameworkReferences", "true"); propGroup.Add(disableUnnecessaryImplicitFrameworkReferencesForThisTest); @@ -626,7 +630,6 @@ public void It_defines_target_platform_defaults_correctly(string targetFramework .Execute() .Should() .Pass(); - var values = getValuesCommand.GetValues(); if (defaultsDefined) { diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs index 4787d3170f71..32aa67ba4ee5 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs @@ -38,6 +38,8 @@ public void WhenPropertiesAreSetItCanGenerateMinimumOSPlatformAttribute() var targetPlatformIdentifier = "iOS"; testProject.AdditionalProperties["TargetPlatformIdentifier"] = targetPlatformIdentifier; + testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; + testProject.AdditionalProperties["TargetPlatformVersionSupported"] = "true"; testProject.AdditionalProperties["MinimumOSPlatform"] = "13.2"; testProject.AdditionalProperties["TargetPlatformVersion"] = "14.0"; @@ -57,6 +59,8 @@ public void WhenMinimumOSPlatformISNotSetTargetPlatformVersionIsSetItCanGenerate var targetPlatformIdentifier = "iOS"; testProject.AdditionalProperties["TargetPlatformIdentifier"] = targetPlatformIdentifier; + testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; + testProject.AdditionalProperties["TargetPlatformVersionSupported"] = "true"; testProject.AdditionalProperties["TargetPlatformVersion"] = "13.2"; var testAsset = _testAssetsManager.CreateTestProject(testProject); @@ -75,8 +79,10 @@ public void WhenMinimumOSPlatformIsHigherThanTargetPlatformVersionItShouldError( var targetPlatformIdentifier = "iOS"; testProject.AdditionalProperties["TargetPlatformIdentifier"] = targetPlatformIdentifier; + testProject.AdditionalProperties["TargetPlatformVersionSupported"] = "true"; testProject.AdditionalProperties["TargetPlatformVersion"] = "13.2"; testProject.AdditionalProperties["MinimumOSPlatform"] = "14.0"; + testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; var testAsset = _testAssetsManager.CreateTestProject(testProject); diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs index b8c88e411d37..1efe12c07983 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs @@ -14,7 +14,7 @@ namespace Microsoft.NET.Build.Tests public class GivenThatWeWantToBuildAWindowsDesktopProject : SdkTest { public GivenThatWeWantToBuildAWindowsDesktopProject(ITestOutputHelper log) : base(log) - {} + { } [WindowsOnlyRequiresMSBuildVersionTheory("16.7.0-preview-20310-07")] [InlineData("UseWindowsForms")] @@ -101,5 +101,45 @@ public void It_warns_when_specifying_windows_desktop_sdk() .And .HaveStdOutContaining("NETSDK1137"); } + + [WindowsOnlyFact] + public void It_fails_if_windows_target_platform_version_is_invalid() + { + var testProject = new TestProject() + { + Name = "InvalidWindowsVersion", + IsSdkProject = true, + TargetFrameworks = "net5.0-windows1.0" + }; + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var buildCommand = new BuildCommand(testAsset); + buildCommand.Execute() + .Should() + .Fail() + .And + .HaveStdOutContaining("NETSDK1137"); + } + + [Fact] + public void It_fails_if_target_platform_identifier_and_version_are_invalid() + { + var testProject = new TestProject() + { + Name = "InvalidTargetPlatform", + IsSdkProject = true, + TargetFrameworks = "net5.0-custom1.0" + }; + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var buildCommand = new BuildCommand(testAsset); + buildCommand.Execute() + .Should() + .Fail() + .And + .HaveStdOutContaining("NETSDK1136") + .And + .NotHaveStdOutContaining("NETSDK1137"); + } } } diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs.orig b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs.orig new file mode 100644 index 000000000000..d2768c577881 --- /dev/null +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs.orig @@ -0,0 +1,140 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using FluentAssertions; +using Microsoft.NET.TestFramework; +using Microsoft.NET.TestFramework.Commands; +using Xunit; +using Xunit.Abstractions; +using Microsoft.NET.TestFramework.Assertions; +using Microsoft.NET.TestFramework.ProjectConstruction; + +namespace Microsoft.NET.Build.Tests +{ + public class GivenThatWeWantToBuildAWindowsDesktopProject : SdkTest + { + public GivenThatWeWantToBuildAWindowsDesktopProject(ITestOutputHelper log) : base(log) + {} + +<<<<<<< HEAD + [WindowsOnlyFact] + public void It_fails_if_windows_target_platform_version_is_invalid() + { + var testProject = new TestProject() + { + Name = "InvalidWindowsVersion", + IsSdkProject = true, + TargetFrameworks = "net5.0-windows1.0" + }; + var testAsset = _testAssetsManager.CreateTestProject(testProject); +======= + [WindowsOnlyRequiresMSBuildVersionTheory("16.7.0-preview-20310-07")] + [InlineData("UseWindowsForms")] + [InlineData("UseWPF")] + public void It_errors_when_missing_windows_target_platform(string propertyName) + { + var targetFramework = "net5.0"; + TestProject testProject = new TestProject() + { + Name = "MissingTargetPlatform", + IsSdkProject = true, + TargetFrameworks = targetFramework + }; + testProject.AdditionalProperties[propertyName] = "true"; + testProject.AdditionalProperties["TargetPlatformIdentifier"] = "custom"; // Make sure we don't get windows implicitly set as the TPI + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: propertyName); +>>>>>>> master + + var buildCommand = new BuildCommand(testAsset); + buildCommand.Execute() + .Should() + .Fail() + .And +<<<<<<< HEAD + .HaveStdOutContaining("NETSDK1137"); + } + + [Fact] + public void It_fails_if_target_platform_identifier_and_version_are_invalid() + { + var testProject = new TestProject() + { + Name = "InvalidTargetPlatform", + IsSdkProject = true, + TargetFrameworks = "net5.0-custom1.0" + }; + var testAsset = _testAssetsManager.CreateTestProject(testProject); +======= + .HaveStdOutContaining("NETSDK1136"); + } + + [WindowsOnlyRequiresMSBuildVersionTheory("16.7.0-preview-20310-07")] + [InlineData("UseWindowsForms")] + [InlineData("UseWPF")] + public void It_errors_when_missing_transitive_windows_target_platform(string propertyName) + { + TestProject testProjectA = new TestProject() + { + Name = "A", + IsSdkProject = true, + ProjectSdk = "Microsoft.NET.Sdk.WindowsDesktop", + TargetFrameworks = "netcoreapp3.1" + }; + testProjectA.AdditionalProperties[propertyName] = "true"; + + TestProject testProjectB = new TestProject() + { + Name = "B", + IsSdkProject = true, + TargetFrameworks = "net5.0" + }; + testProjectB.ReferencedProjects.Add(testProjectA); + + TestProject testProjectC = new TestProject() + { + Name = "C", + IsSdkProject = true, + TargetFrameworks = "net5.0" + }; + testProjectC.ReferencedProjects.Add(testProjectB); + + var testAsset = _testAssetsManager.CreateTestProject(testProjectC); +>>>>>>> master + + var buildCommand = new BuildCommand(testAsset); + buildCommand.Execute() + .Should() + .Fail() + .And +<<<<<<< HEAD + .HaveStdOutContaining("NETSDK1136") + .And + .NotHaveStdOutContaining("NETSDK1137"); +======= + .HaveStdOutContaining("NETSDK1136"); + } + + [WindowsOnlyFact] + public void It_warns_when_specifying_windows_desktop_sdk() + { + var targetFramework = "net5.0"; + TestProject testProject = new TestProject() + { + Name = "windowsDesktopSdk", + IsSdkProject = true, + ProjectSdk = "Microsoft.NET.Sdk.WindowsDesktop", + TargetFrameworks = targetFramework + }; + testProject.AdditionalProperties["UseWPF"] = "true"; + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var buildCommand = new BuildCommand(testAsset); + buildCommand.Execute() + .Should() + .Pass() + .And + .HaveStdOutContaining("NETSDK1137"); +>>>>>>> master + } + } +} diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs new file mode 100644 index 000000000000..1e980ec3caee --- /dev/null +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs @@ -0,0 +1,84 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using Microsoft.NET.TestFramework; +using Microsoft.NET.TestFramework.Assertions; +using Microsoft.NET.TestFramework.Commands; +using Xunit; +using FluentAssertions; +using Xunit.Abstractions; +using Microsoft.NET.TestFramework.ProjectConstruction; +using System.IO; +using System; + +namespace Microsoft.NET.Build.Tests +{ + public class GivenThatWeWantToBuildWithATargetPlatform : SdkTest + { + public GivenThatWeWantToBuildWithATargetPlatform(ITestOutputHelper log) : base(log) + { + } + + [WindowsOnlyTheory] + [InlineData("netcoreapp3.1", ".NETCoreApp", "v3.1", "Windows", "7.0")] // Default values pre-5.0 + [InlineData("net5.0", ".NETCoreApp", "v5.0", "", "")] + [InlineData("net5.0-Windows7.0", ".NETCoreApp", "v5.0", "Windows", "7.0")] + [InlineData("net5.0-WINDOWS7.0", ".NETCoreApp", "v5.0", "Windows", "7.0")] + [InlineData("net5.0-windows", ".NETCoreApp", "v5.0", "Windows", "7.0")] + [InlineData("net5.0-windows10.0.19041", ".NETCoreApp", "v5.0", "Windows", "10.0.19041")] + public void It_defines_target_platform_from_target_framework(string targetFramework, string expectedTargetFrameworkIdentifier, string expectedTargetFrameworkVersion, string expectedTargetPlatformIdentifier, string expectedTargetPlatformVersion) + { + var testProj = new TestProject() + { + Name = "TargetPlatformTests", + IsSdkProject = true, + TargetFrameworks = targetFramework + }; + var testAsset = _testAssetsManager.CreateTestProject(testProj); + + Action assertValue = (string valueName, string expected) => + { + var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.Path, testProj.Name), targetFramework, valueName); + getValuesCommand + .Execute() + .Should() + .Pass(); + if (expected.Trim().Equals(string.Empty)) + { + getValuesCommand.GetValues().Count.Should().Be(0); + } + else + { + getValuesCommand.GetValues().ShouldBeEquivalentTo(new[] { expected }); + } + }; + + assertValue("TargetFrameworkIdentifier", expectedTargetFrameworkIdentifier); + assertValue("TargetFrameworkVersion", expectedTargetFrameworkVersion); + assertValue("TargetPlatformIdentifier", expectedTargetPlatformIdentifier); + assertValue("TargetPlatformIdentifier", expectedTargetPlatformIdentifier); + assertValue("TargetPlatformVersion", expectedTargetPlatformVersion); + assertValue("TargetPlatformMoniker", $"{expectedTargetPlatformIdentifier},Version={expectedTargetPlatformVersion}"); + assertValue("TargetPlatformDisplayName", $"{expectedTargetPlatformIdentifier} {expectedTargetPlatformVersion}"); + } + + [Fact] + public void It_fails_on_unsupported_os() + { + TestProject testProject = new TestProject() + { + Name = "UnsupportedOS", + IsSdkProject = true, + TargetFrameworks = "net5.0-unsupported" + }; + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var build = new BuildCommand(Log, Path.Combine(testAsset.Path, testProject.Name)); + build.Execute() + .Should() + .Fail() + .And + .HaveStdOutContaining("NETSDK1136"); + } + } +} diff --git a/src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackACppCliProject.cs b/src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackACppCliProject.cs index fc00b8fed015..e2b51d416a60 100644 --- a/src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackACppCliProject.cs +++ b/src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackACppCliProject.cs @@ -18,7 +18,7 @@ public GivenThatWeWantToPackACppCliProject(ITestOutputHelper log) : base(log) { } - [FullMSBuildOnlyFact] + [FullMSBuildOnlyFact(Skip = "https://github.com/dotnet/sdk/issues/12560")] public void It_cannot_pack_the_cppcliproject() { var testAsset = _testAssetsManager diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishACppCliAppProject.cs b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishACppCliAppProject.cs index b07f2c31d214..848c8400622f 100644 --- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishACppCliAppProject.cs +++ b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishACppCliAppProject.cs @@ -18,7 +18,7 @@ public GivenThatWeWantToPublishACppCliAppProject(ITestOutputHelper log) : base(l { } - [FullMSBuildOnlyFact] + [FullMSBuildOnlyFact(Skip = "https://github.com/dotnet/sdk/issues/12560")] public void It_should_fail_with_error_message() { var testAsset = _testAssetsManager diff --git a/src/Tests/Microsoft.NET.Publish.Tests/PublishWpfApp.cs b/src/Tests/Microsoft.NET.Publish.Tests/PublishWpfApp.cs index fa8bf4ee719c..2b2a2f8b282b 100644 --- a/src/Tests/Microsoft.NET.Publish.Tests/PublishWpfApp.cs +++ b/src/Tests/Microsoft.NET.Publish.Tests/PublishWpfApp.cs @@ -51,7 +51,7 @@ public void It_publishes_and_runs_self_contained_wpf_app() var publishCommand = new PublishCommand(Log, testDir.Path); - publishCommand.Execute($"/p:RuntimeIdentifier={rid}") + publishCommand.Execute($"/p:RuntimeIdentifier={rid}", "/p:TargetPlatformIdentifier=Windows", "/p:TargetPlatformVersion=7.0") .Should() .Pass(); diff --git a/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs b/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs index e46be93c0ae2..7b8f54ea0bdb 100644 --- a/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs +++ b/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using System; using System.Runtime.InteropServices; using Xunit; diff --git a/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs.orig b/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs.orig new file mode 100644 index 000000000000..359e2964d9d1 --- /dev/null +++ b/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs.orig @@ -0,0 +1,25 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +<<<<<<< HEAD +using System; +======= +>>>>>>> master +using System.Runtime.InteropServices; +using Xunit; + +namespace Microsoft.NET.TestFramework +{ + public class WindowsOnlyRequiresMSBuildVersionTheoryAttribute : TheoryAttribute + { + public WindowsOnlyRequiresMSBuildVersionTheoryAttribute(string version) + { + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + this.Skip = "This test requires Windows to run"; + } + + RequiresMSBuildVersionTheoryAttribute.CheckForRequiredMSBuildVersion(this, version); + } + } +} diff --git a/src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs b/src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs index 5f7228424773..7daaa66ae9f1 100644 --- a/src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs +++ b/src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs @@ -225,7 +225,7 @@ public void ItDoesNotAcceptInvalidFramework() .Fail(); } - [Fact] + [FullMSBuildOnlyFact(Skip = "https://github.com/dotnet/sdk/issues/12560")] public void ItListsFSharpProject() { var testAssetName = "FSharpTestAppSimple"; diff --git a/src/Tests/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs b/src/Tests/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs index ebddac12aed2..0ac10a8d886b 100644 --- a/src/Tests/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs +++ b/src/Tests/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs @@ -572,5 +572,56 @@ public void ItForwardsEmptyArgumentsToTheApp() .And .HaveStdOutContaining($"0 = a{Environment.NewLine}1 = {Environment.NewLine}2 = c"); } + + [Fact] + public void ItDoesNotPrintBuildingMessageByDefault() + { + var expectedValue = "Building..."; + var testAppName = "TestAppSimple"; + var testInstance = _testAssetsManager.CopyTestAsset(testAppName) + .WithSource(); + + new DotnetCommand(Log, "run") + .WithWorkingDirectory(testInstance.Path) + .Execute() + .Should() + .Pass() + .And + .NotHaveStdOutContaining(expectedValue); + } + + [Fact] + public void ItPrintsBuildingMessageIfLaunchSettingHasDotnetRunMessagesSet() + { + var expectedValue = "Building..."; + var testAppName = "TestAppWithLaunchSettings"; + var testInstance = _testAssetsManager.CopyTestAsset(testAppName) + .WithSource(); + + new DotnetCommand(Log, "run") + .WithWorkingDirectory(testInstance.Path) + .Execute() + .Should() + .Pass() + .And + .HaveStdOutContaining(expectedValue); + } + + [Fact] + public void ItIncludesEnvironmentVariablesSpecifiedInLaunchSettings() + { + var expectedValue = "MyCoolEnvironmentVariableKey=MyCoolEnvironmentVariableValue"; + var testAppName = "TestAppWithLaunchSettings"; + var testInstance = _testAssetsManager.CopyTestAsset(testAppName) + .WithSource(); + + new DotnetCommand(Log, "run") + .WithWorkingDirectory(testInstance.Path) + .Execute() + .Should() + .Pass() + .And + .HaveStdOutContaining(expectedValue); + } } }