diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2a5a6a7ec760..2a7617e6e8f6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,61 +1,61 @@ - + https://github.com/dotnet/templating - 6bb0326ac089950ead3b19fc83e34444c084e8f5 + a02ce3bcd7aea517e903886d0cc9761be225e18a - + https://github.com/dotnet/runtime - f37dd6fc8595e130909dcb3085a56342d04aa20c + f6dc87f43df543bdc761ded7c578ecedc5b39668 - + https://github.com/dotnet/runtime - f37dd6fc8595e130909dcb3085a56342d04aa20c + f6dc87f43df543bdc761ded7c578ecedc5b39668 https://github.com/dotnet/arcade ff5d4b6c8dbdaeacb6e6159d3f8185118dffd915 - + https://github.com/dotnet/runtime - f37dd6fc8595e130909dcb3085a56342d04aa20c + f6dc87f43df543bdc761ded7c578ecedc5b39668 - + https://github.com/dotnet/runtime - f37dd6fc8595e130909dcb3085a56342d04aa20c + f6dc87f43df543bdc761ded7c578ecedc5b39668 - + https://github.com/dotnet/runtime - f37dd6fc8595e130909dcb3085a56342d04aa20c + f6dc87f43df543bdc761ded7c578ecedc5b39668 https://github.com/dotnet/CliCommandLineParser 0e89c2116ad28e404ba56c14d1c3f938caa25a01 - + https://github.com/microsoft/msbuild - e8338f5ad91d42c3196218648859e9e837099842 + ccca596f350c87b9483577b956ed3dae7e7e1960 - + https://github.com/microsoft/msbuild - e8338f5ad91d42c3196218648859e9e837099842 + ccca596f350c87b9483577b956ed3dae7e7e1960 - + https://github.com/dotnet/fsharp - 670ae9e8a6e06b7dc0a5c4cb041851cebba2a0e4 + 66042d33b998a180edbd99af6064da85f8977bf3 - + https://github.com/dotnet/roslyn - 7435f69531ae3bf6809d5e2939afdba4561c08bb + f96dcbb6597fcc801970ee09688e733b64ce9040 - + https://github.com/dotnet/aspnetcore - 303a9bfe3312f1db51aa2ad5e354e3f484b41f00 + 0889a62250e56066055d45a6fce99413d3f48d56 - + https://github.com/dotnet/aspnetcore - 303a9bfe3312f1db51aa2ad5e354e3f484b41f00 + 0889a62250e56066055d45a6fce99413d3f48d56 https://github.com/NuGet/NuGet.Client @@ -65,57 +65,57 @@ https://github.com/microsoft/vstest df62aca07cacc5c018dc8e828f03a0cd79ee52da - + https://github.com/mono/linker - 3b524e4aa109ce5c8d9db5d6447386a0714d0d2d + f7c8a2a9e5aa47718169140db23c42f3439e6660 - + https://github.com/dotnet/runtime - f37dd6fc8595e130909dcb3085a56342d04aa20c + f6dc87f43df543bdc761ded7c578ecedc5b39668 - + https://github.com/dotnet/runtime - f37dd6fc8595e130909dcb3085a56342d04aa20c + f6dc87f43df543bdc761ded7c578ecedc5b39668 - + https://github.com/dotnet/runtime - f37dd6fc8595e130909dcb3085a56342d04aa20c + f6dc87f43df543bdc761ded7c578ecedc5b39668 - + https://github.com/dotnet/runtime - f37dd6fc8595e130909dcb3085a56342d04aa20c + f6dc87f43df543bdc761ded7c578ecedc5b39668 - + https://github.com/dotnet/windowsdesktop - 0f0a20ef103bd864b48bbb44ea55bccbecc450c7 + bb32c617a0b0a1f8ea73935f9e1c474b3de2e3b6 - + https://github.com/dotnet/wpf - abb96f98a8f4f94a08744404ce3a2cf0c784ed6d + 7a26b532499cfef8ac96400ce3c27286a1f922e2 - + https://github.com/dotnet/aspnetcore - 303a9bfe3312f1db51aa2ad5e354e3f484b41f00 + 0889a62250e56066055d45a6fce99413d3f48d56 - + https://github.com/dotnet/aspnetcore - 303a9bfe3312f1db51aa2ad5e354e3f484b41f00 + 0889a62250e56066055d45a6fce99413d3f48d56 - + https://github.com/dotnet/aspnetcore - 303a9bfe3312f1db51aa2ad5e354e3f484b41f00 + 0889a62250e56066055d45a6fce99413d3f48d56 - + https://github.com/dotnet/aspnetcore - 303a9bfe3312f1db51aa2ad5e354e3f484b41f00 + 0889a62250e56066055d45a6fce99413d3f48d56 https://github.com/aspnet/xdt c01a538851a8ab1a1fbeb2e6243f391fff7587b4 - + https://github.com/dotnet/roslyn-analyzers - c049309dd1836b4be5623c25809e62b90beff81c + 43fd1889b1634d820c0bcb0d1150b76b21d22a27 diff --git a/eng/Versions.props b/eng/Versions.props index d7eadf2be941..61f0a490b154 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -11,8 +11,8 @@ 5.0.100 - preview - 8 + rc + 1 @@ -28,7 +28,7 @@ 1.8.0 5.0.0-beta.20364.3 3.1.0 - 5.0.0-preview.8.20361.2 + 5.0.0-rc.1.20367.23 4.3.0 4.3.0 4.0.5 @@ -36,12 +36,12 @@ - 5.0.0-preview.8.20361.2 - 5.0.0-preview.8.20361.2 + 5.0.0-rc.1.20367.23 + 5.0.0-rc.1.20367.23 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) - 5.0.0-preview.8.20361.2 - 5.0.0-preview.8.20361.2 - 5.0.0-preview.8.20361.2 + 5.0.0-rc.1.20367.23 + 5.0.0-rc.1.20367.23 + 5.0.0-rc.1.20367.23 $(MicrosoftExtensionsDependencyModelPackageVersion) @@ -68,25 +68,25 @@ - 5.0.0-preview.3.20361.1 + 5.0.0-preview.3.20366.2 - 5.0.0-preview.8.20361.2 - 5.0.0-preview.8.20361.2 + 5.0.0-rc.1.20367.23 + 5.0.0-rc.1.20367.23 5.0.0-preview.7.20307.4 - 5.0.0-preview.8.20361.2 + 5.0.0-rc.1.20367.23 - 3.3.0-beta2.20360.2 + 3.3.0-beta3.20370.1 - 16.8.0-preview-20371-01 + 16.8.0-preview-20367-06 $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) - 16.8.0-preview-20371-01 + 16.8.0-preview-20367-06 $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) $(MicrosoftBuildFrameworkPackageVersion) @@ -98,7 +98,7 @@ - 5.0.0-preview.8.20322.2 + 5.0.0-rc.1.20365.5 $(MicrosoftTemplateEngineCliPackageVersion) $(MicrosoftTemplateEngineCliPackageVersion) $(MicrosoftTemplateEngineCliPackageVersion) @@ -107,31 +107,31 @@ - 11.0.0-beta.20372.1 + 11.0.0-beta.20367.6 - 3.8.0-1.20373.2 + 3.7.0-5.20367.1 - 5.0.0-preview.8.20364.16 - 5.0.0-preview.8.20364.16 - 5.0.0-preview.8.20364.16 - 5.0.0-preview.8.20364.16 - 5.0.0-preview.8.20364.16 + 5.0.0-rc.1.20367.16 + 5.0.0-rc.1.20367.16 + 5.0.0-rc.1.20367.16 + 5.0.0-rc.1.20367.16 + 5.0.0-rc.1.20367.16 - 5.0.0-preview.8.20364.16 + 5.0.0-rc.1.20367.16 - 5.0.0-preview.8.20361.2 + 5.0.0-preview.8.20365.1 - 5.0.0-preview.8.20361.2 + 5.0.0-preview.8.20365.2 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/sdk.sln b/sdk.sln index 08cd9a108e1a..f19c55432f1f 100644 --- a/sdk.sln +++ b/sdk.sln @@ -5,17 +5,9 @@ VisualStudioVersion = 16.0.29417.175 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{50A89C27-BA35-44B2-AC57-E54551791C64}" ProjectSection(SolutionItems) = preProject - build\build.ps1 = build\build.ps1 - build\build.sh = build\build.sh - build\cibuild.cmd = build\cibuild.cmd - build\cibuild.sh = build\cibuild.sh - build\dogfood.cmd = build\dogfood.cmd - build\dogfood.sh = build\dogfood.sh - build\NuGet.props = build\NuGet.props - build\SignToolData.json = build\SignToolData.json - build\Toolset.proj = build\Toolset.proj - build\uploadperfresult.cmd = build\uploadperfresult.cmd - build\Versions.props = build\Versions.props + eng\dogfood.cmd = eng\dogfood.cmd + eng\dogfood.sh = eng\dogfood.sh + eng\Versions.props = eng\Versions.props EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9CAEE03D-60F1-4E77-B25B-9CD8757E1F09}" @@ -25,9 +17,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution build.cmd = build.cmd build.sh = build.sh Directory.Build.props = Directory.Build.props + Directory.Build.targets = Directory.Build.targets LICENSE.TXT = LICENSE.TXT - netci.groovy = netci.groovy - perf.groovy = perf.groovy README.md = README.md restore.cmd = restore.cmd restore.sh = restore.sh @@ -36,10 +27,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{22AB674F-ED91-4FBC-BFEE-8A1E82F9F05E}" - ProjectSection(SolutionItems) = preProject - src\Directory.Build.props = src\Directory.Build.props - src\Directory.Build.targets = src\Directory.Build.targets - EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tasks", "Tasks", "{1FEED16D-E07D-47C1-BB4C-56CD9F42B53B}" EndProject diff --git a/src/Cli/Microsoft.DotNet.Configurer/DotnetFirstRunConfiguration.cs b/src/Cli/Microsoft.DotNet.Configurer/DotnetFirstRunConfiguration.cs index f45b6adf6a4e..0e621828db4c 100644 --- a/src/Cli/Microsoft.DotNet.Configurer/DotnetFirstRunConfiguration.cs +++ b/src/Cli/Microsoft.DotNet.Configurer/DotnetFirstRunConfiguration.cs @@ -8,16 +8,21 @@ public class DotnetFirstRunConfiguration public bool GenerateAspNetCertificate { get; } public bool TelemetryOptout { get; } + public bool AddGlobalToolsToPath { get; } + public bool NoLogo { get; } + public DotnetFirstRunConfiguration( bool generateAspNetCertificate, bool telemetryOptout, - bool addGlobalToolsToPath) + bool addGlobalToolsToPath, + bool nologo) { GenerateAspNetCertificate = generateAspNetCertificate; TelemetryOptout = telemetryOptout; AddGlobalToolsToPath = addGlobalToolsToPath; + NoLogo = nologo; } } } diff --git a/src/Cli/Microsoft.DotNet.Configurer/DotnetFirstTimeUseConfigurer.cs b/src/Cli/Microsoft.DotNet.Configurer/DotnetFirstTimeUseConfigurer.cs index c299d57de994..bfa1b09d455b 100644 --- a/src/Cli/Microsoft.DotNet.Configurer/DotnetFirstTimeUseConfigurer.cs +++ b/src/Cli/Microsoft.DotNet.Configurer/DotnetFirstTimeUseConfigurer.cs @@ -50,13 +50,17 @@ public void Configure() if (ShouldPrintFirstTimeUseNotice()) { - PrintFirstTimeMessageWelcome(); - if (ShouldPrintTelemetryMessageWhenFirstTimeUseNoticeIsEnabled()) + if (!_dotnetFirstRunConfiguration.NoLogo) { - PrintTelemetryMessage(); + PrintFirstTimeMessageWelcome(); + if (ShouldPrintTelemetryMessageWhenFirstTimeUseNoticeIsEnabled()) + { + PrintTelemetryMessage(); + } + + PrintFirstTimeMessageMoreInformation(); } - PrintFirstTimeMessageMoreInformation(); _firstTimeUseNoticeSentinel.CreateIfNotExists(); } diff --git a/src/Cli/dotnet/Program.cs b/src/Cli/dotnet/Program.cs index 2f7a7133b528..e4b1f369102c 100644 --- a/src/Cli/dotnet/Program.cs +++ b/src/Cli/dotnet/Program.cs @@ -148,6 +148,8 @@ internal static int ProcessArgs(string[] args, ITelemetry telemetryClient = null environmentProvider.GetEnvironmentVariableAsBool("DOTNET_CLI_TELEMETRY_OPTOUT", defaultValue: false); bool addGlobalToolsToPath = environmentProvider.GetEnvironmentVariableAsBool("DOTNET_ADD_GLOBAL_TOOLS_TO_PATH", defaultValue: true); + bool nologo = + environmentProvider.GetEnvironmentVariableAsBool("DOTNET_NOLOGO", defaultValue: false); ReportDotnetHomeUsage(environmentProvider); @@ -158,13 +160,14 @@ internal static int ProcessArgs(string[] args, ITelemetry telemetryClient = null aspNetCertificateSentinel = new NoOpAspNetCertificateSentinel(); firstTimeUseNoticeSentinel = new NoOpFirstTimeUseNoticeSentinel(); toolPathSentinel = new NoOpFileSentinel(exists: false); - isDotnetBeingInvokedFromNativeInstaller = true; + isDotnetBeingInvokedFromNativeInstaller = true; } var dotnetFirstRunConfiguration = new DotnetFirstRunConfiguration( generateAspNetCertificate: generateAspNetCertificate, telemetryOptout: telemetryOptout, - addGlobalToolsToPath: addGlobalToolsToPath); + addGlobalToolsToPath: addGlobalToolsToPath, + nologo: nologo); ConfigureDotNetForFirstTimeUse( firstTimeUseNoticeSentinel, diff --git a/src/Cli/dotnet/commands/dotnet-nuget/NuGetCommandParser.cs b/src/Cli/dotnet/commands/dotnet-nuget/NuGetCommandParser.cs index bd9b0aecaced..38b809738e64 100644 --- a/src/Cli/dotnet/commands/dotnet-nuget/NuGetCommandParser.cs +++ b/src/Cli/dotnet/commands/dotnet-nuget/NuGetCommandParser.cs @@ -54,7 +54,8 @@ public static Command NuGet() => Create.Option("-d|--disable-buffering", Parser.CompletionOnlyDescription), Create.Option("-n|--no-symbols", Parser.CompletionOnlyDescription), Create.Option("--no-service-endpoint", Parser.CompletionOnlyDescription), - Create.Option("--interactive", Parser.CompletionOnlyDescription) + Create.Option("--interactive", Parser.CompletionOnlyDescription), + Create.Option("--skip-duplicate", Parser.CompletionOnlyDescription) )); } } diff --git a/src/Layout/redist/minimumMSBuildVersion b/src/Layout/redist/minimumMSBuildVersion index 28ebe8b4dbed..93eef160e899 100644 --- a/src/Layout/redist/minimumMSBuildVersion +++ b/src/Layout/redist/minimumMSBuildVersion @@ -1 +1 @@ -16.5.0 +16.8.0 diff --git a/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj b/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj index 892eb0dafa0b..e543d26c8d17 100644 --- a/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj +++ b/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj @@ -8,6 +8,8 @@ true MicrosoftAspNetCore true + + true diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index 601b71a4685f..061bc5865eb3 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -645,4 +645,16 @@ The following are names of parameters or literal values and should not be transl NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. {StrBegin="NETSDK1135: "} + + 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. + {StrBegin="NETSDK1137: "} + + + NETSDK1138: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1138: "} + diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index 06750ade56ab..6f14a2d2c68f 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -613,6 +613,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1073: Odkaz FrameworkReference {0} se nerozpoznal. {StrBegin="NETSDK1073: "} + + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + {StrBegin="NETSDK1137: "} + NETSDK1009: Unrecognized preprocessor token '{0}' in '{1}'. NETSDK1009: Nerozpoznaný token preprocesoru {0} v {1}. @@ -643,6 +648,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. @@ -678,6 +688,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1100: K sestavování desktopových aplikací pro Windows se vyžaduje systém Windows. {StrBegin="NETSDK1100: "} + + 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. + 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: "} + \ No newline at end of file diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 535a63f51e5f..c263f48a3c37 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -613,6 +613,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1073: Die FrameworkReference "{0}" wurde nicht erkannt. {StrBegin="NETSDK1073: "} + + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + {StrBegin="NETSDK1137: "} + NETSDK1009: Unrecognized preprocessor token '{0}' in '{1}'. NETSDK1009: Unbekanntes Präprozessortoken "{0}" in "{1}". @@ -643,6 +648,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. @@ -678,6 +688,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1100: Windows ist zum Erstellen von Windows-Desktopanwendungen erforderlich. {StrBegin="NETSDK1100: "} + + 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. + 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: "} + \ No newline at end of file diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index d2afbfd9ffaa..740b3eea828b 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -613,6 +613,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1073: No se reconoció el valor de FrameworkReference "{0}" {StrBegin="NETSDK1073: "} + + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + {StrBegin="NETSDK1137: "} + NETSDK1009: Unrecognized preprocessor token '{0}' in '{1}'. NETSDK1009: Token de preprocesador no reconocido "{0}" en "{1}". @@ -643,6 +648,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". @@ -678,6 +688,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1100: Se requiere Windows para compilar las aplicaciones de escritorio de Windows. {StrBegin="NETSDK1100: "} + + 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. + 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: "} + \ No newline at end of file diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index 5dfaea0e334c..e7cce3509bf2 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -613,6 +613,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1073: le FrameworkReference '{0}' n'a pas été reconnu {StrBegin="NETSDK1073: "} + + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + {StrBegin="NETSDK1137: "} + NETSDK1009: Unrecognized preprocessor token '{0}' in '{1}'. NETSDK1009: Jeton de préprocesseur '{0}' non reconnu dans '{1}'. @@ -643,6 +648,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. @@ -678,6 +688,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1100: vous devez disposer de Windows pour générer des applications de bureau Windows. {StrBegin="NETSDK1100: "} + + 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. + 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: "} + \ No newline at end of file diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index 36d11beb7419..0fc9032ae82d 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -613,6 +613,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1073: l'elemento FrameworkReference '{0}' non è stato riconosciuto {StrBegin="NETSDK1073: "} + + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + {StrBegin="NETSDK1137: "} + NETSDK1009: Unrecognized preprocessor token '{0}' in '{1}'. NETSDK1009: token di preprocessore '{0}' non riconosciuto in '{1}'. @@ -643,6 +648,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. @@ -678,6 +688,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1100: per compilare applicazioni desktop di Windows è richiesto Windows. {StrBegin="NETSDK1100: "} + + 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. + 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: "} + \ No newline at end of file diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index 0e572735f072..790b27ce9ab1 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -613,6 +613,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1073: FrameworkReference '{0}' は認識されませんでした {StrBegin="NETSDK1073: "} + + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + {StrBegin="NETSDK1137: "} + NETSDK1009: Unrecognized preprocessor token '{0}' in '{1}'. NETSDK1009: 認識されないプリプロセッサ トークン '{0}' が '{1}' に存在します。 @@ -643,6 +648,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' はサポートされていません。 @@ -678,6 +688,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1100: Windows デスクトップ アプリケーションを構築するには Windows が必要です。 {StrBegin="NETSDK1100: "} + + 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. + 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: "} + \ No newline at end of file diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index 4cd99c4657cd..602011b69fd1 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -613,6 +613,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1073: FrameworkReference '{0}'을(를) 인식할 수 없습니다. {StrBegin="NETSDK1073: "} + + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + {StrBegin="NETSDK1137: "} + NETSDK1009: Unrecognized preprocessor token '{0}' in '{1}'. NETSDK1009: '{1}'에서 전처리기 토큰 '{0}'을(를) 인식할 수 없습니다. @@ -643,6 +648,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에서 지원하지 않습니다. @@ -678,6 +688,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1100: Windows 데스크톱 애플리케이션을 빌드하려면 Windows가 필요합니다. {StrBegin="NETSDK1100: "} + + 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. + 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: "} + \ No newline at end of file diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 1113f83e0f10..f2ae922ded2d 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -613,6 +613,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1073: Nie rozpoznano elementu FrameworkReference „{0}” {StrBegin="NETSDK1073: "} + + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + {StrBegin="NETSDK1137: "} + NETSDK1009: Unrecognized preprocessor token '{0}' in '{1}'. NETSDK1009: Nierozpoznany token preprocesora „{0}” w elemencie „{1}”. @@ -643,6 +648,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. @@ -678,6 +688,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1100: Do tworzenia aplikacji klasycznych systemu Windows wymagany jest system Windows. {StrBegin="NETSDK1100: "} + + 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. + 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: "} + \ No newline at end of file diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index 00ad13e2732f..08d720f5a424 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -613,6 +613,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1073: o FrameworkReference '{0}' não foi reconhecido {StrBegin="NETSDK1073: "} + + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + {StrBegin="NETSDK1137: "} + NETSDK1009: Unrecognized preprocessor token '{0}' in '{1}'. NETSDK1009: Token de pré-processador não reconhecido '{0}' em '{1}'. @@ -643,6 +648,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. @@ -678,6 +688,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1100: o Windows é necessário para compilar aplicativos da área de trabalho do Windows. {StrBegin="NETSDK1100: "} + + 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. + 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: "} + \ No newline at end of file diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index 07ccbc789bd1..172d8006c62e 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -613,6 +613,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1073: элемент FrameworkReference "{0}" не распознан {StrBegin="NETSDK1073: "} + + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + {StrBegin="NETSDK1137: "} + NETSDK1009: Unrecognized preprocessor token '{0}' in '{1}'. NETSDK1009: не распознан маркер препроцессора "{0}" в "{1}". @@ -643,6 +648,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. @@ -678,6 +688,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1100: для создания классических приложений Windows требуется ОС Windows. {StrBegin="NETSDK1100: "} + + 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. + 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: "} + \ No newline at end of file diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index 06de6bdfa4c0..a8b42b33fb84 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -613,6 +613,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1073: FrameworkReference '{0}' tanınmadı {StrBegin="NETSDK1073: "} + + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + {StrBegin="NETSDK1137: "} + NETSDK1009: Unrecognized preprocessor token '{0}' in '{1}'. NETSDK1009: '{1}' içinde tanınmayan '{0}' ön işlemci belirteci. @@ -643,6 +648,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. @@ -678,6 +688,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1100: Windows masaüstü uygulamalarını oluşturmak için Windows gereklidir. {StrBegin="NETSDK1100: "} + + 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. + 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: "} + \ No newline at end of file diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index a91bd03ef909..0734e8eefe5a 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -613,6 +613,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1073: 未识别 FrameworkReference“{0}” {StrBegin="NETSDK1073: "} + + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + {StrBegin="NETSDK1137: "} + NETSDK1009: Unrecognized preprocessor token '{0}' in '{1}'. NETSDK1009: “{1}”中无法识别预处理器标记“{0}”。 @@ -643,6 +648,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"。 @@ -678,6 +688,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1100: 需使用 Windows 才能构建 Windows 桌面应用程序。 {StrBegin="NETSDK1100: "} + + 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. + 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: "} + \ No newline at end of file diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index df5e41d975fb..430858d583e4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -613,6 +613,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1073: 無法辨識 FrameworkReference '{0}' {StrBegin="NETSDK1073: "} + + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. + {StrBegin="NETSDK1137: "} + NETSDK1009: Unrecognized preprocessor token '{0}' in '{1}'. NETSDK1009: '{1}' 中的前置處理器語彙基元 '{0}' 無法辨識。 @@ -643,6 +648,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'。 @@ -678,6 +688,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1100: 需要 Windows 才能建置 Windows 桌面應用程式。 {StrBegin="NETSDK1100: "} + + 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. + 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: "} + \ No newline at end of file diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/ResolveReadyToRunCompilers.cs b/src/Tasks/Microsoft.NET.Build.Tasks/ResolveReadyToRunCompilers.cs index 9dedbe192896..893efd2e5572 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/ResolveReadyToRunCompilers.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks/ResolveReadyToRunCompilers.cs @@ -46,6 +46,7 @@ internal struct CrossgenToolInfo private ITaskItem _runtimePack; private ITaskItem _crossgen2Pack; private string _targetRuntimeIdentifier; + private string _targetPlatform; private string _hostRuntimeIdentifier; private CrossgenToolInfo _crossgenTool; @@ -111,9 +112,9 @@ private bool ValidateCrossgenSupport() return false; } - if (!ExtractTargetPlatformAndArchitecture(_targetRuntimeIdentifier, out string targetPlatform, out _targetArchitecture) || + if (!ExtractTargetPlatformAndArchitecture(_targetRuntimeIdentifier, out _targetPlatform, out _targetArchitecture) || !ExtractTargetPlatformAndArchitecture(_hostRuntimeIdentifier, out string hostPlatform, out Architecture hostArchitecture) || - targetPlatform != hostPlatform) + _targetPlatform != hostPlatform) { Log.LogError(Strings.ReadyToRunTargetNotSupportedError); return false; @@ -149,13 +150,15 @@ private bool ValidateCrossgen2Support() // win-x64 -> win-x64 // linux-x64 -> linux-x64 // linux-musl-x64 -> linux-musl-x64 - if (_targetRuntimeIdentifier != _hostRuntimeIdentifier) + if (!ExtractTargetPlatformAndArchitecture(_targetRuntimeIdentifier, out _targetPlatform, out _targetArchitecture) || + !GetTargetSpec(out string targetSpec) || + _targetRuntimeIdentifier != _hostRuntimeIdentifier) { Log.LogError(Strings.ReadyToRunTargetNotSupportedError); return false; } - if (!GetCrossgen2ComponentsPaths()) + if (!GetCrossgen2ComponentsPaths(targetSpec)) { Log.LogError(Strings.ReadyToRunTargetNotSupportedError); return false; @@ -326,20 +329,53 @@ private bool GetCrossgenComponentsPaths() return File.Exists(_crossgenTool.ToolPath) && File.Exists(_crossgenTool.ClrJitPath); } - private bool GetCrossgen2ComponentsPaths() + private bool GetCrossgen2ComponentsPaths(string targetSpec) { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { _crossgen2Tool.ToolPath = Path.Combine(_crossgen2Tool.PackagePath, "tools", "crossgen2.exe"); - _crossgen2Tool.ClrJitPath = Path.Combine(_crossgen2Tool.PackagePath, "tools", "clrjitilc.dll"); + _crossgen2Tool.ClrJitPath = Path.Combine(_crossgen2Tool.PackagePath, "tools", $"clrjit-{targetSpec}.dll"); } - else + else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + _crossgen2Tool.ToolPath = Path.Combine(_crossgen2Tool.PackagePath, "tools", "crossgen2"); + _crossgen2Tool.ClrJitPath = Path.Combine(_crossgen2Tool.PackagePath, "tools", $"libclrjit-{targetSpec}.so"); + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { _crossgen2Tool.ToolPath = Path.Combine(_crossgen2Tool.PackagePath, "tools", "crossgen2"); - _crossgen2Tool.ClrJitPath = Path.Combine(_crossgen2Tool.PackagePath, "tools", "libclrjitilc.so"); + _crossgen2Tool.ClrJitPath = Path.Combine(_crossgen2Tool.PackagePath, "tools", $"libclrjit-{targetSpec}.dylib"); + } + else + { + // Unknown platform + return false; } return File.Exists(_crossgen2Tool.ToolPath) && File.Exists(_crossgen2Tool.ClrJitPath); } + + // Keep in sync with JitConfigProvider.GetTargetSpec + private bool GetTargetSpec(out string targetSpec) + { + string targetOSComponent = (_targetPlatform == "win" ? "win" : "unix"); + string targetArchComponent = _targetArchitecture switch + { + Architecture.X86 => "x86", + Architecture.X64 => "x64", + Architecture.Arm => "arm", + Architecture.Arm64 => "arm64", + _ => null + }; + + if (targetArchComponent == null) + { + targetSpec = null; + return false; + } + + targetSpec = targetOSComponent + '-' + targetArchComponent; + return true; + } } } diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets index cb0d6cbffdf1..66f66638f869 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets @@ -450,6 +450,7 @@ Copyright (c) .NET Foundation. All rights reserved. _ComputeResolvedFilesToPublishTypes Splits ResolvedFileToPublish items into 'PreserveNewest' and 'Always' buckets. + Then further splits those into 'Unbundled' buckets based on the single file setting. ============================================================ --> @@ -461,6 +462,19 @@ Copyright (c) .NET Foundation. All rights reserved. <_ResolvedFileToPublishAlways Include="@(ResolvedFileToPublish)" Condition="'%(ResolvedFileToPublish.CopyToPublishDirectory)'=='Always'" /> + + + + <_ResolvedUnbundledFileToPublishPreserveNewest + Include="@(_ResolvedFileToPublishPreserveNewest)" + Condition="'$(PublishSingleFile)' != 'true' or + '%(_ResolvedFileToPublishPreserveNewest.ExcludeFromSingleFile)'=='true'" /> + + <_ResolvedUnbundledFileToPublishAlways + Include="@(_ResolvedFileToPublishAlways)" + Condition="'$(PublishSingleFile)' != 'true' or + '%(_ResolvedFileToPublishAlways.ExcludeFromSingleFile)'=='true'" /> + - @(ReferenceComWrappersToCopyLocal->'%(Filename)%(Extension)') + %(Filename)%(Extension) PreserveNewest @@ -1112,7 +1126,7 @@ Copyright (c) .NET Foundation. All rights reserved. ============================================================ ComputeFilesCopiedToPublishDir - Gathers all the files that were copied to the publish directory. This is used by wapproj and is required for back compat. + Gathers all the files that will be copied to the publish directory. This is used by wapproj and is required for back compat. ============================================================ --> - - + + + <_WindowsDesktopTransitiveFrameworkReference Include="@(TransitiveFrameworkReference)" + Condition="'%(Identity)' == 'Microsoft.WindowsDesktop.App' Or + '%(Identity)' == 'Microsoft.WindowsDesktop.App.WPF' Or + '%(Identity)' == 'Microsoft.WindowsDesktop.App.WindowsForms'" /> + + + + + + + + + + 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 6a93ed54cc29..ede74b176a7b 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 + + + + + diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets index 9a7a9901b0f2..b86bf20d17e2 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets @@ -23,5 +23,8 @@ Copyright (c) .NET Foundation. All rights reserved. 7.0 + + Windows,Version=7.0 + Windows 7.0 diff --git a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs b/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs index 3a945ae354df..0091a47addb6 100644 --- a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs +++ b/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs @@ -46,7 +46,8 @@ public void It_does_not_print_the_first_time_use_notice_if_the_sentinel_exists() ( generateAspNetCertificate: true, telemetryOptout: false, - addGlobalToolsToPath: true + addGlobalToolsToPath: true, + nologo: false ), _reporterMock.Object, CliFallbackFolderPath, @@ -72,7 +73,8 @@ public void It_prints_the_telemetry_if_the_sentinel_does_not_exist() ( generateAspNetCertificate: true, telemetryOptout: false, - addGlobalToolsToPath: true + addGlobalToolsToPath: true, + nologo: false ), _reporterMock.Object, CliFallbackFolderPath, @@ -98,7 +100,8 @@ public void It_adds_the_tool_path_to_the_environment_if_the_tool_path_sentinel_d ( generateAspNetCertificate: true, telemetryOptout: false, - addGlobalToolsToPath: true + addGlobalToolsToPath: true, + nologo: false ), _reporterMock.Object, CliFallbackFolderPath, @@ -124,7 +127,8 @@ public void It_does_not_add_the_tool_path_to_the_environment_if_the_tool_path_se ( generateAspNetCertificate: true, telemetryOptout: false, - addGlobalToolsToPath: true + addGlobalToolsToPath: true, + nologo: false ), _reporterMock.Object, CliFallbackFolderPath, @@ -150,7 +154,8 @@ public void It_does_not_generate_the_aspnet_https_development_certificate_if_the ( generateAspNetCertificate: true, telemetryOptout: false, - addGlobalToolsToPath: true + addGlobalToolsToPath: true, + nologo: false ), _reporterMock.Object, CliFallbackFolderPath, @@ -175,7 +180,8 @@ public void It_does_not_generate_the_aspnet_https_development_certificate_when_t ( generateAspNetCertificate: false, telemetryOptout: false, - addGlobalToolsToPath: true + addGlobalToolsToPath: true, + nologo: false ), _reporterMock.Object, CliFallbackFolderPath, @@ -200,7 +206,8 @@ public void It_generates_the_aspnet_https_development_certificate_if_the_sentine ( generateAspNetCertificate: true, telemetryOptout: false, - addGlobalToolsToPath: true + addGlobalToolsToPath: true, + nologo: false ), _reporterMock.Object, CliFallbackFolderPath, @@ -224,7 +231,8 @@ public void It_adds_the_tool_path_to_the_environment_if_addGlobalToolsToPath_is_ ( generateAspNetCertificate: true, telemetryOptout: false, - addGlobalToolsToPath: true + addGlobalToolsToPath: true, + nologo: false ), _reporterMock.Object, CliFallbackFolderPath, @@ -247,7 +255,8 @@ public void It_does_not_add_the_tool_path_to_the_environment_if_addGlobalToolsTo ( generateAspNetCertificate: true, telemetryOptout: false, - addGlobalToolsToPath: false + addGlobalToolsToPath: false, + nologo: false ), _reporterMock.Object, CliFallbackFolderPath, diff --git a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurerWIthStateSetup.cs b/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurerWIthStateSetup.cs index 22922c39aa70..927d1525ab99 100644 --- a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurerWIthStateSetup.cs +++ b/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurerWIthStateSetup.cs @@ -48,18 +48,27 @@ private void ResetObjectState() } [Theory] - [InlineData(false, false, false, Never, FirstRun, FirstRun, true, true)] - [InlineData(true, false, false, FirstRun, FirstRun, FirstRun, true, true)] - [InlineData(false, true, false, Never, FirstRun, Never, false, false)] - [InlineData(true, true, false, FirstRun, FirstRun, Never, false, false)] - [InlineData(false, false, true, Never, SecondRun, SecondRun, true, true)] - [InlineData(true, false, true, SecondRun, SecondRun, SecondRun, true, true)] - [InlineData(false, true, true, Never, SecondRun, Never, false, false)] - [InlineData(true, true, true, SecondRun, SecondRun, Never, false, false)] + [InlineData(false, false, false, false, Never, FirstRun, FirstRun, true, true)] + [InlineData(true, false, false, false, FirstRun, FirstRun, FirstRun, true, true)] + [InlineData(false, true, false, false, Never, FirstRun, Never, false, false)] + [InlineData(true, true, false, false, FirstRun, FirstRun, Never, false, false)] + [InlineData(false, false, true, false, Never, Never, Never, true, true)] + [InlineData(true, false, true, false, FirstRun, Never, Never, true, true)] + [InlineData(false, true, true, false, Never, Never, Never, false, false)] + [InlineData(true, true, true, false, FirstRun, Never, Never, false, false)] + [InlineData(false, false, false, true, Never, SecondRun, SecondRun, true, true)] + [InlineData(true, false, false, true, SecondRun, SecondRun, SecondRun, true, true)] + [InlineData(false, true, false, true, Never, SecondRun, Never, false, false)] + [InlineData(true, true, false, true, SecondRun, SecondRun, Never, false, false)] + [InlineData(false, false, true, true, Never, Never, Never, true, true)] + [InlineData(true, false, true, true, SecondRun, Never, Never, true, true)] + [InlineData(false, true, true, true, Never, Never, Never, false, false)] + [InlineData(true, true, true, true, SecondRun, Never, Never, false, false)] public void FlagsCombinationAndAction( // Inputs bool DOTNET_GENERATE_ASPNET_CERTIFICATE, bool DOTNET_CLI_TELEMETRY_OPTOUT, + bool DOTNET_NOLOGO, // true to simulate install via installer. The first run is during installer, // silent but has sudo permission // false to simulate install via zip/tar.gz @@ -75,11 +84,14 @@ bool telemetrySecondRunShouldBeEnabled ResetObjectState(); _environmentProvider - .Setup(p => p.GetEnvironmentVariableAsBool("DOTNET_GENERATE_ASPNET_CERTIFICATE", It.IsAny())) - .Returns(DOTNET_GENERATE_ASPNET_CERTIFICATE); + .Setup(p => p.GetEnvironmentVariableAsBool("DOTNET_GENERATE_ASPNET_CERTIFICATE", It.IsAny())) + .Returns(DOTNET_GENERATE_ASPNET_CERTIFICATE); _environmentProvider .Setup(p => p.GetEnvironmentVariableAsBool("DOTNET_CLI_TELEMETRY_OPTOUT", It.IsAny())) .Returns(DOTNET_CLI_TELEMETRY_OPTOUT); + _environmentProvider + .Setup(p => p.GetEnvironmentVariableAsBool("DOTNET_NOLOGO", It.IsAny())) + .Returns(DOTNET_NOLOGO); _environmentProvider .Setup(p => p.GetEnvironmentVariableAsBool("DOTNET_ADD_GLOBAL_TOOLS_TO_PATH", It.IsAny())) .Returns(true); @@ -206,6 +218,8 @@ private Telemetry RunConfigUsingMocks(bool isInstallerRun) _environmentProviderObject.GetEnvironmentVariableAsBool("DOTNET_CLI_TELEMETRY_OPTOUT", false); bool addGlobalToolsToPath = _environmentProviderObject.GetEnvironmentVariableAsBool("DOTNET_ADD_GLOBAL_TOOLS_TO_PATH", defaultValue: true); + bool nologo = + _environmentProviderObject.GetEnvironmentVariableAsBool("DOTNET_NOLOGO", defaultValue: false); IAspNetCertificateSentinel aspNetCertificateSentinel; IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel; @@ -233,7 +247,8 @@ private Telemetry RunConfigUsingMocks(bool isInstallerRun) ( generateAspNetCertificate: generateAspNetCertificate, telemetryOptout: telemetryOptout, - addGlobalToolsToPath: addGlobalToolsToPath + addGlobalToolsToPath: addGlobalToolsToPath, + nologo: nologo ), reporter: _reporterMock, cliFallbackFolderPath: CliFallbackFolderPath, diff --git a/src/Tests/Microsoft.NET.Build.Tests/COMReferenceTests.cs b/src/Tests/Microsoft.NET.Build.Tests/COMReferenceTests.cs index 7e61b6162e81..b64769c78fa2 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/COMReferenceTests.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/COMReferenceTests.cs @@ -19,60 +19,44 @@ public COMReferenceTests(ITestOutputHelper log) : base(log) { } - [FullMSBuildOnlyTheory(Skip ="Too much dependency on build machine state.")] + [FullMSBuildOnlyTheory()] [InlineData(true)] [InlineData(false)] public void COMReferenceBuildsAndRuns(bool embedInteropTypes) { var targetFramework = "netcoreapp3.0"; - var testProject = new TestProject { - Name = "UseMediaPlayer", + Name = "UseComReferences", IsSdkProject = true, TargetFrameworks = targetFramework, IsExe = true, SourceFiles = { ["Program.cs"] = @" - using MediaPlayer; class Program { static void Main(string[] args) { - var mediaPlayer = (IMediaPlayer2)new MediaPlayerClass(); + System.Console.WriteLine(typeof(VSLangProj.VSProject)); } } ", } }; - if (embedInteropTypes) - { - testProject.SourceFiles.Add("MediaPlayerClass.cs", @" - using System.Runtime.InteropServices; - namespace MediaPlayer - { - [ComImport] - [Guid(""22D6F312-B0F6-11D0-94AB-0080C74C7E95"")] - class MediaPlayerClass { } - } - "); - } - var reference = new XElement("ItemGroup", new XElement("COMReference", - new XAttribute("Include", "MediaPlayer.dll"), - new XElement("Guid", "22d6f304-b0f6-11d0-94ab-0080c74c7e95"), - new XElement("VersionMajor", "1"), + new XAttribute("Include", "VSLangProj.dll"), + new XElement("Guid", "49a1950e-3e35-4595-8cb9-920c64c44d67"), + new XElement("VersionMajor", "7"), new XElement("VersionMinor", "0"), new XElement("WrapperTool", "tlbimp"), new XElement("Lcid", "0"), new XElement("Isolated", "false"), new XElement("EmbedInteropTypes", embedInteropTypes))); - var testAsset = _testAssetsManager .CreateTestProject(testProject, identifier: embedInteropTypes.ToString()) .WithProjectChanges(doc => doc.Root.Add(reference)); @@ -81,8 +65,79 @@ class MediaPlayerClass { } buildCommand.Execute().Should().Pass(); var outputDirectory = buildCommand.GetOutputDirectory(targetFramework); - var runCommand = new RunExeCommand(Log, outputDirectory.File("UseMediaPlayer.exe").FullName); + var runCommand = new RunExeCommand(Log, outputDirectory.File("UseComReferences.exe").FullName); runCommand.Execute().Should().Pass(); } + + [FullMSBuildOnlyFact] + public void COMReferenceProperlyPublish() + { + var targetFramework = "netcoreapp3.0"; + + var testProject = new TestProject + { + Name = "MultiComReference", + IsSdkProject = true, + TargetFrameworks = targetFramework, + IsExe = true, + SourceFiles = + { + ["Program.cs"] = @" + class Program + { + static void Main(string[] args) + { + } + } + " + } + }; + + var vslangProj70ComRef = "VSLangProj.dll"; + var reference1 = new XElement("ItemGroup", + new XElement("COMReference", + new XAttribute("Include", vslangProj70ComRef), + new XElement("Guid", "49a1950e-3e35-4595-8cb9-920c64c44d67"), + new XElement("VersionMajor", "7"), + new XElement("VersionMinor", "0"), + new XElement("WrapperTool", "tlbimp"), + new XElement("Lcid", "0"), + new XElement("Isolated", "false"), + new XElement("EmbedInteropTypes", "false"))); + + var vslangProj80ComRef = "VSLangProj80.dll"; + var reference2 = new XElement("ItemGroup", + new XElement("COMReference", + new XAttribute("Include", vslangProj80ComRef), + new XElement("Guid", "307953c0-7973-490a-a4a7-25999e023be8"), + new XElement("VersionMajor", "8"), + new XElement("VersionMinor", "0"), + new XElement("WrapperTool", "tlbimp"), + new XElement("Lcid", "0"), + new XElement("Isolated", "false"), + new XElement("EmbedInteropTypes", "false"))); + + var testAsset = _testAssetsManager + .CreateTestProject(testProject) + .WithProjectChanges(doc => doc.Root.Add(new[] { reference1, reference2 })); + + var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); + buildCommand.Execute().Should().Pass(); + + var outputDirectory = buildCommand.GetOutputDirectory(targetFramework); + + // COM References by default adds the 'Interop.' prefix. + Assert.True(outputDirectory.File($"Interop.{vslangProj70ComRef}").Exists); + Assert.True(outputDirectory.File($"Interop.{vslangProj80ComRef}").Exists); + + var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); + publishCommand.Execute().Should().Pass(); + + outputDirectory = publishCommand.GetOutputDirectory(targetFramework); + + // COM References by default adds the 'Interop.' prefix. + Assert.True(outputDirectory.File($"Interop.{vslangProj70ComRef}").Exists); + Assert.True(outputDirectory.File($"Interop.{vslangProj80ComRef}").Exists); + } } } 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 6be2a8fc7d86..05d8170581d6 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs @@ -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); }); @@ -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); diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs index 4787d3170f71..86ee935c768d 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs @@ -38,6 +38,7 @@ public void WhenPropertiesAreSetItCanGenerateMinimumOSPlatformAttribute() var targetPlatformIdentifier = "iOS"; testProject.AdditionalProperties["TargetPlatformIdentifier"] = targetPlatformIdentifier; + testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; testProject.AdditionalProperties["MinimumOSPlatform"] = "13.2"; testProject.AdditionalProperties["TargetPlatformVersion"] = "14.0"; @@ -57,6 +58,7 @@ public void WhenMinimumOSPlatformISNotSetTargetPlatformVersionIsSetItCanGenerate var targetPlatformIdentifier = "iOS"; testProject.AdditionalProperties["TargetPlatformIdentifier"] = targetPlatformIdentifier; + testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; testProject.AdditionalProperties["TargetPlatformVersion"] = "13.2"; var testAsset = _testAssetsManager.CreateTestProject(testProject); @@ -75,6 +77,7 @@ public void WhenMinimumOSPlatformIsHigherThanTargetPlatformVersionItShouldError( var targetPlatformIdentifier = "iOS"; testProject.AdditionalProperties["TargetPlatformIdentifier"] = targetPlatformIdentifier; + testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; testProject.AdditionalProperties["TargetPlatformVersion"] = "13.2"; testProject.AdditionalProperties["MinimumOSPlatform"] = "14.0"; diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs new file mode 100644 index 000000000000..aeb64fbbaf06 --- /dev/null +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs @@ -0,0 +1,106 @@ +// 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) + {} + + [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 + testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: propertyName); + + var buildCommand = new BuildCommand(testAsset); + buildCommand.Execute() + .Should() + .Fail() + .And + .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); + + var buildCommand = new BuildCommand(testAsset); + buildCommand.Execute() + .Should() + .Fail() + .And + .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"); + } + } +} 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..5da3792a7fe7 --- /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("NETSDK1138"); + } + } +} 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/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs index c38e5e157567..a737263a19e9 100644 --- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs +++ b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishANetCoreAppForTelemetry.cs @@ -60,7 +60,7 @@ public void It_collects_Trimmer_SingleFile_ReadyToRun_publishing_properties(stri "\"CompileListCount\":\"[1-9]\\d?\""); // Do not hardcode number of assemblies being compiled here, due to ILTrimmer } - [CoreMSBuildOnlyTheory(Skip = "https://github.com/dotnet/runtime/issues/37196")] + [CoreMSBuildOnlyTheory] [InlineData("net5.0")] void It_collects_crossgen2_publishing_properties(string targetFramework) { diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishReadyToRun.cs b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishReadyToRun.cs index 8ca0da02e92c..5f9384eef3c6 100644 --- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishReadyToRun.cs +++ b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishReadyToRun.cs @@ -194,7 +194,7 @@ public void It_can_publish_readytorun_for_selfcontained_library_projects(string TestProjectPublishing_Internal("LibraryProject2", targetFramework, isSelfContained:true, makeExeProject: false); } - [Theory(Skip = "https://github.com/dotnet/runtime/issues/37196")] + [Theory] [InlineData("net5.0")] void It_can_publish_readytorun_using_crossgen2(string targetFramework) { @@ -202,7 +202,18 @@ void It_can_publish_readytorun_using_crossgen2(string targetFramework) if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.OSArchitecture != Architecture.X64) return; - TestProjectPublishing_Internal("Crossgen2TestApp", targetFramework, isSelfContained: true, emitNativeSymbols: true, useCrossgen2: true); + TestProjectPublishing_Internal("Crossgen2TestApp", targetFramework, isSelfContained: true, emitNativeSymbols: true, useCrossgen2: true, composite: false); + } + + [Theory] + [InlineData("net5.0")] + void It_can_publish_readytorun_using_crossgen2_composite_mode(string targetFramework) + { + // Crossgen2 only supported for Linux/Windows x64 scenarios for now + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.OSArchitecture != Architecture.X64) + return; + + TestProjectPublishing_Internal("Crossgen2TestApp", targetFramework, isSelfContained: true, emitNativeSymbols: false, useCrossgen2: true, composite: true); } [Theory] @@ -233,7 +244,7 @@ public void It_only_supports_selfcontained_when_using_crossgen2(string targetFra .And.HaveStdOutContainingIgnoreCase("NETSDK1126"); } - private void TestProjectPublishing_Internal(string projectName, string targetFramework, bool makeExeProject = true, bool isSelfContained = true, bool emitNativeSymbols = false, bool useCrossgen2 = false) + private void TestProjectPublishing_Internal(string projectName, string targetFramework, bool makeExeProject = true, bool isSelfContained = true, bool emitNativeSymbols = false, bool useCrossgen2 = false, bool composite = true) { var testProject = CreateTestProjectForR2RTesting( targetFramework, @@ -244,6 +255,7 @@ private void TestProjectPublishing_Internal(string projectName, string targetFra testProject.AdditionalProperties["PublishReadyToRun"] = "True"; testProject.AdditionalProperties["PublishReadyToRunEmitSymbols"] = emitNativeSymbols ? "True" : "False"; testProject.AdditionalProperties["PublishReadyToRunUseCrossgen2"] = useCrossgen2 ? "True" : "False"; + testProject.AdditionalProperties["PublishReadyToRunComposite"] = composite ? "True" : "False"; testProject.AdditionalProperties["SelfContained"] = isSelfContained ? "True" : "False"; var testProjectInstance = _testAssetsManager.CreateTestProject(testProject); diff --git a/src/Tests/Microsoft.NET.TestFramework/Attributes/RequiresMSBuildVersionFactAttribute.cs b/src/Tests/Microsoft.NET.TestFramework/Attributes/RequiresMSBuildVersionFactAttribute.cs index b07de809567c..86f9ede5be93 100644 --- a/src/Tests/Microsoft.NET.TestFramework/Attributes/RequiresMSBuildVersionFactAttribute.cs +++ b/src/Tests/Microsoft.NET.TestFramework/Attributes/RequiresMSBuildVersionFactAttribute.cs @@ -10,23 +10,7 @@ public class RequiresMSBuildVersionFactAttribute : FactAttribute { public RequiresMSBuildVersionFactAttribute(string version) { - if (TestContext.Current.ToolsetUnderTest.ShouldUseFullFrameworkMSBuild) - { - if (!Version.TryParse(TestContext.Current.ToolsetUnderTest.MSBuildVersion, out Version msbuildVersion)) - { - this.Skip = $"Failed to determine the version of MSBuild ({ TestContext.Current.ToolsetUnderTest.MSBuildVersion })."; - return; - } - if (!Version.TryParse(version, out Version requiredVersion)) - { - this.Skip = $"Failed to determine the version required by this test ({ version })."; - return; - } - if (requiredVersion > msbuildVersion) - { - this.Skip = $"This test requires MSBuild version { version } to run (using { TestContext.Current.ToolsetUnderTest.MSBuildVersion })."; - } - } + RequiresMSBuildVersionTheoryAttribute.CheckForRequiredMSBuildVersion(this, version); } } } diff --git a/src/Tests/Microsoft.NET.TestFramework/Attributes/RequiresMSBuildVersionTheoryAttribute.cs b/src/Tests/Microsoft.NET.TestFramework/Attributes/RequiresMSBuildVersionTheoryAttribute.cs index 09bca5f17035..86a7178144d4 100644 --- a/src/Tests/Microsoft.NET.TestFramework/Attributes/RequiresMSBuildVersionTheoryAttribute.cs +++ b/src/Tests/Microsoft.NET.TestFramework/Attributes/RequiresMSBuildVersionTheoryAttribute.cs @@ -9,22 +9,27 @@ namespace Microsoft.NET.TestFramework public class RequiresMSBuildVersionTheoryAttribute : TheoryAttribute { public RequiresMSBuildVersionTheoryAttribute(string version) + { + CheckForRequiredMSBuildVersion(this, version); + } + + public static void CheckForRequiredMSBuildVersion(FactAttribute attribute, string version) { if (TestContext.Current.ToolsetUnderTest.ShouldUseFullFrameworkMSBuild) { if (!Version.TryParse(TestContext.Current.ToolsetUnderTest.MSBuildVersion, out Version msbuildVersion)) { - this.Skip = $"Failed to determine the version of MSBuild ({ TestContext.Current.ToolsetUnderTest.MSBuildVersion })."; + attribute.Skip = $"Failed to determine the version of MSBuild ({ TestContext.Current.ToolsetUnderTest.MSBuildVersion })."; return; } if (!Version.TryParse(version, out Version requiredVersion)) { - this.Skip = $"Failed to determine the version required by this test ({ version })."; + attribute.Skip = $"Failed to determine the version required by this test ({ version })."; return; } if (requiredVersion > msbuildVersion) { - this.Skip = $"This test requires MSBuild version { version } to run (using { TestContext.Current.ToolsetUnderTest.MSBuildVersion })."; + attribute.Skip = $"This test requires MSBuild version { version } to run (using { TestContext.Current.ToolsetUnderTest.MSBuildVersion })."; } } } diff --git a/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionFactAttribute.cs b/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionFactAttribute.cs new file mode 100644 index 000000000000..c4fde2edb6c0 --- /dev/null +++ b/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionFactAttribute.cs @@ -0,0 +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. + +using System.Runtime.InteropServices; +using Xunit; + +namespace Microsoft.NET.TestFramework +{ + public class WindowsOnlyRequiresMSBuildVersionFactAttribute : FactAttribute + { + public WindowsOnlyRequiresMSBuildVersionFactAttribute(string version) + { + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + this.Skip = "This test requires Windows to run"; + } + + RequiresMSBuildVersionTheoryAttribute.CheckForRequiredMSBuildVersion(this, version); + } + } +} diff --git a/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs b/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs new file mode 100644 index 000000000000..e46be93c0ae2 --- /dev/null +++ b/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs @@ -0,0 +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. + +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.Tests/CommandTests/CompleteCommandTests.cs b/src/Tests/dotnet.Tests/CommandTests/CompleteCommandTests.cs index f5632991930b..b01b7f1dfea2 100644 --- a/src/Tests/dotnet.Tests/CommandTests/CompleteCommandTests.cs +++ b/src/Tests/dotnet.Tests/CommandTests/CompleteCommandTests.cs @@ -184,6 +184,7 @@ public void GivenNuGetPushCommandItDisplaysCompletions() "--help", "--no-service-endpoint", "--no-symbols", + "--skip-duplicate", "--source", "--symbol-api-key", "--symbol-source",