From f33c9dbc4748364c0e9eddc537e01e8b138a5c80 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 15 Jul 2020 18:00:50 -0700 Subject: [PATCH 01/39] Update dependencies from https://github.com/dotnet/arcade build 20200714.3 (#12501) Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.Arcade.Sdk From Version 5.0.0-beta.20330.3 -> To Version 5.0.0-beta.20364.3 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 16 ++--- eng/Versions.props | 4 +- eng/common/SetupNugetSources.ps1 | 12 ++-- eng/common/SetupNugetSources.sh | 41 +++++++------ eng/common/performance/performance-setup.ps1 | 5 ++ eng/common/performance/performance-setup.sh | 4 ++ eng/common/post-build/symbols-validation.ps1 | 2 +- eng/common/templates/job/job.yml | 12 ++++ .../channels/generic-internal-channel.yml | 4 ++ .../templates/post-build/post-build.yml | 60 ++++++++++++------- eng/common/tools.ps1 | 2 +- global.json | 4 +- 12 files changed, 102 insertions(+), 64 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0165879e99d2..e9420c04033e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,9 +13,9 @@ https://github.com/dotnet/runtime f37dd6fc8595e130909dcb3085a56342d04aa20c - + https://github.com/dotnet/arcade - 243cc92161ad44c2a07464425892daee19121c99 + ff5d4b6c8dbdaeacb6e6159d3f8185118dffd915 https://github.com/dotnet/runtime @@ -119,17 +119,17 @@ - + https://github.com/dotnet/arcade - 243cc92161ad44c2a07464425892daee19121c99 + ff5d4b6c8dbdaeacb6e6159d3f8185118dffd915 - + https://github.com/dotnet/arcade - 243cc92161ad44c2a07464425892daee19121c99 + ff5d4b6c8dbdaeacb6e6159d3f8185118dffd915 - + https://github.com/dotnet/arcade - 243cc92161ad44c2a07464425892daee19121c99 + ff5d4b6c8dbdaeacb6e6159d3f8185118dffd915 diff --git a/eng/Versions.props b/eng/Versions.props index 52c57a3bf29e..1fac0e1e11f9 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -26,7 +26,7 @@ $(NewtonsoftJsonPackageVersion) 4.0.0 1.8.0 - 5.0.0-beta.20330.3 + 5.0.0-beta.20364.3 3.1.0 5.0.0-preview.8.20361.2 4.3.0 @@ -141,7 +141,7 @@ 4.19.2 4.19.0 - 5.0.0-beta.20330.3 + 5.0.0-beta.20364.3 .exe diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1 index c3c473eb83e6..dc22178125a6 100644 --- a/eng/common/SetupNugetSources.ps1 +++ b/eng/common/SetupNugetSources.ps1 @@ -128,16 +128,16 @@ $userName = "dn-bot" # Insert credential nodes for Maestro's private feeds InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -Password $Password -$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']") -if ($dotnet3Source -ne $null) { - AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password - AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password -} - $dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']") if ($dotnet31Source -ne $null) { AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password } +$dotnet5Source = $sources.SelectSingleNode("add[@key='dotnet5']") +if ($dotnet5Source -ne $null) { + AddPackageSource -Sources $sources -SourceName "dotnet5-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password + AddPackageSource -Sources $sources -SourceName "dotnet5-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password +} + $doc.Save($filename) diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh index 7d6fef27fe49..f33e37711e72 100644 --- a/eng/common/SetupNugetSources.sh +++ b/eng/common/SetupNugetSources.sh @@ -79,53 +79,52 @@ fi PackageSources=() -# Ensure dotnet3-internal and dotnet3-internal-transport are in the packageSources if the public dotnet3 feeds are present -grep -i "" $ConfigFile + grep -i "" + PackageSourceTemplate="${TB}" sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile fi - PackageSources+=('dotnet3-internal') + PackageSources+=('dotnet3.1-internal') - grep -i "" $ConfigFile if [ "$?" != "0" ]; then - echo "Adding dotnet3-internal-transport to the packageSources." + echo "Adding dotnet3.1-internal-transport to the packageSources." PackageSourcesNodeFooter="" - PackageSourceTemplate="${TB}" + PackageSourceTemplate="${TB}" sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile fi - PackageSources+=('dotnet3-internal-transport') + PackageSources+=('dotnet3.1-internal-transport') fi -# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present -grep -i "" + PackageSourceTemplate="${TB}" sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile fi - PackageSources+=('dotnet3.1-internal') + PackageSources+=('dotnet5-internal') - grep -i "" $ConfigFile + grep -i "" $ConfigFile if [ "$?" != "0" ]; then - echo "Adding dotnet3.1-internal-transport to the packageSources." + echo "Adding dotnet5-internal-transport to the packageSources." PackageSourcesNodeFooter="" - PackageSourceTemplate="${TB}" + PackageSourceTemplate="${TB}" sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile fi - PackageSources+=('dotnet3.1-internal-transport') + PackageSources+=('dotnet5-internal-transport') fi # I want things split line by line diff --git a/eng/common/performance/performance-setup.ps1 b/eng/common/performance/performance-setup.ps1 index 31a99e49015f..656c0bd9022c 100644 --- a/eng/common/performance/performance-setup.ps1 +++ b/eng/common/performance/performance-setup.ps1 @@ -54,6 +54,11 @@ if ($Internal) { $HelixSourcePrefix = "official" } +if($MonoInterpreter) +{ + $ExtraBenchmarkDotNetArguments = "--category-exclusion-filter NoInterpreter" +} + if($MonoDotnet -ne "") { $Configurations += " LLVM=$LLVM MonoInterpreter=$MonoInterpreter MonoAOT=$MonoAOT" diff --git a/eng/common/performance/performance-setup.sh b/eng/common/performance/performance-setup.sh index 9409e4d85e92..c87cbf0fc232 100755 --- a/eng/common/performance/performance-setup.sh +++ b/eng/common/performance/performance-setup.sh @@ -191,6 +191,10 @@ if [[ "$mono_dotnet" != "" ]]; then configurations="$configurations LLVM=$llvm MonoInterpreter=$monointerpreter MonoAOT=$monoaot" fi +if [[ "$monointerpreter" == "true" ]]; then + extra_benchmark_dotnet_arguments="--category-exclusion-filter NoInterpreter" +fi + common_setup_arguments="--channel master --queue $queue --build-number $build_number --build-configs $configurations --architecture $architecture" setup_arguments="--repository https://github.com/$repository --branch $branch --get-perf-hash --commit-sha $commit_sha $common_setup_arguments" diff --git a/eng/common/post-build/symbols-validation.ps1 b/eng/common/post-build/symbols-validation.ps1 index 495428ea2b51..a36fa6f26bcd 100644 --- a/eng/common/post-build/symbols-validation.ps1 +++ b/eng/common/post-build/symbols-validation.ps1 @@ -144,7 +144,7 @@ $CountMissingSymbols = { if ($MissingSymbols -ne 0) { - Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $MissingSymbols modules in the package $FileName" + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $MissingSymbols modules in the package $PackagePath" } Pop-Location diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index c08bb416d562..e78ed9a1c6ec 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -65,6 +65,9 @@ jobs: - ${{ if ne(parameters.enableTelemetry, 'false') }}: - name: DOTNET_CLI_TELEMETRY_PROFILE value: '$(Build.Repository.Uri)' + - ${{ if eq(parameters.enableRichCodeNavigation, 'true') }}: + - name: EnableRichCodeNavigation + value: 'true' - ${{ each variable in parameters.variables }}: # handle name-value variable syntax # example: @@ -124,6 +127,15 @@ jobs: - ${{ each step in parameters.steps }}: - ${{ step }} + - ${{ if eq(parameters.enableRichCodeNavigation, true) }}: + - task: RichCodeNavIndexer@0 + displayName: RichCodeNav Upload + inputs: + languages: 'csharp' + environment: ${{ coalesce(parameters.richCodeNavigationEnvironment, 'prod') }} + richNavLogOutputDirectory: $(Build.SourcesDirectory)/artifacts/bin + continueOnError: true + - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - task: MicroBuildCleanup@1 diff --git a/eng/common/templates/post-build/channels/generic-internal-channel.yml b/eng/common/templates/post-build/channels/generic-internal-channel.yml index 258ba4b7706d..12db36ebe74f 100644 --- a/eng/common/templates/post-build/channels/generic-internal-channel.yml +++ b/eng/common/templates/post-build/channels/generic-internal-channel.yml @@ -35,6 +35,10 @@ stages: pool: vmImage: 'windows-2019' steps: + # This is necessary whenever we want to publish/restore to an AzDO private feed + - task: NuGetAuthenticate@0 + displayName: 'Authenticate to AzDO Feeds' + - task: DownloadBuildArtifacts@0 displayName: Download Build Assets continueOnError: true diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 07fc2e982df1..0e79a546b553 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -46,15 +46,16 @@ parameters: NETCoreExperimentalChannelId: 562 NetEngServicesIntChannelId: 678 NetEngServicesProdChannelId: 679 - Net5Preview5ChannelId: 857 - Net5Preview6ChannelId: 1013 Net5Preview7ChannelId: 1065 + Net5Preview8ChannelId: 1155 + Net5RC1ChannelId: 1157 NetCoreSDK313xxChannelId: 759 NetCoreSDK313xxInternalChannelId: 760 NetCoreSDK314xxChannelId: 921 NetCoreSDK314xxInternalChannelId: 922 VS166ChannelId: 1010 VS167ChannelId: 1011 + VS168ChannelId: 1154 VSMasterChannelId: 1012 stages: @@ -114,7 +115,7 @@ stages: inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/check-channel-consistency.ps1 arguments: -PromoteToChannels "$(TargetChannels)" - -AvailableChannelIds ${{parameters.NetEngLatestChannelId}},${{parameters.NetEngValidationChannelId}},${{parameters.NetDev5ChannelId}},${{parameters.GeneralTestingChannelId}},${{parameters.NETCoreToolingDevChannelId}},${{parameters.NETCoreToolingReleaseChannelId}},${{parameters.NETInternalToolingChannelId}},${{parameters.NETCoreExperimentalChannelId}},${{parameters.NetEngServicesIntChannelId}},${{parameters.NetEngServicesProdChannelId}},${{parameters.Net5Preview5ChannelId}},${{parameters.Net5Preview6ChannelId}},${{parameters.Net5Preview7ChannelId}},${{parameters.NetCoreSDK313xxChannelId}},${{parameters.NetCoreSDK313xxInternalChannelId}},${{parameters.NetCoreSDK314xxChannelId}},${{parameters.NetCoreSDK314xxInternalChannelId}},${{parameters.VS166ChannelId}},${{parameters.VS167ChannelId}},${{parameters.VSMasterChannelId}} + -AvailableChannelIds ${{parameters.NetEngLatestChannelId}},${{parameters.NetEngValidationChannelId}},${{parameters.NetDev5ChannelId}},${{parameters.GeneralTestingChannelId}},${{parameters.NETCoreToolingDevChannelId}},${{parameters.NETCoreToolingReleaseChannelId}},${{parameters.NETInternalToolingChannelId}},${{parameters.NETCoreExperimentalChannelId}},${{parameters.NetEngServicesIntChannelId}},${{parameters.NetEngServicesProdChannelId}},${{parameters.Net5Preview7ChannelId}},${{parameters.Net5Preview8ChannelId}},${{parameters.Net5RC1ChannelId}},${{parameters.NetCoreSDK313xxChannelId}},${{parameters.NetCoreSDK313xxInternalChannelId}},${{parameters.NetCoreSDK314xxChannelId}},${{parameters.NetCoreSDK314xxInternalChannelId}},${{parameters.VS166ChannelId}},${{parameters.VS167ChannelId}},${{parameters.VS168ChannelId}},${{parameters.VSMasterChannelId}} - job: displayName: NuGet Validation @@ -275,41 +276,41 @@ stages: dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'Net5_Preview5_Publish' - channelName: '.NET 5 Preview 5' - akaMSChannelName: 'net5/preview5' - channelId: ${{ parameters.Net5Preview5ChannelId }} + stageName: 'Net5_Preview7_Publish' + channelName: '.NET 5 Preview 7' + akaMSChannelName: 'net5/preview7' + channelId: ${{ parameters.Net5Preview7ChannelId }} transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json' - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + - template: \eng\common\templates\post-build\channels\generic-internal-channel.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'Net5_Preview6_Publish' - channelName: '.NET 5 Preview 6' - akaMSChannelName: 'net5/preview6' - channelId: ${{ parameters.Net5Preview6ChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json' + stageName: 'Net5_Preview8_Publish' + channelName: '.NET 5 Preview 8' + akaMSChannelName: 'net5/preview8' + channelId: ${{ parameters.Net5Preview8ChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-symbols/nuget/v3/index.json' - - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + - template: \eng\common\templates\post-build\channels\generic-internal-channel.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} dependsOn: ${{ parameters.publishDependsOn }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'Net5_Preview7_Publish' - channelName: '.NET 5 Preview 7' - akaMSChannelName: 'net5/preview7' - channelId: ${{ parameters.Net5Preview7ChannelId }} - transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json' - shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json' - symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json' + stageName: 'Net5_RC1_Publish' + channelName: '.NET 5 RC 1' + akaMSChannelName: 'net5/rc1' + channelId: ${{ parameters.Net5RC1ChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-symbols/nuget/v3/index.json' - template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: @@ -509,6 +510,19 @@ stages: shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'VS16_8_Publishing' + channelName: 'VS 16.8' + channelId: ${{ parameters.VS168ChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index d68684e2a166..6f8bc41116b7 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -385,7 +385,7 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) { Create-Directory $packageDir Write-Host "Downloading $packageName $packageVersion" $ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit - Invoke-WebRequest "https://dotnet.myget.org/F/roslyn-tools/api/v2/package/$packageName/$packageVersion/" -OutFile $packagePath + Invoke-WebRequest "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/flat2/$packageName/$packageVersion/$packageName.$packageVersion.nupkg" -OutFile $packagePath Unzip $packagePath $packageDir } diff --git a/global.json b/global.json index 4c8477da6fe6..7538e2e725c6 100644 --- a/global.json +++ b/global.json @@ -11,7 +11,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20330.3", - "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20330.3" + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20364.3", + "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20364.3" } } From df71ee0ea04d994aebc8a87df9572c51752709e4 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 16 Jul 2020 08:13:33 -0700 Subject: [PATCH 02/39] Enable builds of internal branches (#12517) --- .vsts-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index ce8b1bb23a5e..3b8c5d88ab1d 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -5,6 +5,7 @@ trigger: - master - release/* - internal/release/3.* + - internal/release/5.* variables: - name: teamName From 3cb3695049a08379a4ab3c971270623f1048ae9c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2020 23:18:07 +0000 Subject: [PATCH 03/39] [release/5.0.1xx-preview8] Update dependencies from microsoft/msbuild (#12526) * Update dependencies from https://github.com/microsoft/msbuild build 20200716.2 Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20360-03 -> To Version 16.8.0-preview-20366-02 * Update dependencies from https://github.com/microsoft/msbuild build 20200717.6 Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20360-03 -> To Version 16.8.0-preview-20367-06 * Fix issues packing projects Co-authored-by: dotnet-maestro[bot] Co-authored-by: Daniel Plaisted --- Directory.Build.targets | 7 +++++++ eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- .../Microsoft.NET.Build.Tasks.csproj | 3 +++ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index 6f88acb6248f..6ec6b35ada26 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -11,6 +11,13 @@ false false + + + + false + false + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e9420c04033e..225ee4092859 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -33,13 +33,13 @@ https://github.com/dotnet/CliCommandLineParser 0e89c2116ad28e404ba56c14d1c3f938caa25a01 - + https://github.com/microsoft/msbuild - 188921e2ffecf6c74dd4583cf01b62465fcbee3c + ccca596f350c87b9483577b956ed3dae7e7e1960 - + https://github.com/microsoft/msbuild - 188921e2ffecf6c74dd4583cf01b62465fcbee3c + ccca596f350c87b9483577b956ed3dae7e7e1960 https://github.com/dotnet/fsharp diff --git a/eng/Versions.props b/eng/Versions.props index 1fac0e1e11f9..fe71ba5267ff 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -83,10 +83,10 @@ - 16.7.0-preview-20360-03 + 16.8.0-preview-20367-06 $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) - 16.7.0-preview-20360-03 + 16.8.0-preview-20367-06 $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) $(MicrosoftBuildFrameworkPackageVersion) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj b/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj index 3ff8b10300b9..ecc4d885c6e8 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj +++ b/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj @@ -32,6 +32,9 @@ $(BaseOutputPath) true $(ArtifactsBinDir)$(Configuration)\Sdks\$(PackageId)\ + + + true From e36cc9819f41e1706ef94b616a3581d9157f5336 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Sat, 18 Jul 2020 03:59:51 +0000 Subject: [PATCH 04/39] Update dependencies from https://github.com/dotnet/fsharp build 20200717.6 (#12551) Microsoft.FSharp.Compiler From Version 10.10.0-beta.20361.3 -> To Version 11.0.0-beta.20367.6 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 225ee4092859..639c59bb3007 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -41,9 +41,9 @@ https://github.com/microsoft/msbuild ccca596f350c87b9483577b956ed3dae7e7e1960 - + https://github.com/dotnet/fsharp - 3ef6f0b514198c0bfa6c2c09fefe41a740b024d5 + 66042d33b998a180edbd99af6064da85f8977bf3 https://github.com/dotnet/roslyn diff --git a/eng/Versions.props b/eng/Versions.props index fe71ba5267ff..379158a16e4e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -107,7 +107,7 @@ - 10.10.0-beta.20361.3 + 11.0.0-beta.20367.6 From aac822b55d5b5b0fd9ed3763a5ca92fd8ce60119 Mon Sep 17 00:00:00 2001 From: Vijay Ramakrishnan Date: Thu, 16 Jul 2020 19:44:50 -0700 Subject: [PATCH 05/39] Only include the LaunchSettings & ServiceDependencies in None if present --- .../Targets/Microsoft.NET.Sdk.Web.DefaultItems.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WebSdk/ProjectSystem/Targets/Microsoft.NET.Sdk.Web.DefaultItems.props b/src/WebSdk/ProjectSystem/Targets/Microsoft.NET.Sdk.Web.DefaultItems.props index 4aeeaf54e013..76335ab9bb87 100644 --- a/src/WebSdk/ProjectSystem/Targets/Microsoft.NET.Sdk.Web.DefaultItems.props +++ b/src/WebSdk/ProjectSystem/Targets/Microsoft.NET.Sdk.Web.DefaultItems.props @@ -16,8 +16,8 @@ Copyright (c) .NET Foundation. All rights reserved. And '$(EnableDefaultNoneItems)' == 'true' And '$(AppDesignerFolder)' != ''"> - <_WebToolingArtifacts Include="$(AppDesignerFolder)\launchSettings.json; - $(AppDesignerFolder)\serviceDependencies.json; + <_WebToolingArtifacts Include="$(AppDesignerFolder)\launchSettings*.json; + $(AppDesignerFolder)\serviceDependencies*.json; $(AppDesignerFolder)\serviceDependencies.*.json; $(AppDesignerFolder)\ServiceDependencies\**; $(AppDesignerFolder)\PublishProfiles\**" From 37c8a74876e085f3ff5c844b8b45c17fc98654cf Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2020 17:15:35 +0000 Subject: [PATCH 06/39] Update dependencies from https://github.com/dotnet/roslyn build 20200717.11 (#12570) Microsoft.Net.Compilers.Toolset From Version 3.7.0-5.20365.2 -> To Version 3.8.0-1.20367.11 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 639c59bb3007..6c6b85fe0529 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -45,9 +45,9 @@ https://github.com/dotnet/fsharp 66042d33b998a180edbd99af6064da85f8977bf3 - + https://github.com/dotnet/roslyn - 598796cd274b852b5be35398133516e19f543744 + fb7b2e716d163b7abebf57db505e01a4a521ddae https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 379158a16e4e..af63f945c74c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -111,7 +111,7 @@ - 3.7.0-5.20365.2 + 3.8.0-1.20367.11 From dab25343dc38d76e7c2cd9908f8637af5c95d783 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2020 17:32:19 +0000 Subject: [PATCH 07/39] Update dependencies from https://github.com/dotnet/fsharp build 20200720.1 (#12573) Microsoft.FSharp.Compiler From Version 11.0.0-beta.20367.6 -> To Version 11.0.0-beta.20370.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6c6b85fe0529..f62c19b16428 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -41,9 +41,9 @@ https://github.com/microsoft/msbuild ccca596f350c87b9483577b956ed3dae7e7e1960 - + https://github.com/dotnet/fsharp - 66042d33b998a180edbd99af6064da85f8977bf3 + 9d2bff85a4503589aa53269444f0bbec53872660 https://github.com/dotnet/roslyn diff --git a/eng/Versions.props b/eng/Versions.props index af63f945c74c..a5e6e6c957f8 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -107,7 +107,7 @@ - 11.0.0-beta.20367.6 + 11.0.0-beta.20370.1 From b4ac34c007ce09fd2b0f553f1383a7a2a7a05cad Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2020 12:42:23 -0700 Subject: [PATCH 08/39] [release/5.0.1xx-preview8] Update dependencies from microsoft/msbuild (#12572) * Update dependencies from https://github.com/microsoft/msbuild build 20200720.5 Microsoft.Build.Localization , Microsoft.Build From Version 16.8.0-preview-20367-06 -> To Version 16.8.0-preview-20370-05 * Update dependencies from https://github.com/microsoft/msbuild build 20200721.1 Microsoft.Build.Localization , Microsoft.Build From Version 16.8.0-preview-20367-06 -> To Version 16.8.0-preview-20371-01 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f62c19b16428..99d5e5f2624e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -33,13 +33,13 @@ https://github.com/dotnet/CliCommandLineParser 0e89c2116ad28e404ba56c14d1c3f938caa25a01 - + https://github.com/microsoft/msbuild - ccca596f350c87b9483577b956ed3dae7e7e1960 + e8338f5ad91d42c3196218648859e9e837099842 - + https://github.com/microsoft/msbuild - ccca596f350c87b9483577b956ed3dae7e7e1960 + e8338f5ad91d42c3196218648859e9e837099842 https://github.com/dotnet/fsharp diff --git a/eng/Versions.props b/eng/Versions.props index a5e6e6c957f8..cc94327068dd 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -83,10 +83,10 @@ - 16.8.0-preview-20367-06 + 16.8.0-preview-20371-01 $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) - 16.8.0-preview-20367-06 + 16.8.0-preview-20371-01 $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) $(MicrosoftBuildFrameworkPackageVersion) From 3d3019a34822a3d6a04b97bb1a1311e91da490b7 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2020 12:45:56 -0700 Subject: [PATCH 09/39] Update dependencies from https://github.com/NuGet/NuGet.Client build 5.8.0.6718 (#12571) NuGet.Build.Tasks From Version 5.7.0-rtm.6702 -> To Version 5.8.0-preview.1.6718 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 99d5e5f2624e..8480901aff83 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -57,9 +57,9 @@ https://github.com/dotnet/aspnetcore 303a9bfe3312f1db51aa2ad5e354e3f484b41f00 - + https://github.com/NuGet/NuGet.Client - cd51d2637fc533e1e188c860e7616107904a3623 + d428c2a79aae81ade1caa326e04f65a119025f42 https://github.com/microsoft/vstest diff --git a/eng/Versions.props b/eng/Versions.props index cc94327068dd..067808b7fa27 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ - 5.7.0-rtm.6702 + 5.8.0-preview.1.6718 $(NuGetBuildTasksPackageVersion) $(NuGetBuildTasksPackageVersion) $(NuGetBuildTasksPackageVersion) From 083cb7fdd6a450003fe86ae7a18a854ea44a7951 Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Tue, 21 Jul 2020 14:05:43 -0700 Subject: [PATCH 10/39] Merge preview 7 to preview 8 (#12577) * Update dependencies from https://github.com/dotnet/templating build 20200622.1 Microsoft.TemplateEngine.Cli From Version 5.0.0-preview.8.20322.2 -> To Version 5.0.0-preview.7.20322.1 * Update dependencies from https://github.com/dotnet/runtime build 20200622.6 System.CodeDom , Microsoft.NET.HostModel , Microsoft.Extensions.DependencyModel , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NETCore.App.Ref , System.Text.Encoding.CodePages , System.Security.Cryptography.ProtectedData , System.Resources.Extensions From Version 5.0.0-preview.7.20322.7 -> To Version 5.0.0-preview.7.20322.6 * Update dependencies from https://github.com/microsoft/msbuild build 20200617.1 (#12147) Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20310-07 -> To Version 16.7.0-preview-20317-01 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/runtime build 20200623.4 System.CodeDom , Microsoft.NET.HostModel , Microsoft.Extensions.DependencyModel , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NETCore.App.Ref , System.Text.Encoding.CodePages , System.Security.Cryptography.ProtectedData , System.Resources.Extensions From Version 5.0.0-preview.7.20322.7 -> To Version 5.0.0-preview.7.20323.4 * Update dependencies from https://github.com/dotnet/fsharp build 20200623.3 (#12155) Microsoft.FSharp.Compiler From Version 10.10.0-beta.20322.7 -> To Version 10.10.0-beta.20323.3 Co-authored-by: dotnet-maestro[bot] * [release/5.0.1xx-preview7] Update dependencies from nuget/nuget.client (#12148) * Update dependencies from https://github.com/NuGet/NuGet.Client build 5.7.0.6668 NuGet.Build.Tasks From Version 5.7.0-preview.3.6653 -> To Version 5.7.0-rtm.6668 * Update dependencies from https://github.com/NuGet/NuGet.Client build 5.7.0.6670 NuGet.Build.Tasks From Version 5.7.0-preview.3.6653 -> To Version 5.7.0-rtm.6670 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/windowsdesktop build 20200623.6 (#12161) Microsoft.WindowsDesktop.App From Version 5.0.0-preview.7.20311.4 -> To Version 5.0.0-preview.7.20323.6 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 5.0.0-preview.7.20311.4 -> To Version 5.0.0-preview.7.20323.3 (parent: Microsoft.WindowsDesktop.App Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/windowsdesktop build 20200623.9 (#12163) Microsoft.WindowsDesktop.App From Version 5.0.0-preview.7.20323.6 -> To Version 5.0.0-preview.7.20323.9 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 5.0.0-preview.7.20323.3 -> To Version 5.0.0-preview.7.20323.5 (parent: Microsoft.WindowsDesktop.App Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/windowsdesktop build 20200624.1 (#12169) Microsoft.WindowsDesktop.App From Version 5.0.0-preview.7.20323.9 -> To Version 5.0.0-preview.7.20324.1 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 5.0.0-preview.7.20323.5 -> To Version 5.0.0-preview.7.20323.9 (parent: Microsoft.WindowsDesktop.App Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/aspnetcore build 20200623.1 (#12150) Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Api.Analyzers , Microsoft.AspNetCore.Mvc.Analyzers From Version 5.0.0-preview.7.20311.11 -> To Version 5.0.0-preview.7.20323.1 Co-authored-by: dotnet-maestro[bot] * [release/5.0.1xx-preview7] Update dependencies from dotnet/aspnetcore (#12176) * Update dependencies from https://github.com/dotnet/aspnetcore build 20200623.3 Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Api.Analyzers , Microsoft.AspNetCore.Mvc.Analyzers From Version 5.0.0-preview.7.20323.1 -> To Version 5.0.0-preview.7.20323.3 * Update dependencies from https://github.com/dotnet/aspnetcore build 20200623.9 Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20323.3 -> To Version 5.0.0-preview.7.20323.9 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/microsoft/msbuild build 20200623.1 (#12158) Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20317-01 -> To Version 16.7.0-preview-20323-01 Co-authored-by: dotnet-maestro[bot] * Work around for runtime pack profiles with differing runtime IDs * Update dependencies from https://github.com/dotnet/aspnetcore build 20200625.9 (#12220) Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20323.9 -> To Version 5.0.0-preview.7.20325.9 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/fsharp build 20200626.1 (#12219) Microsoft.FSharp.Compiler From Version 10.10.0-beta.20323.3 -> To Version 10.10.0-beta.20326.1 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/runtime build 20200626.1 (#12221) System.CodeDom , Microsoft.NET.HostModel , Microsoft.Extensions.DependencyModel , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NETCore.App.Ref , System.Text.Encoding.CodePages , System.Security.Cryptography.ProtectedData , System.Resources.Extensions From Version 5.0.0-preview.7.20323.4 -> To Version 5.0.0-preview.7.20326.1 Co-authored-by: dotnet-maestro[bot] * [release/5.0.1xx-preview7] Update dependencies from microsoft/msbuild (#12218) * Update dependencies from https://github.com/microsoft/msbuild build 20200626.1 Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20323-01 -> To Version 16.7.0-preview-20326-01 * Update dependencies from https://github.com/microsoft/msbuild build 20200626.6 Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20323-01 -> To Version 16.7.0-preview-20326-06 Co-authored-by: dotnet-maestro[bot] * [release/5.0.1xx-preview7] Update dependencies from dotnet/aspnetcore (#12223) * Update dependencies from https://github.com/dotnet/aspnetcore build 20200626.3 Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20325.9 -> To Version 5.0.0-preview.7.20326.3 * Update dependencies from https://github.com/dotnet/aspnetcore build 20200626.5 Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20325.9 -> To Version 5.0.0-preview.7.20326.5 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/fsharp build 20200626.3 (#12225) Microsoft.FSharp.Compiler From Version 10.10.0-beta.20326.1 -> To Version 10.10.0-beta.20326.3 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/windowsdesktop build 20200626.3 (#12229) Microsoft.WindowsDesktop.App From Version 5.0.0-preview.7.20324.1 -> To Version 5.0.0-preview.7.20326.3 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 5.0.0-preview.7.20323.9 -> To Version 5.0.0-preview.7.20326.3 (parent: Microsoft.WindowsDesktop.App Co-authored-by: dotnet-maestro[bot] * [release/5.0.1xx-preview7] Update dependencies from microsoft/msbuild (#12226) * Update dependencies from https://github.com/microsoft/msbuild build 20200626.2 Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20326-06 -> To Version 16.7.0-preview-20326-02 * Update dependencies from https://github.com/microsoft/msbuild build 20200626.3 Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20326-02 -> To Version 16.7.0-preview-20326-03 * Update dependencies from https://github.com/microsoft/msbuild build 20200626.5 Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20326-03 -> To Version 16.7.0-preview-20326-05 * Update dependencies from https://github.com/microsoft/msbuild build 20200626.4 Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20326-05 -> To Version 16.7.0-preview-20326-04 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/aspnetcore build 20200626.10 (#12235) Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20326.5 -> To Version 5.0.0-preview.7.20326.10 Co-authored-by: dotnet-maestro[bot] * [release/5.0.1xx-preview7] Update dependencies from dotnet/aspnetcore (#12237) * Update dependencies from https://github.com/dotnet/aspnetcore build 20200626.12 Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20326.10 -> To Version 5.0.0-preview.7.20326.12 * Update dependencies from https://github.com/dotnet/aspnetcore build 20200626.13 Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20326.10 -> To Version 5.0.0-preview.7.20326.13 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/fsharp build 20200627.5 (#12244) Microsoft.FSharp.Compiler From Version 10.10.0-beta.20326.3 -> To Version 10.10.0-beta.20327.5 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/fsharp build 20200628.2 (#12250) Microsoft.FSharp.Compiler From Version 10.10.0-beta.20327.5 -> To Version 10.10.0-beta.20328.2 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/fsharp build 20200628.3 (#12252) Microsoft.FSharp.Compiler From Version 10.10.0-beta.20328.2 -> To Version 10.10.0-beta.20328.3 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/fsharp build 20200629.1 (#12258) Microsoft.FSharp.Compiler From Version 10.10.0-beta.20328.3 -> To Version 10.10.0-beta.20329.1 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/microsoft/msbuild build 20200629.2 (#12263) Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20326-04 -> To Version 16.7.0-preview-20329-02 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/aspnetcore build 20200629.4 (#12266) Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20326.13 -> To Version 5.0.0-preview.7.20329.4 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/fsharp build 20200629.4 (#12268) Microsoft.FSharp.Compiler From Version 10.10.0-beta.20329.1 -> To Version 10.10.0-beta.20329.4 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/fsharp build 20200629.5 (#12269) Microsoft.FSharp.Compiler From Version 10.10.0-beta.20329.4 -> To Version 10.10.0-beta.20329.5 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/microsoft/msbuild build 20200630.1 (#12273) Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20329-02 -> To Version 16.7.0-preview-20330-01 Co-authored-by: dotnet-maestro[bot] * Add ILLink extension points (#12116) (#12264) * Add ILLink extension points See https://github.com/dotnet/sdk/issues/12035 - PrepareForILLink target - ManagedAssemblyToLink ItemGroup - TrimMode property and metadata - private _TrimmerCustomData (https://github.com/mono/linker/issues/1134) - Allow setting `PublishTrimmed` in a late import.targets * Add tests for extension points * Set Action in _RunILLink * Add notes about ManagedAssemblyToLink Co-authored-by: Sven Boemer * Update dependencies from https://github.com/microsoft/msbuild build 20200630.2 (#12275) Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20330-01 -> To Version 16.7.0-preview-20330-02 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/NuGet/NuGet.Client build 5.7.0.6677 (#12284) NuGet.Build.Tasks From Version 5.7.0-rtm.6670 -> To Version 5.7.0-rtm.6677 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/microsoft/msbuild build 20200630.6 (#12286) Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20330-02 -> To Version 16.7.0-preview-20330-06 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/aspnetcore build 20200630.2 (#12290) Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20329.4 -> To Version 5.0.0-preview.7.20330.2 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/aspnetcore build 20200630.5 (#12293) Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20330.2 -> To Version 5.0.0-preview.7.20330.5 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/microsoft/msbuild build 20200630.7 (#12294) Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20330-06 -> To Version 16.7.0-preview-20330-07 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/aspnetcore build 20200630.7 (#12299) Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20330.5 -> To Version 5.0.0-preview.7.20330.7 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/microsoft/msbuild build 20200630.8 (#12300) Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20330-07 -> To Version 16.7.0-preview-20330-08 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/aspnetcore build 20200630.10 (#12302) Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20330.7 -> To Version 5.0.0-preview.7.20330.10 Co-authored-by: dotnet-maestro[bot] * Updating the web deploy reference to 4.0.4 * Suppress NU1603 warning for Web Deploy package * Updating the version to 4.0.5 * [release/5.0.1xx-preview7] Update dependencies from dotnet/aspnetcore (#12369) * Update dependencies from https://github.com/dotnet/aspnetcore build 20200706.7 Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20330.10 -> To Version 5.0.0-preview.7.20356.7 * Update stage 0 Co-authored-by: dotnet-maestro[bot] Co-authored-by: Jason Zhai * Update dependencies from https://github.com/microsoft/msbuild build 20200706.3 (#12374) Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20330-08 -> To Version 16.7.0-preview-20356-03 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/NuGet/NuGet.Client build 5.7.0.6686 (#12378) NuGet.Build.Tasks From Version 5.7.0-rtm.6677 -> To Version 5.7.0-rtm.6686 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/microsoft/msbuild build 20200709.1 (#12390) Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20356-03 -> To Version 16.7.0-preview-20359-01 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/fsharp build 20200709.2 (#12410) Microsoft.FSharp.Compiler From Version 10.10.0-beta.20329.5 -> To Version 10.10.0-beta.20359.2 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/microsoft/msbuild build 20200710.3 (#12415) Microsoft.Build.Localization , Microsoft.Build From Version 16.7.0-preview-20359-01 -> To Version 16.7.0-preview-20360-03 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/aspnetcore build 20200710.2 (#12417) Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20356.7 -> To Version 5.0.0-preview.7.20360.2 Co-authored-by: dotnet-maestro[bot] * Reverting #12084 (#12418) * Update dependencies from https://github.com/NuGet/NuGet.Client build 5.7.0.6702 (#12428) NuGet.Build.Tasks From Version 5.7.0-rtm.6686 -> To Version 5.7.0-rtm.6702 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/fsharp build 20200711.3 (#12433) Microsoft.FSharp.Compiler From Version 10.10.0-beta.20359.2 -> To Version 10.10.0-beta.20361.3 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/roslyn build 20200714.1 (#12453) Microsoft.Net.Compilers.Toolset From Version 3.7.0-3.20312.3 -> To Version 3.7.0-4.20364.1 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/roslyn build 20200715.2 (#12469) Microsoft.Net.Compilers.Toolset From Version 3.7.0-4.20364.1 -> To Version 3.7.0-5.20365.2 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/aspnetcore build 20200715.7 (#12497) Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20360.2 -> To Version 5.0.0-preview.7.20365.7 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/roslyn build 20200716.1 (#12505) Microsoft.Net.Compilers.Toolset From Version 3.7.0-5.20365.2 -> To Version 3.7.0-5.20366.1 Co-authored-by: dotnet-maestro[bot] * [release/5.0.1xx-preview7] Update dependencies from dotnet/runtime (#12493) * Update dependencies from https://github.com/dotnet/runtime build 20200714.6 System.CodeDom , Microsoft.NET.HostModel , Microsoft.Extensions.DependencyModel , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NETCore.App.Ref , System.Text.Encoding.CodePages , System.Security.Cryptography.ProtectedData , System.Resources.Extensions From Version 5.0.0-preview.7.20326.1 -> To Version 5.0.0-preview.7.20364.6 * Update dependencies from https://github.com/dotnet/runtime build 20200714.11 System.CodeDom , Microsoft.NET.HostModel , Microsoft.Extensions.DependencyModel , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NETCore.App.Ref , System.Text.Encoding.CodePages , System.Security.Cryptography.ProtectedData , System.Resources.Extensions From Version 5.0.0-preview.7.20326.1 -> To Version 5.0.0-preview.7.20364.11 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/aspnetcore build 20200715.16 (#12509) Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20365.7 -> To Version 5.0.0-preview.7.20365.16 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/aspnetcore build 20200715.19 (#12511) Microsoft.AspNetCore.Analyzers , Microsoft.NET.Sdk.Razor , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers From Version 5.0.0-preview.7.20365.16 -> To Version 5.0.0-preview.7.20365.19 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/windowsdesktop build 20200716.1 (#12512) Microsoft.WindowsDesktop.App From Version 5.0.0-preview.7.20326.3 -> To Version 5.0.0-preview.7.20366.1 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 5.0.0-preview.7.20326.3 -> To Version 5.0.0-preview.7.20365.12 (parent: Microsoft.WindowsDesktop.App Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/roslyn build 20200716.7 (#12523) Microsoft.Net.Compilers.Toolset From Version 3.7.0-5.20366.1 -> To Version 3.7.0-5.20366.7 Co-authored-by: dotnet-maestro[bot] * Update dependencies from https://github.com/dotnet/roslyn build 20200717.1 (#12531) Microsoft.Net.Compilers.Toolset From Version 3.7.0-5.20366.7 -> To Version 3.7.0-5.20367.1 Co-authored-by: dotnet-maestro[bot] Co-authored-by: dotnet-maestro[bot] Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: v-qizh10 <58835984+v-qizh10@users.noreply.github.com> Co-authored-by: Lukas Lansky Co-authored-by: Eric Erhardt Co-authored-by: Sven Boemer Co-authored-by: Daniel Plaisted Co-authored-by: Daniel Plaisted Co-authored-by: Vijay Ramakrishnan Co-authored-by: Vijay Ramakrishnan Co-authored-by: Jason Zhai --- ...osoft.NET.TargetFrameworkInference.targets | 5 --- .../GivenThatWeWantToBuildALibrary.cs | 34 +------------------ .../GivenThatWeWantToBuildALibraryWithVB.cs | 2 +- 3 files changed, 2 insertions(+), 39 deletions(-) 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 cdd0d0451ee0..6a93ed54cc29 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 @@ -155,11 +155,6 @@ Copyright (c) .NET Foundation. All rights reserved. ResourceName="CppRequiresTFMVersion31" /> - - - <_EnableDefaultWindowsPlatform Condition="'$(_EnableDefaultWindowsPlatform)' == ''" >false - false - 2.1 diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs index 4cc58ab96820..6be2a8fc7d86 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs @@ -417,7 +417,7 @@ 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", "WINDOWS", "WINDOWS7_0" }.Concat(expectedDefines).ToArray()); } [Theory] @@ -601,38 +601,6 @@ public void It_fails_gracefully_if_targetframework_should_be_targetframeworks(bo $"The TargetFramework value '{targetFramework}' is not valid. To multi-target, use the 'TargetFrameworks' property instead"); } - [RequiresMSBuildVersionTheory("16.7.0-preview-20310-07")] - [InlineData("net5.0", false)] - [InlineData("netcoreapp3.1", true)] - public void It_defines_target_platform_defaults_correctly(string targetFramework, bool defaultsDefined) - { - TestProject testProject = new TestProject() - { - Name = "TargetPlatformDefaults", - IsSdkProject = true, - TargetFrameworks = targetFramework - }; - - var testAsset = _testAssetsManager.CreateTestProject(testProject); - - var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), targetFramework, "TargetPlatformIdentifier"); - getValuesCommand - .Execute() - .Should() - .Pass(); - - var values = getValuesCommand.GetValues(); - if (defaultsDefined) - { - values.Count().Should().Be(1); - values.FirstOrDefault().Should().Be("Windows"); - } - else - { - values.Count().Should().Be(0); - } - } - [Theory] [InlineData("net5.0")] [InlineData("netcoreapp3.1")] diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithVB.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithVB.cs index def9568c0323..0afbfeaa3d39 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithVB.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithVB.cs @@ -195,7 +195,7 @@ public void It_implicitly_defines_compilation_constants_for_the_configuration(st [InlineData("net45", new[] { "NETFRAMEWORK=-1", "NET45=-1" }, true)] [InlineData("net461", new[] { "NETFRAMEWORK=-1", "NET461=-1" }, true)] [InlineData("netcoreapp1.0", new[] { "NETCOREAPP=-1", "NETCOREAPP1_0=-1", "_MyType=\"Empty\"" }, false)] - [InlineData("net5.0", new[] { "NET=-1", "NET5_0=-1", "NETCOREAPP=-1", "NETCOREAPP3_1=-1", "_MyType=\"Empty\"" }, false)] + [InlineData("net5.0", new[] { "NET=-1", "NET5_0=-1", "NETCOREAPP=-1", "NETCOREAPP3_1=-1", "WINDOWS=-1", "WINDOWS7_0=-1", "_MyType=\"Empty\"" }, false)] [InlineData(".NETPortable,Version=v4.5,Profile=Profile78", new string[] { "_MyType=\"Empty\"" }, false)] [InlineData(".NETFramework,Version=v4.0,Profile=Client", new string[] { "NETFRAMEWORK=-1", "NET40=-1" }, false)] [InlineData("Xamarin.iOS,Version=v1.0", new string[] { "XAMARINIOS=-1", "XAMARINIOS1_0=-1", "_MyType=\"Empty\"" }, false)] From 2827b99a4fe526279e4eced09fe78908d300f3dc Mon Sep 17 00:00:00 2001 From: Lukas Lansky Date: Wed, 22 Jul 2020 01:01:52 +0200 Subject: [PATCH 11/39] Internal feeds for Preview 8 (#12556) * Add internal feed build steps Co-authored-by: Matt Mitchell --- .vsts-ci.yml | 49 +++++++++++++++++++++++++++++++++++-------------- eng/build.yml | 21 ++++++++++++++++++++- 2 files changed, 55 insertions(+), 15 deletions(-) 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/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) From fb9d53284494a773e65f183710ea0786151c8e7b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2020 20:15:12 +0000 Subject: [PATCH 12/39] [release/5.0.1xx-preview8] Update dependencies from dotnet/fsharp (#12586) [release/5.0.1xx-preview8] Update dependencies from dotnet/fsharp - Updates: - Microsoft.FSharp.Compiler: from 11.0.0-beta.20370.1 to 11.0.0-beta.20371.2 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8480901aff83..53a2466771ae 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -41,9 +41,9 @@ https://github.com/microsoft/msbuild e8338f5ad91d42c3196218648859e9e837099842 - + https://github.com/dotnet/fsharp - 9d2bff85a4503589aa53269444f0bbec53872660 + a87774b6eff36537df42087efb1f90136482aee4 https://github.com/dotnet/roslyn diff --git a/eng/Versions.props b/eng/Versions.props index 067808b7fa27..224c24cd446a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -107,7 +107,7 @@ - 11.0.0-beta.20370.1 + 11.0.0-beta.20371.2 From a920d61214a161f9aa71b5b62ab44d38987aca38 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2020 20:55:08 +0000 Subject: [PATCH 13/39] [release/5.0.1xx-preview8] Update dependencies from dotnet/roslyn (#12585) [release/5.0.1xx-preview8] Update dependencies from dotnet/roslyn - Updates: - Microsoft.Net.Compilers.Toolset: from 3.8.0-1.20367.11 to 3.8.0-1.20371.24 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 53a2466771ae..4fe75f7123c7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -45,9 +45,9 @@ https://github.com/dotnet/fsharp a87774b6eff36537df42087efb1f90136482aee4 - + https://github.com/dotnet/roslyn - fb7b2e716d163b7abebf57db505e01a4a521ddae + d678f04108f39f7be0aaa1cbaf0525eca8956d69 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 224c24cd446a..311af3830a0a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -111,7 +111,7 @@ - 3.8.0-1.20367.11 + 3.8.0-1.20371.24 From a6ecb3e2cb836c47feadf7165a630bf004fc8424 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2020 22:34:47 +0000 Subject: [PATCH 14/39] [release/5.0.1xx-preview8] Update dependencies from dotnet/fsharp (#12599) [release/5.0.1xx-preview8] Update dependencies from dotnet/fsharp - Updates: - Microsoft.FSharp.Compiler: from 11.0.0-beta.20371.3 to 11.0.0-beta.20371.5 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4fe75f7123c7..ad40a21f494a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -41,9 +41,9 @@ https://github.com/microsoft/msbuild e8338f5ad91d42c3196218648859e9e837099842 - + https://github.com/dotnet/fsharp - a87774b6eff36537df42087efb1f90136482aee4 + 0699f99c7906e40df9ccedf80033e37c8fda1b9a https://github.com/dotnet/roslyn diff --git a/eng/Versions.props b/eng/Versions.props index 311af3830a0a..517b4671c2b8 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -107,7 +107,7 @@ - 11.0.0-beta.20371.2 + 11.0.0-beta.20371.5 From 28d79934e853e002e94ecdec678584e79ef4f94d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2020 02:31:52 +0000 Subject: [PATCH 15/39] Update dependencies from https://github.com/dotnet/fsharp build 20200722.1 (#12603) [release/5.0.1xx-preview8] Update dependencies from dotnet/fsharp - Updates: - Microsoft.FSharp.Compiler: from 11.0.0-beta.20371.5 to 11.0.0-beta.20372.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ad40a21f494a..8726135b1ac1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -41,9 +41,9 @@ https://github.com/microsoft/msbuild e8338f5ad91d42c3196218648859e9e837099842 - + https://github.com/dotnet/fsharp - 0699f99c7906e40df9ccedf80033e37c8fda1b9a + 670ae9e8a6e06b7dc0a5c4cb041851cebba2a0e4 https://github.com/dotnet/roslyn diff --git a/eng/Versions.props b/eng/Versions.props index 517b4671c2b8..cd02d36875a9 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -107,7 +107,7 @@ - 11.0.0-beta.20371.5 + 11.0.0-beta.20372.1 From d9ae880b83c397db1ec65f377d7e43b3ea8a415c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2020 08:53:05 +0000 Subject: [PATCH 16/39] Update dependencies from https://github.com/dotnet/roslyn build 20200723.2 (#12607) [release/5.0.1xx-preview8] Update dependencies from dotnet/roslyn - Updates: - Microsoft.Net.Compilers.Toolset: from 3.8.0-1.20371.24 to 3.8.0-1.20373.2 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8726135b1ac1..2a5a6a7ec760 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -45,9 +45,9 @@ https://github.com/dotnet/fsharp 670ae9e8a6e06b7dc0a5c4cb041851cebba2a0e4 - + https://github.com/dotnet/roslyn - d678f04108f39f7be0aaa1cbaf0525eca8956d69 + 7435f69531ae3bf6809d5e2939afdba4561c08bb https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index cd02d36875a9..d7eadf2be941 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -111,7 +111,7 @@ - 3.8.0-1.20371.24 + 3.8.0-1.20373.2 From 285cac3219363b8b0632ee815d4cd77583406fc7 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 23 Jul 2020 08:30:09 -0700 Subject: [PATCH 17/39] Show a message when building as part of dotnet-run (#12581) * Tweak ILaunchSettingsProvider to return a LaunchSettingsResult * Read LaunchSettingsResult during dotnet-run to show message --- .../TestAppWithLaunchSettings/Program.cs | 16 ++++++ .../Properties/launchSettings.json | 11 ++++ .../TestAppWithLaunchSettings.csproj | 8 +++ .../LaunchSettings/ILaunchSettingsProvider.cs | 4 +- .../LaunchSettingsApplyResult.cs | 9 ++-- .../LaunchSettings/LaunchSettingsManager.cs | 9 ++-- .../ProjectLaunchSettingsModel.cs | 23 ++++++++ .../ProjectLaunchSettingsProvider.cs | 54 ++++++------------- .../dotnet-run/LocalizableStrings.resx | 5 +- .../dotnet/commands/dotnet-run/RunCommand.cs | 40 +++++++++++--- .../dotnet-run/xlf/LocalizableStrings.cs.xlf | 5 ++ .../dotnet-run/xlf/LocalizableStrings.de.xlf | 5 ++ .../dotnet-run/xlf/LocalizableStrings.es.xlf | 5 ++ .../dotnet-run/xlf/LocalizableStrings.fr.xlf | 5 ++ .../dotnet-run/xlf/LocalizableStrings.it.xlf | 5 ++ .../dotnet-run/xlf/LocalizableStrings.ja.xlf | 5 ++ .../dotnet-run/xlf/LocalizableStrings.ko.xlf | 5 ++ .../dotnet-run/xlf/LocalizableStrings.pl.xlf | 5 ++ .../xlf/LocalizableStrings.pt-BR.xlf | 5 ++ .../dotnet-run/xlf/LocalizableStrings.ru.xlf | 5 ++ .../dotnet-run/xlf/LocalizableStrings.tr.xlf | 5 ++ .../xlf/LocalizableStrings.zh-Hans.xlf | 5 ++ .../xlf/LocalizableStrings.zh-Hant.xlf | 5 ++ .../GivenDotnetRunRunsCsProj.cs | 51 ++++++++++++++++++ 24 files changed, 239 insertions(+), 56 deletions(-) create mode 100644 src/Assets/TestProjects/TestAppWithLaunchSettings/Program.cs create mode 100644 src/Assets/TestProjects/TestAppWithLaunchSettings/Properties/launchSettings.json create mode 100644 src/Assets/TestProjects/TestAppWithLaunchSettings/TestAppWithLaunchSettings.csproj create mode 100644 src/Cli/dotnet/commands/dotnet-run/LaunchSettings/ProjectLaunchSettingsModel.cs 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/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); + } } } From c7e7130c3f8ae96321a2c4e54587c2bd3b439b31 Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Thu, 25 Jun 2020 14:50:46 -0700 Subject: [PATCH 18/39] Parse target platform properties from target framework --- src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 5 ++ src/Tasks/Common/Resources/xlf/Strings.de.xlf | 5 ++ src/Tasks/Common/Resources/xlf/Strings.es.xlf | 5 ++ src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 5 ++ src/Tasks/Common/Resources/xlf/Strings.it.xlf | 5 ++ src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 5 ++ src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 5 ++ src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 5 ++ .../Common/Resources/xlf/Strings.pt-BR.xlf | 5 ++ src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 5 ++ src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 5 ++ .../Common/Resources/xlf/Strings.zh-Hans.xlf | 5 ++ .../Common/Resources/xlf/Strings.zh-Hant.xlf | 5 ++ ...osoft.NET.TargetFrameworkInference.targets | 20 +++++ ...venThatWeWantToBuildWithATargetPlatform.cs | 80 +++++++++++++++++++ 15 files changed, 165 insertions(+) create mode 100644 src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index 06750ade56ab..3423247f1277 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -374,6 +374,11 @@ NETSDK1003: Neplatný název architektury: {0} {StrBegin="NETSDK1003: "} + + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + {StrBegin="NETSDK1134: "} + NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: Neplatná hodnota parametru ItemSpecToUse: {0}. Tato vlastnost musí být prázdná nebo nastavená na hodnotu Left nebo Right. diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 535a63f51e5f..6579f34a1dc1 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -374,6 +374,11 @@ NETSDK1003: Ungültiger Frameworkname: "{0}". {StrBegin="NETSDK1003: "} + + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + {StrBegin="NETSDK1134: "} + NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: Ungültiger Wert für den ItemSpecToUse-Parameter: "{0}". Diese Eigenschaft muss leer oder auf "Left" bzw. "Right" festgelegt sein. diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index d2afbfd9ffaa..f2c05c95a09e 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -374,6 +374,11 @@ NETSDK1003: Nombre de plataforma no válido: "{0}". {StrBegin="NETSDK1003: "} + + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + {StrBegin="NETSDK1134: "} + NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: Valor no válido para el parámetro ItemSpecToUse: "{0}". Esta propiedad debe estar en blanco o configurarse en "Left" o "Right" diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index 5dfaea0e334c..b4c4c105105c 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -374,6 +374,11 @@ NETSDK1003: Nom de framework non valide : '{0}'. {StrBegin="NETSDK1003: "} + + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + {StrBegin="NETSDK1134: "} + NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: Valeur non valide pour le paramètre ItemSpecToUse : '{0}'. Cette propriété doit être vide ou doit avoir la valeur 'Left' ou 'Right' diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index 36d11beb7419..e1d774691a1d 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -374,6 +374,11 @@ NETSDK1003: nome di framework non valido: '{0}'. {StrBegin="NETSDK1003: "} + + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + {StrBegin="NETSDK1134: "} + NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: valore non valido per il parametro ItemSpecToUse: '{0}'. Questa proprietà deve essere vuota o impostata su 'Left' o 'Right' diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index 0e572735f072..d9eb84d277d4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -374,6 +374,11 @@ NETSDK1003: 無効なフレームワーク名: '{0}'。 {StrBegin="NETSDK1003: "} + + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + {StrBegin="NETSDK1134: "} + NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: ItemSpecToUse パラメーターの値が無効です: '{0}'。このプロパティは空白にするか、'Left' または 'Right' に設定する必要があります diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index 4cd99c4657cd..e01a3b407385 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -374,6 +374,11 @@ NETSDK1003: 프레임워크 이름 '{0}'이(가) 잘못되었습니다. {StrBegin="NETSDK1003: "} + + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + {StrBegin="NETSDK1134: "} + NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: ItemSpecToUse 매개 변수 값이 잘못되었습니다. '{0}'. 이 속성은 비워 두거나 'Left' 또는 'Right'로 설정해야 합니다. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 1113f83e0f10..9ec323c01971 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -374,6 +374,11 @@ NETSDK1003: Nieprawidłowa nazwa platformy: „{0}”. {StrBegin="NETSDK1003: "} + + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + {StrBegin="NETSDK1134: "} + NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: Nieprawidłowa wartość parametru ItemSpecToUse: „{0}”. Ta właściwość musi być pusta lub ustawiona na wartość „Left” albo „Right” diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index 00ad13e2732f..cd2b25dfcb82 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -374,6 +374,11 @@ NETSDK1003: Nome de estrutura inválido: '{0}'. {StrBegin="NETSDK1003: "} + + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + {StrBegin="NETSDK1134: "} + NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: Valor inválido para o parâmetro ItemSpecToUse: '{0}'. Essa propriedade precisa estar em branco ou ser definida como 'Left' ou 'Right' diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index 07ccbc789bd1..9e6f2d38d825 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -374,6 +374,11 @@ NETSDK1003: недопустимое имя платформы: "{0}". {StrBegin="NETSDK1003: "} + + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + {StrBegin="NETSDK1134: "} + NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: недопустимое значение для параметра ItemSpecToUse "{0}". Это свойство должно быть пустым либо иметь значение "Left" или "Right" diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index 06de6bdfa4c0..d174e74bc8e0 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -374,6 +374,11 @@ NETSDK1003: Geçersiz çerçeve adı: '{0}'. {StrBegin="NETSDK1003: "} + + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + {StrBegin="NETSDK1134: "} + NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: ItemSpecToUse parametresi için geçersiz değer: '{0}'. Bu özellik boş olmalı veya 'Left' veya 'Right' olarak ayarlanmalıdır diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index a91bd03ef909..597c49d63d68 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -374,6 +374,11 @@ NETSDK1003: 无效的框架名称:“{0}”。 {StrBegin="NETSDK1003: "} + + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + {StrBegin="NETSDK1134: "} + NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: 无效的 ItemSpecToUse 参数值:“{0}”。此属性必须为空或设为“左”或“右” diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index df5e41d975fb..1bb33e63c727 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -374,6 +374,11 @@ NETSDK1003: 架構名稱 '{0}' 無效。 {StrBegin="NETSDK1003: "} + + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. + {StrBegin="NETSDK1134: "} + NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: ItemSpecToUse 參數的值無效: '{0}'。此屬性必須為空白或設定為 'Left' 或 'Right' 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..e4a7d55cea20 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 @@ -78,6 +78,18 @@ Copyright (c) .NET Foundation. All rights reserved. $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '5.0'))">.NETCoreApp + + + $([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) + $([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) + $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) + $([MSBuild]::GetTargetPlatformVersion('$(TargetFramework)')) + + <_InferredTargetPlatform>true + + - - - <_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]) - - - - - .NETStandard - .NETCoreApp - - - .NETFramework - .NETCoreApp + + + $([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) + v$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)', 3)) + <_TargetFrameworkVersionLength Condition="$(TargetFrameworkVersion.EndsWith('.0'))" >$([MSBuild]::Subtract($(TargetFrameworkVersion.Length), 2)) + $(TargetFrameworkVersion.Substring(0, $(_TargetFrameworkVersionLength))) - - $([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) - $([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) + $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) $([MSBuild]::GetTargetPlatformVersion('$(TargetFramework)')) @@ -96,7 +72,7 @@ Copyright (c) .NET Foundation. All rights reserved. We have to evaluate this here and not in the target because by the time the target runs, Microsoft.Common.targets will have defaulted to .NETFramework,Version=v4.0 --> - + <_UnsupportedTargetFrameworkError>true @@ -128,7 +104,7 @@ Copyright (c) .NET Foundation. All rights reserved. + Condition="'$(_InferredTargetPlatform)' == 'true' and '$(ErrorOnUnsupportedTargetPlatform)' != 'false'" > diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs index ebbb7de259ac..3743b9604285 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs @@ -20,14 +20,14 @@ public GivenThatWeWantToBuildWithATargetPlatform(ITestOutputHelper log) : base(l } [Theory] - [InlineData("netcoreapp3.1", "Windows", "7.0")] // Default values pre-5.0 - [InlineData("net5.0-windows", "Windows", "7.0")] // Depends on https://github.com/dotnet/wpf/pull/3177 - [InlineData("net5.0-android", "Android", "0.0")] // We don't set a default version for android - [InlineData("net5.0-ios1.1", "iOS", "1.1")] - [InlineData("net5.0-macos7.0", "MacOS", "7.0")] - [InlineData("net5.0-windows10.0", "Windows", "10.0")] - [InlineData("net5.0-ios14.0", "iOS", "14.0")] - public void It_defines_target_platform_from_target_framework(string targetFramework, string expectedTargetPlatformIdentifier, string expectedTargetPlatformVersion) + [InlineData("netcoreapp3.1", ".NETCoreApp", "v3.1", "Windows", "7.0")] // Default values pre-5.0 + [InlineData("net5.0-windows", ".NETCoreApp", "v5.0", "Windows", "7.0")] // Depends on https://github.com/dotnet/wpf/pull/3177 + [InlineData("net5.0-android", ".NETCoreApp", "v5.0", "Android", "0.0")] // We don't set a default version for android + [InlineData("net5.0-ios1.1", ".NETCoreApp", "v5.0", "iOS", "1.1")] + [InlineData("net5.0-macos7.0", ".NETCoreApp", "v5.0", "MacOS", "7.0")] + [InlineData("net5.0-windows10.0", ".NETCoreApp", "v5.0", "Windows", "10.0")] + [InlineData("net5.0-ios14.0", ".NETCoreApp", "v5.0", "iOS", "14.0")] + public void It_defines_target_platform_from_target_framework(string targetFramework, string expectedTargetFrameworkIdentifier, string expectedTargetFrameworkVersion, string expectedTargetPlatformIdentifier, string expectedTargetPlatformVersion) { var testProj = new TestProject() { @@ -52,6 +52,9 @@ public void It_defines_target_platform_from_target_framework(string targetFramew values[0].ToUpperInvariant().Should().Be(expected.ToUpperInvariant()); }; + assertValue("TargetFrameworkIdentifier", expectedTargetFrameworkIdentifier); + assertValue("TargetFrameworkVersion", expectedTargetFrameworkVersion); + assertValue("TargetPlatformIdentifier", expectedTargetPlatformIdentifier); assertValue("TargetPlatformIdentifier", expectedTargetPlatformIdentifier); assertValue("TargetPlatformVersion", expectedTargetPlatformVersion); assertValue("TargetPlatformMoniker", $"{expectedTargetPlatformIdentifier},Version={expectedTargetPlatformVersion}"); From 1c295c7202cf0c2a8d29ff44c9990c45342ee99d Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Tue, 30 Jun 2020 13:55:07 -0700 Subject: [PATCH 20/39] PR feedback --- src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 5 --- src/Tasks/Common/Resources/xlf/Strings.de.xlf | 5 --- src/Tasks/Common/Resources/xlf/Strings.es.xlf | 5 --- src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 5 --- src/Tasks/Common/Resources/xlf/Strings.it.xlf | 5 --- src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 5 --- src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 5 --- src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 5 --- .../Common/Resources/xlf/Strings.pt-BR.xlf | 5 --- src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 5 --- src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 5 --- .../Common/Resources/xlf/Strings.zh-Hans.xlf | 5 --- .../Common/Resources/xlf/Strings.zh-Hant.xlf | 5 --- ...osoft.NET.TargetFrameworkInference.targets | 20 +++++----- ...venThatWeWantToBuildWithATargetPlatform.cs | 39 ++++++------------- 15 files changed, 21 insertions(+), 103 deletions(-) diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index 3423247f1277..06750ade56ab 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -374,11 +374,6 @@ NETSDK1003: Neplatný název architektury: {0} {StrBegin="NETSDK1003: "} - - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - {StrBegin="NETSDK1134: "} - NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: Neplatná hodnota parametru ItemSpecToUse: {0}. Tato vlastnost musí být prázdná nebo nastavená na hodnotu Left nebo Right. diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 6579f34a1dc1..535a63f51e5f 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -374,11 +374,6 @@ NETSDK1003: Ungültiger Frameworkname: "{0}". {StrBegin="NETSDK1003: "} - - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - {StrBegin="NETSDK1134: "} - NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: Ungültiger Wert für den ItemSpecToUse-Parameter: "{0}". Diese Eigenschaft muss leer oder auf "Left" bzw. "Right" festgelegt sein. diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index f2c05c95a09e..d2afbfd9ffaa 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -374,11 +374,6 @@ NETSDK1003: Nombre de plataforma no válido: "{0}". {StrBegin="NETSDK1003: "} - - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - {StrBegin="NETSDK1134: "} - NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: Valor no válido para el parámetro ItemSpecToUse: "{0}". Esta propiedad debe estar en blanco o configurarse en "Left" o "Right" diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index b4c4c105105c..5dfaea0e334c 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -374,11 +374,6 @@ NETSDK1003: Nom de framework non valide : '{0}'. {StrBegin="NETSDK1003: "} - - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - {StrBegin="NETSDK1134: "} - NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: Valeur non valide pour le paramètre ItemSpecToUse : '{0}'. Cette propriété doit être vide ou doit avoir la valeur 'Left' ou 'Right' diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index e1d774691a1d..36d11beb7419 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -374,11 +374,6 @@ NETSDK1003: nome di framework non valido: '{0}'. {StrBegin="NETSDK1003: "} - - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - {StrBegin="NETSDK1134: "} - NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: valore non valido per il parametro ItemSpecToUse: '{0}'. Questa proprietà deve essere vuota o impostata su 'Left' o 'Right' diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index d9eb84d277d4..0e572735f072 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -374,11 +374,6 @@ NETSDK1003: 無効なフレームワーク名: '{0}'。 {StrBegin="NETSDK1003: "} - - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - {StrBegin="NETSDK1134: "} - NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: ItemSpecToUse パラメーターの値が無効です: '{0}'。このプロパティは空白にするか、'Left' または 'Right' に設定する必要があります diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index e01a3b407385..4cd99c4657cd 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -374,11 +374,6 @@ NETSDK1003: 프레임워크 이름 '{0}'이(가) 잘못되었습니다. {StrBegin="NETSDK1003: "} - - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - {StrBegin="NETSDK1134: "} - NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: ItemSpecToUse 매개 변수 값이 잘못되었습니다. '{0}'. 이 속성은 비워 두거나 'Left' 또는 'Right'로 설정해야 합니다. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 9ec323c01971..1113f83e0f10 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -374,11 +374,6 @@ NETSDK1003: Nieprawidłowa nazwa platformy: „{0}”. {StrBegin="NETSDK1003: "} - - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - {StrBegin="NETSDK1134: "} - NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: Nieprawidłowa wartość parametru ItemSpecToUse: „{0}”. Ta właściwość musi być pusta lub ustawiona na wartość „Left” albo „Right” diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index cd2b25dfcb82..00ad13e2732f 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -374,11 +374,6 @@ NETSDK1003: Nome de estrutura inválido: '{0}'. {StrBegin="NETSDK1003: "} - - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - {StrBegin="NETSDK1134: "} - NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: Valor inválido para o parâmetro ItemSpecToUse: '{0}'. Essa propriedade precisa estar em branco ou ser definida como 'Left' ou 'Right' diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index 9e6f2d38d825..07ccbc789bd1 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -374,11 +374,6 @@ NETSDK1003: недопустимое имя платформы: "{0}". {StrBegin="NETSDK1003: "} - - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - {StrBegin="NETSDK1134: "} - NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: недопустимое значение для параметра ItemSpecToUse "{0}". Это свойство должно быть пустым либо иметь значение "Left" или "Right" diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index d174e74bc8e0..06de6bdfa4c0 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -374,11 +374,6 @@ NETSDK1003: Geçersiz çerçeve adı: '{0}'. {StrBegin="NETSDK1003: "} - - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - {StrBegin="NETSDK1134: "} - NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: ItemSpecToUse parametresi için geçersiz değer: '{0}'. Bu özellik boş olmalı veya 'Left' veya 'Right' olarak ayarlanmalıdır diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index 597c49d63d68..a91bd03ef909 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -374,11 +374,6 @@ NETSDK1003: 无效的框架名称:“{0}”。 {StrBegin="NETSDK1003: "} - - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - {StrBegin="NETSDK1134: "} - NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: 无效的 ItemSpecToUse 参数值:“{0}”。此属性必须为空或设为“左”或“右” diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index 1bb33e63c727..df5e41d975fb 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -374,11 +374,6 @@ NETSDK1003: 架構名稱 '{0}' 無效。 {StrBegin="NETSDK1003: "} - - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - NETSDK1134: A target platform can only be specified in the target framework for applications targeting .NET 5 and above. - {StrBegin="NETSDK1134: "} - NETSDK1058: Invalid value for ItemSpecToUse parameter: '{0}'. This property must be blank or set to 'Left' or 'Right' NETSDK1058: ItemSpecToUse 參數的值無效: '{0}'。此屬性必須為空白或設定為 'Left' 或 'Right' 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 ca9e41ae5217..85f2daa7067e 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 @@ -50,18 +50,24 @@ Copyright (c) .NET Foundation. All rights reserved. Parse TargetFramework properties. --> + $([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) v$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)', 3)) <_TargetFrameworkVersionLength Condition="$(TargetFrameworkVersion.EndsWith('.0'))" >$([MSBuild]::Subtract($(TargetFrameworkVersion.Length), 2)) $(TargetFrameworkVersion.Substring(0, $(_TargetFrameworkVersionLength))) - + - + $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) - $([MSBuild]::GetTargetPlatformVersion('$(TargetFramework)')) + $([MSBuild]::GetTargetPlatformVersion('$(TargetFramework)', 3)) + + <_TargetPlatformVersionLength Condition="$(TargetPlatformVersion.EndsWith('.0'))" >$([MSBuild]::Subtract($(TargetPlatformVersion.Length), 2)) + $(TargetPlatformVersion.Substring(0, $(_TargetPlatformVersionLength))) + + Windows <_InferredTargetPlatform>true @@ -102,14 +108,6 @@ Copyright (c) .NET Foundation. All rights reserved. FormatArguments="$([MSBuild]::Escape('$(TargetFramework)'))" /> - - - - - diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs index 3743b9604285..cb3103ba0874 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs @@ -21,12 +21,11 @@ public GivenThatWeWantToBuildWithATargetPlatform(ITestOutputHelper log) : base(l [Theory] [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")] // Depends on https://github.com/dotnet/wpf/pull/3177 - [InlineData("net5.0-android", ".NETCoreApp", "v5.0", "Android", "0.0")] // We don't set a default version for android - [InlineData("net5.0-ios1.1", ".NETCoreApp", "v5.0", "iOS", "1.1")] - [InlineData("net5.0-macos7.0", ".NETCoreApp", "v5.0", "MacOS", "7.0")] - [InlineData("net5.0-windows10.0", ".NETCoreApp", "v5.0", "Windows", "10.0")] - [InlineData("net5.0-ios14.0", ".NETCoreApp", "v5.0", "iOS", "14.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() @@ -47,9 +46,14 @@ public void It_defines_target_platform_from_target_framework(string targetFramew .Execute() .Should() .Pass(); - var values = getValuesCommand.GetValues(); - values.Count.Should().Be(1); - values[0].ToUpperInvariant().Should().Be(expected.ToUpperInvariant()); + if (expected.Trim().Equals(string.Empty)) + { + getValuesCommand.GetValues().Count.Should().Be(0); + } + else + { + getValuesCommand.GetValues().ShouldBeEquivalentTo(new[] { expected }); + } }; assertValue("TargetFrameworkIdentifier", expectedTargetFrameworkIdentifier); @@ -60,24 +64,5 @@ public void It_defines_target_platform_from_target_framework(string targetFramew assertValue("TargetPlatformMoniker", $"{expectedTargetPlatformIdentifier},Version={expectedTargetPlatformVersion}"); assertValue("TargetPlatformDisplayName", $"{expectedTargetPlatformIdentifier} {expectedTargetPlatformVersion}"); } - - [Fact] - public void It_errors_on_invalid_target_framework() - { - var testProj = new TestProject() - { - Name = "TargetPlatformTests", - IsSdkProject = true, - TargetFrameworks = "netcoreapp3.1-windows" - }; - var testAsset = _testAssetsManager.CreateTestProject(testProj); - - var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.Path, testProj.Name)); - buildCommand.Execute() - .Should() - .Fail() - .And - .HaveStdOutContaining("NETSDK1134"); - } } } From 50b8fad686e8b4e65c3787a70abf608d50165a23 Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Wed, 1 Jul 2020 14:41:59 -0700 Subject: [PATCH 21/39] Error on unsupported target platform identifier --- .../DesktopAndNetStandard.csproj | 1 - src/Tasks/Common/Resources/Strings.resx | 4 ++++ src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.de.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.es.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.it.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 5 +++++ .../Common/Resources/xlf/Strings.pt-BR.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 5 +++++ .../Common/Resources/xlf/Strings.zh-Hans.xlf | 5 +++++ .../Common/Resources/xlf/Strings.zh-Hant.xlf | 5 +++++ ...osoft.NET.TargetFrameworkInference.targets | 17 ++++++++++++--- .../GivenThatWeWantToBuildALibrary.cs | 5 +++++ ...venThatWeWantToBuildWithATargetPlatform.cs | 21 ++++++++++++++++++- 18 files changed, 108 insertions(+), 5 deletions(-) diff --git a/src/Assets/TestProjects/CrossTargeting/DesktopAndNetStandard/DesktopAndNetStandard.csproj b/src/Assets/TestProjects/CrossTargeting/DesktopAndNetStandard/DesktopAndNetStandard.csproj index bb49a71b3b7b..757f9fd0a78d 100644 --- a/src/Assets/TestProjects/CrossTargeting/DesktopAndNetStandard/DesktopAndNetStandard.csproj +++ b/src/Assets/TestProjects/CrossTargeting/DesktopAndNetStandard/DesktopAndNetStandard.csproj @@ -11,7 +11,6 @@ .NETFramework v4.0 Client - false diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index 601b71a4685f..781d470c54bf 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -645,4 +645,8 @@ 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 identifier {0} was not recognized. + {StrBegin="NETSDK1136: "} + diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index 06750ade56ab..6a20d1e282c2 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -643,6 +643,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: "} + + NETSDK1135: The target platform identifier {0} was not recognized. + NETSDK1135: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1135: "} + 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 535a63f51e5f..204f17f60d1c 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -643,6 +643,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: "} + + NETSDK1135: The target platform identifier {0} was not recognized. + NETSDK1135: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1135: "} + 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 d2afbfd9ffaa..c09a5884c3f5 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -643,6 +643,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: "} + + NETSDK1135: The target platform identifier {0} was not recognized. + NETSDK1135: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1135: "} + 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 5dfaea0e334c..598ba59e07a1 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -643,6 +643,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: "} + + NETSDK1135: The target platform identifier {0} was not recognized. + NETSDK1135: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1135: "} + 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 36d11beb7419..d902294bb0b0 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -643,6 +643,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: "} + + NETSDK1135: The target platform identifier {0} was not recognized. + NETSDK1135: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1135: "} + 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 0e572735f072..0b094b472ba4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -643,6 +643,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: "} + + NETSDK1135: The target platform identifier {0} was not recognized. + NETSDK1135: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1135: "} + 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 4cd99c4657cd..3013e4049cc3 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -643,6 +643,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: "} + + NETSDK1135: The target platform identifier {0} was not recognized. + NETSDK1135: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1135: "} + 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 1113f83e0f10..7ce97ab0d29a 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -643,6 +643,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: "} + + NETSDK1135: The target platform identifier {0} was not recognized. + NETSDK1135: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1135: "} + 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 00ad13e2732f..ed6b94cec9aa 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -643,6 +643,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: "} + + NETSDK1135: The target platform identifier {0} was not recognized. + NETSDK1135: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1135: "} + 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 07ccbc789bd1..5231831d06f4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -643,6 +643,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: "} + + NETSDK1135: The target platform identifier {0} was not recognized. + NETSDK1135: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1135: "} + 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 06de6bdfa4c0..e6efc7cc0df4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -643,6 +643,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: "} + + NETSDK1135: The target platform identifier {0} was not recognized. + NETSDK1135: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1135: "} + 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 a91bd03ef909..9acdd83ccce5 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -643,6 +643,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: "} + + NETSDK1135: The target platform identifier {0} was not recognized. + NETSDK1135: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1135: "} + 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 df5e41d975fb..55341354b650 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -643,6 +643,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: "} + + NETSDK1135: The target platform identifier {0} was not recognized. + NETSDK1135: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1135: "} + 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.TargetFrameworkInference.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets index 85f2daa7067e..6ff7dd8f445e 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 @@ -68,9 +68,7 @@ Copyright (c) .NET Foundation. All rights reserved. $(TargetPlatformVersion.Substring(0, $(_TargetPlatformVersionLength))) Windows - - <_InferredTargetPlatform>true - + 7.0 + + Windows,Version=7.0 + Windows 7.0 From cbedf9567155f0978cfba7dbb5fcfbde39a8b971 Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Mon, 20 Jul 2020 14:10:01 -0700 Subject: [PATCH 23/39] Temporarily disabling full framework c++ tests --- .../GivenThatWeWantToBuildACppCliNonLibraryProject.cs | 4 ++-- .../GivenThatWeWantToBuildACppCliProject.cs | 8 ++++---- .../GivenThatWeWantToPackACppCliProject.cs | 2 +- .../GivenThatWeWantToPublishACppCliAppProject.cs | 2 +- .../dotnet-list-package.Tests/GivenDotnetListPackage.cs | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) 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.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/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"; From 41bcf9460d0084edf880e8333edf03d579f384fb Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Thu, 23 Jul 2020 11:04:47 -0700 Subject: [PATCH 24/39] Fix merge issues --- src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.de.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.es.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.it.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf | 6 +++--- .../GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs | 3 +++ .../GivenThatWeWantToBuildWithATargetPlatform.cs | 6 +++--- 15 files changed, 45 insertions(+), 42 deletions(-) diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index 6a20d1e282c2..969179b064ab 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -644,9 +644,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1135: The target platform identifier {0} was not recognized. - NETSDK1135: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1135: "} + NETSDK1136: The target platform identifier {0} was not recognized. + NETSDK1136: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1136: "} NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 204f17f60d1c..2bb5b725a4f7 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -644,9 +644,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1135: The target platform identifier {0} was not recognized. - NETSDK1135: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1135: "} + NETSDK1136: The target platform identifier {0} was not recognized. + NETSDK1136: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1136: "} NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index c09a5884c3f5..73a9ede99c45 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -644,9 +644,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1135: The target platform identifier {0} was not recognized. - NETSDK1135: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1135: "} + NETSDK1136: The target platform identifier {0} was not recognized. + NETSDK1136: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1136: "} NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index 598ba59e07a1..c931edf111eb 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -644,9 +644,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1135: The target platform identifier {0} was not recognized. - NETSDK1135: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1135: "} + NETSDK1136: The target platform identifier {0} was not recognized. + NETSDK1136: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1136: "} NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index d902294bb0b0..dbba9f121586 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -644,9 +644,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1135: The target platform identifier {0} was not recognized. - NETSDK1135: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1135: "} + NETSDK1136: The target platform identifier {0} was not recognized. + NETSDK1136: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1136: "} NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index 0b094b472ba4..4a101ac116d9 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -644,9 +644,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1135: The target platform identifier {0} was not recognized. - NETSDK1135: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1135: "} + NETSDK1136: The target platform identifier {0} was not recognized. + NETSDK1136: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1136: "} NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index 3013e4049cc3..fef722efb5ec 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -644,9 +644,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1135: The target platform identifier {0} was not recognized. - NETSDK1135: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1135: "} + NETSDK1136: The target platform identifier {0} was not recognized. + NETSDK1136: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1136: "} NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 7ce97ab0d29a..4ec935337000 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -644,9 +644,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1135: The target platform identifier {0} was not recognized. - NETSDK1135: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1135: "} + NETSDK1136: The target platform identifier {0} was not recognized. + NETSDK1136: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1136: "} NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index ed6b94cec9aa..0ffbf625fa54 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -644,9 +644,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1135: The target platform identifier {0} was not recognized. - NETSDK1135: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1135: "} + NETSDK1136: The target platform identifier {0} was not recognized. + NETSDK1136: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1136: "} NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index 5231831d06f4..a44802c3bcb1 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -644,9 +644,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1135: The target platform identifier {0} was not recognized. - NETSDK1135: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1135: "} + NETSDK1136: The target platform identifier {0} was not recognized. + NETSDK1136: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1136: "} NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index e6efc7cc0df4..858cfe54f888 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -644,9 +644,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1135: The target platform identifier {0} was not recognized. - NETSDK1135: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1135: "} + NETSDK1136: The target platform identifier {0} was not recognized. + NETSDK1136: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1136: "} NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index 9acdd83ccce5..fdb27871687c 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -644,9 +644,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1135: The target platform identifier {0} was not recognized. - NETSDK1135: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1135: "} + NETSDK1136: The target platform identifier {0} was not recognized. + NETSDK1136: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1136: "} NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index 55341354b650..5b2271fb1b1a 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -644,9 +644,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1135: The target platform identifier {0} was not recognized. - NETSDK1135: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1135: "} + NETSDK1136: The target platform identifier {0} was not recognized. + NETSDK1136: The target platform identifier {0} was not recognized. + {StrBegin="NETSDK1136: "} NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs index 4787d3170f71..2b5375744620 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs @@ -40,6 +40,7 @@ public void WhenPropertiesAreSetItCanGenerateMinimumOSPlatformAttribute() testProject.AdditionalProperties["TargetPlatformIdentifier"] = targetPlatformIdentifier; testProject.AdditionalProperties["MinimumOSPlatform"] = "13.2"; testProject.AdditionalProperties["TargetPlatformVersion"] = "14.0"; + testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; var testAsset = _testAssetsManager.CreateTestProject(testProject); @@ -58,6 +59,7 @@ public void WhenMinimumOSPlatformISNotSetTargetPlatformVersionIsSetItCanGenerate var targetPlatformIdentifier = "iOS"; testProject.AdditionalProperties["TargetPlatformIdentifier"] = targetPlatformIdentifier; testProject.AdditionalProperties["TargetPlatformVersion"] = "13.2"; + testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; var testAsset = _testAssetsManager.CreateTestProject(testProject); @@ -77,6 +79,7 @@ public void WhenMinimumOSPlatformIsHigherThanTargetPlatformVersionItShouldError( testProject.AdditionalProperties["TargetPlatformIdentifier"] = targetPlatformIdentifier; 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/GivenThatWeWantToBuildWithATargetPlatform.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs index 612ff0ae9b1d..e2fc4ad6971d 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs @@ -21,10 +21,10 @@ public GivenThatWeWantToBuildWithATargetPlatform(ITestOutputHelper log) : base(l [Theory] [InlineData("netcoreapp3.1", ".NETCoreApp", "v3.1", "Windows", "7.0")] // Default values pre-5.0 - [InlineData("net5.0", ".NETCoreApp", "v5.0", "", "")] + [InlineData("net5.0", ".NETCoreApp", "v5.0", "Windows", "7.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")] // Depends on https://github.com/dotnet/wpf/pull/3177 + [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) { @@ -81,7 +81,7 @@ public void It_fails_on_unsupported_os() .Should() .Fail() .And - .HaveStdOutContaining("NETSDK1135"); + .HaveStdOutContaining("NETSDK1136"); } } } From c0f65b1374a5b4e2703366141b176dd277887c8b Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Fri, 17 Jul 2020 13:53:36 -0700 Subject: [PATCH 25/39] Error on unsupported Windows TargetPlatformVersion --- src/Tasks/Common/Resources/Strings.resx | 4 + src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 5 + src/Tasks/Common/Resources/xlf/Strings.de.xlf | 5 + src/Tasks/Common/Resources/xlf/Strings.es.xlf | 5 + src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 5 + src/Tasks/Common/Resources/xlf/Strings.it.xlf | 5 + src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 5 + src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 5 + src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 5 + .../Common/Resources/xlf/Strings.pt-BR.xlf | 5 + src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 5 + src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 5 + .../Common/Resources/xlf/Strings.zh-Hans.xlf | 5 + .../Common/Resources/xlf/Strings.zh-Hant.xlf | 5 + .../Microsoft.NET.Sdk.BeforeCommon.targets | 1 + .../targets/Microsoft.NET.Sdk.props | 3 + ...crosoft.NET.SupportedTargetPlatforms.props | 26 ++++ .../targets/Microsoft.NET.Windows.targets | 12 ++ .../GivenThatWeWantToBuildALibrary.cs | 4 +- ...ThatWeWantToBuildAWindowsDesktopProject.cs | 126 ++++++++++++++++++ 20 files changed, 239 insertions(+), 2 deletions(-) create mode 100644 src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetPlatforms.props create mode 100644 src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index 781d470c54bf..2c33875ebef0 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -649,4 +649,8 @@ The following are names of parameters or literal values and should not be transl NETSDK1136: The target platform identifier {0} was not recognized. {StrBegin="NETSDK1136: "} + + NETSDK1137: {0} is not a valid Windows TargetPlatformVersion. + {StrBegin="NETSDK1137: "} + diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index 969179b064ab..648dfb44a17a 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -395,6 +395,11 @@ 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: "} + + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + {StrBegin="NETSDK1138: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 2bb5b725a4f7..9f92d2496bc0 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -395,6 +395,11 @@ 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: "} + + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + {StrBegin="NETSDK1138: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index 73a9ede99c45..e85177f35447 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -395,6 +395,11 @@ 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: "} + + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + {StrBegin="NETSDK1138: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index c931edf111eb..7524f84d3872 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -395,6 +395,11 @@ 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: "} + + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + {StrBegin="NETSDK1138: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index dbba9f121586..c60511ed9c7b 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -395,6 +395,11 @@ 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: "} + + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + {StrBegin="NETSDK1138: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index 4a101ac116d9..aae6418181c8 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -395,6 +395,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: ロールフォワード値 '{0}' が無効です。許可されている値は {1} です。 {StrBegin="NETSDK1104: "} + + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + {StrBegin="NETSDK1138: "} + 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 を参照してください。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index fef722efb5ec..b4fd185c5ba5 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -395,6 +395,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: RollForward 값 '{0}'이(가) 잘못되었습니다. 허용되는 값은 {1}입니다. {StrBegin="NETSDK1104: "} + + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + {StrBegin="NETSDK1138: "} + 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을 참조하세요. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 4ec935337000..abfadda491bd 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -395,6 +395,11 @@ 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: "} + + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + {StrBegin="NETSDK1138: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index 0ffbf625fa54..068abfff0eba 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -395,6 +395,11 @@ 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: "} + + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + {StrBegin="NETSDK1138: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index a44802c3bcb1..5127d20031ba 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -395,6 +395,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: недопустимое значение RollForward "{0}". Разрешенные значения — {1}. {StrBegin="NETSDK1104: "} + + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + {StrBegin="NETSDK1138: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index 858cfe54f888..1c8f6e125271 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -395,6 +395,11 @@ 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: "} + + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + {StrBegin="NETSDK1138: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index fdb27871687c..b54de278b082 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -395,6 +395,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: RollForward 值“{0}”无效。允许的值为 {1}。 {StrBegin="NETSDK1104: "} + + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + {StrBegin="NETSDK1138: "} + 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。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index 5b2271fb1b1a..ebc5e6f3056e 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -395,6 +395,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: RollForward 值 '{0}' 無效。允許的值為 {1}。 {StrBegin="NETSDK1104: "} + + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + {StrBegin="NETSDK1138: "} + 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。 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..ad4e68e5d284 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.SupportedTargetPlatforms.props b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetPlatforms.props new file mode 100644 index 000000000000..5b76d8d337ce --- /dev/null +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetPlatforms.props @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + 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 b86bf20d17e2..bc9cfa2784b9 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 @@ -27,4 +27,16 @@ Copyright (c) .NET Foundation. All rights reserved. Windows,Version=7.0 Windows 7.0 + + + + + + + + diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs index bdf393ff87a3..3cdc72165b7a 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs @@ -423,7 +423,7 @@ public void It_implicitly_defines_compilation_constants_for_the_target_framework [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"; @@ -454,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"; 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..2a8e091af7be --- /dev/null +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs @@ -0,0 +1,126 @@ +// 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 + 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"); + } + + [WindowsOnlyFact] + public void It_fails_if_windows_target_platform_version_is_invalid() + { + var testProject = new TestProject() + { + Name = "InvalidWindowsVersion", + IsSdkProject = true, + TargetFrameworks = "net5.0" + }; + testProject.AdditionalProperties["TargetPlatformIdentifier"] = "Windows"; + testProject.AdditionalProperties["TargetPlatformVersion"] = "1.0"; + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var buildCommand = new BuildCommand(testAsset); + buildCommand.Execute() + .Should() + .Fail() + .And + .HaveStdOutContaining("NETSDK1138"); + } + } +} From 108416dc1ce4d105c0b857824f3eb7456c74b10f Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Tue, 21 Jul 2020 08:48:38 -0700 Subject: [PATCH 26/39] PR feedback --- src/Tasks/Common/Resources/Strings.resx | 5 +++-- src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 8 +++++--- src/Tasks/Common/Resources/xlf/Strings.de.xlf | 8 +++++--- src/Tasks/Common/Resources/xlf/Strings.es.xlf | 8 +++++--- src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 8 +++++--- src/Tasks/Common/Resources/xlf/Strings.it.xlf | 8 +++++--- src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 8 +++++--- src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 8 +++++--- src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 8 +++++--- .../Common/Resources/xlf/Strings.pt-BR.xlf | 8 +++++--- src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 8 +++++--- src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 8 +++++--- .../Common/Resources/xlf/Strings.zh-Hans.xlf | 8 +++++--- .../Common/Resources/xlf/Strings.zh-Hant.xlf | 8 +++++--- .../Microsoft.NET.Sdk.BeforeCommon.targets | 2 +- .../targets/Microsoft.NET.Sdk.props | 4 ++-- ...rosoft.NET.TargetFrameworkInference.targets | 18 ++++++++++++++++++ .../targets/Microsoft.NET.Windows.targets | 12 ------------ ....NET.WindowsSupportedTargetPlatforms.props} | 4 ++-- 19 files changed, 91 insertions(+), 58 deletions(-) rename src/Tasks/Microsoft.NET.Build.Tasks/targets/{Microsoft.NET.SupportedTargetPlatforms.props => Microsoft.NET.WindowsSupportedTargetPlatforms.props} (86%) diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index 2c33875ebef0..9d7f30556d26 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -649,8 +649,9 @@ The following are names of parameters or literal values and should not be transl NETSDK1136: The target platform identifier {0} was not recognized. {StrBegin="NETSDK1136: "} - - NETSDK1137: {0} is not a valid Windows TargetPlatformVersion. + + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} {StrBegin="NETSDK1137: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index 648dfb44a17a..a134d215d0b1 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -395,9 +395,11 @@ 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: "} - - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} {StrBegin="NETSDK1138: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 9f92d2496bc0..d487cb593bef 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -395,9 +395,11 @@ 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: "} - - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} {StrBegin="NETSDK1138: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index e85177f35447..292a444c6706 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -395,9 +395,11 @@ 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: "} - - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} {StrBegin="NETSDK1138: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index 7524f84d3872..0473480fe253 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -395,9 +395,11 @@ 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: "} - - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} {StrBegin="NETSDK1138: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index c60511ed9c7b..2758c2118de4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -395,9 +395,11 @@ 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: "} - - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} {StrBegin="NETSDK1138: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index aae6418181c8..c584233a2206 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -395,9 +395,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: ロールフォワード値 '{0}' が無効です。許可されている値は {1} です。 {StrBegin="NETSDK1104: "} - - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} {StrBegin="NETSDK1138: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index b4fd185c5ba5..a700b210d3cb 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -395,9 +395,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: RollForward 값 '{0}'이(가) 잘못되었습니다. 허용되는 값은 {1}입니다. {StrBegin="NETSDK1104: "} - - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} {StrBegin="NETSDK1138: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index abfadda491bd..5f9253426a47 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -395,9 +395,11 @@ 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: "} - - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} {StrBegin="NETSDK1138: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index 068abfff0eba..0e7457c5b555 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -395,9 +395,11 @@ 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: "} - - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} {StrBegin="NETSDK1138: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index 5127d20031ba..fe83375a86ff 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -395,9 +395,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: недопустимое значение RollForward "{0}". Разрешенные значения — {1}. {StrBegin="NETSDK1104: "} - - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} {StrBegin="NETSDK1138: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index 1c8f6e125271..0a18203749b3 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -395,9 +395,11 @@ 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: "} - - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} {StrBegin="NETSDK1138: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index b54de278b082..ec65c8b2a30a 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -395,9 +395,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: RollForward 值“{0}”无效。允许的值为 {1}。 {StrBegin="NETSDK1104: "} - - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} {StrBegin="NETSDK1138: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index ebc5e6f3056e..4e13577ea6d4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -395,9 +395,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1104: RollForward 值 '{0}' 無效。允許的值為 {1}。 {StrBegin="NETSDK1104: "} - - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. - NETSDK1138: {0} is not a valid Windows TargetPlatformVersion. + + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} + NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: +{2} {StrBegin="NETSDK1138: "} 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 ad4e68e5d284..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,7 +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 6ff7dd8f445e..ddd0bf04d462 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 @@ -188,6 +188,24 @@ Copyright (c) .NET Foundation. All rights reserved. FormatArguments="$(MinimumOSPlatform);$(TargetPlatformVersion)"/> + + + + + + + true + @(SupportedTargetPlatform, ', ') + None + + + + + - + From fcad556f5943ef77744e8b880a2aea6cbe129ebe Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Wed, 8 Jul 2020 12:19:29 -0700 Subject: [PATCH 27/39] Add WindowsOnlyRequiresMSBuildVersion fact and theory test attributes --- .../PublishWpfApp.cs | 2 +- ...OnlyRequiresMSBuildVersionFactAttribute.cs | 38 +++++++++++++++++++ ...lyRequiresMSBuildVersionTheoryAttribute.cs | 38 +++++++++++++++++++ 3 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionFactAttribute.cs create mode 100644 src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs 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/WindowsOnlyRequiresMSBuildVersionFactAttribute.cs b/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionFactAttribute.cs new file mode 100644 index 000000000000..505de584dd25 --- /dev/null +++ b/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionFactAttribute.cs @@ -0,0 +1,38 @@ +// 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; + +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"; + } + + 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 })."; + } + } + } + } +} 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..f09485d839d8 --- /dev/null +++ b/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs @@ -0,0 +1,38 @@ +// 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; + +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"; + } + + 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 })."; + } + } + } + } +} From ac85508c91667c0ce08ebe65f8ccc2d650d11e19 Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Thu, 23 Jul 2020 11:26:09 -0700 Subject: [PATCH 28/39] Fix merge issues --- ...ThatWeWantToBuildAWindowsDesktopProject.cs | 88 +------------------ .../RequiresMSBuildVersionFactAttribute.cs | 18 +--- .../RequiresMSBuildVersionTheoryAttribute.cs | 11 ++- ...OnlyRequiresMSBuildVersionFactAttribute.cs | 19 +--- ...lyRequiresMSBuildVersionTheoryAttribute.cs | 18 +--- 5 files changed, 12 insertions(+), 142 deletions(-) diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs index 2a8e091af7be..b8b1d07ef875 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs @@ -16,92 +16,6 @@ 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 - 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"); - } - [WindowsOnlyFact] public void It_fails_if_windows_target_platform_version_is_invalid() { @@ -120,7 +34,7 @@ public void It_fails_if_windows_target_platform_version_is_invalid() .Should() .Fail() .And - .HaveStdOutContaining("NETSDK1138"); + .HaveStdOutContaining("NETSDK1137"); } } } 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 index 505de584dd25..c4fde2edb6c0 100644 --- a/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionFactAttribute.cs +++ b/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionFactAttribute.cs @@ -1,7 +1,6 @@ // 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; @@ -16,23 +15,7 @@ public WindowsOnlyRequiresMSBuildVersionFactAttribute(string version) this.Skip = "This test requires Windows to run"; } - 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/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs b/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs index f09485d839d8..7b8f54ea0bdb 100644 --- a/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs +++ b/src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs @@ -16,23 +16,7 @@ public WindowsOnlyRequiresMSBuildVersionTheoryAttribute(string version) this.Skip = "This test requires Windows to run"; } - 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); } } } From ce24326278484529e962a5ff1a3c0fa98216e8ee Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Thu, 23 Jul 2020 11:33:37 -0700 Subject: [PATCH 29/39] PR feedback --- src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 6 ++--- src/Tasks/Common/Resources/xlf/Strings.de.xlf | 6 ++--- src/Tasks/Common/Resources/xlf/Strings.es.xlf | 6 ++--- src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 6 ++--- src/Tasks/Common/Resources/xlf/Strings.it.xlf | 6 ++--- src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 6 ++--- src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 6 ++--- src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 6 ++--- .../Common/Resources/xlf/Strings.pt-BR.xlf | 6 ++--- src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 6 ++--- src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 6 ++--- .../Common/Resources/xlf/Strings.zh-Hans.xlf | 6 ++--- .../Common/Resources/xlf/Strings.zh-Hant.xlf | 6 ++--- ...osoft.NET.TargetFrameworkInference.targets | 2 +- ...ThatWeWantToBuildAWindowsDesktopProject.cs | 25 ++++++++++++++++--- 15 files changed, 62 insertions(+), 43 deletions(-) diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index a134d215d0b1..d421c0bf9cd1 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1138: "} + {StrBegin="NETSDK1137: "} 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index d487cb593bef..416f89b041ad 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1138: "} + {StrBegin="NETSDK1137: "} 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index 292a444c6706..3b5bb3d0c23c 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1138: "} + {StrBegin="NETSDK1137: "} 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index 0473480fe253..360ed8b4e65b 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1138: "} + {StrBegin="NETSDK1137: "} 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index 2758c2118de4..2978b60f4709 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1138: "} + {StrBegin="NETSDK1137: "} 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index c584233a2206..1250374f3d33 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1138: "} + {StrBegin="NETSDK1137: "} 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index a700b210d3cb..e3b1a7550045 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1138: "} + {StrBegin="NETSDK1137: "} 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 5f9253426a47..7d7f027224ca 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1138: "} + {StrBegin="NETSDK1137: "} 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index 0e7457c5b555..bef81f297da0 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1138: "} + {StrBegin="NETSDK1137: "} 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index fe83375a86ff..8197f2d0c813 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1138: "} + {StrBegin="NETSDK1137: "} 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index 0a18203749b3..06133c83bf5f 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1138: "} + {StrBegin="NETSDK1137: "} 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index ec65c8b2a30a..e75184ce19eb 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1138: "} + {StrBegin="NETSDK1137: "} 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index 4e13577ea6d4..feb4d9439ff0 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1138: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1138: "} + {StrBegin="NETSDK1137: "} 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. 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 ddd0bf04d462..07648482b186 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 @@ -197,7 +197,7 @@ Copyright (c) .NET Foundation. All rights reserved. true - @(SupportedTargetPlatform, ', ') + @(SupportedTargetPlatform, '%0a') None diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs index b8b1d07ef875..c367a4cb8f74 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs @@ -23,10 +23,8 @@ public void It_fails_if_windows_target_platform_version_is_invalid() { Name = "InvalidWindowsVersion", IsSdkProject = true, - TargetFrameworks = "net5.0" + TargetFrameworks = "net5.0-windows1.0" }; - testProject.AdditionalProperties["TargetPlatformIdentifier"] = "Windows"; - testProject.AdditionalProperties["TargetPlatformVersion"] = "1.0"; var testAsset = _testAssetsManager.CreateTestProject(testProject); var buildCommand = new BuildCommand(testAsset); @@ -36,5 +34,26 @@ public void It_fails_if_windows_target_platform_version_is_invalid() .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"); + } } } From f19d2d2ad3215cf1c344e6aba7c3824b9826b43a Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Fri, 17 Jul 2020 08:36:22 -0700 Subject: [PATCH 30/39] Clean up from merge --- .../targets/Microsoft.NET.TargetFrameworkInference.targets | 6 +++--- .../GivenThatWeWantToBuildALibrary.cs | 1 - .../GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs | 3 +++ .../GivenThatWeWantToBuildWithATargetPlatform.cs | 7 ++----- 4 files changed, 8 insertions(+), 9 deletions(-) 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 6ff7dd8f445e..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 @@ -60,7 +60,7 @@ Copyright (c) .NET Foundation. All rights reserved. - + $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) $([MSBuild]::GetTargetPlatformVersion('$(TargetFramework)', 3)) @@ -108,7 +108,7 @@ Copyright (c) .NET Foundation. All rights reserved. + Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0))" > true @@ -116,7 +116,7 @@ Copyright (c) .NET Foundation. All rights reserved. + FormatArguments="$(TargetPlatformIdentifier)" /> diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs index bdf393ff87a3..05d8170581d6 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs @@ -790,7 +790,6 @@ public void It_passes_ridless_target_to_compiler() .Pass(); } - // TODO: need to set TargetPlatformSupported in MSBuild.SDK.Extras for this to pass [Fact] public void It_can_target_uwp_using_sdk_extras() { diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs index 2b5375744620..de03a97b2a33 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"; testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; @@ -58,6 +59,7 @@ public void WhenMinimumOSPlatformISNotSetTargetPlatformVersionIsSetItCanGenerate var targetPlatformIdentifier = "iOS"; testProject.AdditionalProperties["TargetPlatformIdentifier"] = targetPlatformIdentifier; + testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; testProject.AdditionalProperties["TargetPlatformVersion"] = "13.2"; testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; @@ -77,6 +79,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"; testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs index e2fc4ad6971d..9f35771dd8bc 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs @@ -19,7 +19,7 @@ public GivenThatWeWantToBuildWithATargetPlatform(ITestOutputHelper log) : base(l { } - [Theory] + [WindowsOnlyTheory] [InlineData("netcoreapp3.1", ".NETCoreApp", "v3.1", "Windows", "7.0")] // Default values pre-5.0 [InlineData("net5.0", ".NETCoreApp", "v5.0", "Windows", "7.0")] [InlineData("net5.0-Windows7.0", ".NETCoreApp", "v5.0", "Windows", "7.0")] @@ -38,10 +38,7 @@ public void It_defines_target_platform_from_target_framework(string targetFramew Action assertValue = (string valueName, string expected) => { - var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.Path, testProj.Name), targetFramework, valueName) - { - DependsOnTargets = "BeforeBuild" - }; + var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.Path, testProj.Name), targetFramework, valueName); getValuesCommand .Execute() .Should() From f2832693679cf750b089c3c065302d7bced21e5c Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Fri, 17 Jul 2020 08:36:22 -0700 Subject: [PATCH 31/39] Clean up from merge --- .../targets/Microsoft.NET.TargetFrameworkInference.targets | 6 +++--- .../GivenThatWeWantToBuildALibrary.cs | 1 - .../GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs | 3 +++ .../GivenThatWeWantToBuildWithATargetPlatform.cs | 7 ++----- 4 files changed, 8 insertions(+), 9 deletions(-) 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 07648482b186..00e0c9e878d2 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 @@ -60,7 +60,7 @@ Copyright (c) .NET Foundation. All rights reserved. - + $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) $([MSBuild]::GetTargetPlatformVersion('$(TargetFramework)', 3)) @@ -108,7 +108,7 @@ Copyright (c) .NET Foundation. All rights reserved. + Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0))" > true @@ -116,7 +116,7 @@ Copyright (c) .NET Foundation. All rights reserved. + FormatArguments="$(TargetPlatformIdentifier)" /> diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs index 3cdc72165b7a..796096daabf0 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs @@ -790,7 +790,6 @@ public void It_passes_ridless_target_to_compiler() .Pass(); } - // TODO: need to set TargetPlatformSupported in MSBuild.SDK.Extras for this to pass [Fact] public void It_can_target_uwp_using_sdk_extras() { diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs index 2b5375744620..de03a97b2a33 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"; testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; @@ -58,6 +59,7 @@ public void WhenMinimumOSPlatformISNotSetTargetPlatformVersionIsSetItCanGenerate var targetPlatformIdentifier = "iOS"; testProject.AdditionalProperties["TargetPlatformIdentifier"] = targetPlatformIdentifier; + testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; testProject.AdditionalProperties["TargetPlatformVersion"] = "13.2"; testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; @@ -77,6 +79,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"; testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs index e2fc4ad6971d..9f35771dd8bc 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs @@ -19,7 +19,7 @@ public GivenThatWeWantToBuildWithATargetPlatform(ITestOutputHelper log) : base(l { } - [Theory] + [WindowsOnlyTheory] [InlineData("netcoreapp3.1", ".NETCoreApp", "v3.1", "Windows", "7.0")] // Default values pre-5.0 [InlineData("net5.0", ".NETCoreApp", "v5.0", "Windows", "7.0")] [InlineData("net5.0-Windows7.0", ".NETCoreApp", "v5.0", "Windows", "7.0")] @@ -38,10 +38,7 @@ public void It_defines_target_platform_from_target_framework(string targetFramew Action assertValue = (string valueName, string expected) => { - var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.Path, testProj.Name), targetFramework, valueName) - { - DependsOnTargets = "BeforeBuild" - }; + var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.Path, testProj.Name), targetFramework, valueName); getValuesCommand .Execute() .Should() From b2048933fb17b2642eae1a3f0b5ef18dacdd5e3d Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Thu, 23 Jul 2020 15:02:48 -0700 Subject: [PATCH 32/39] Only set Windows as target platform when UseWPF or UseWindowsForms --- ...osoft.NET.TargetFrameworkInference.targets | 10 +++++ .../GivenThatWeWantToBuildALibrary.cs | 39 ++++++++++++++++++- ...WantToBuildALibraryWithOSMinimumVersion.cs | 4 +- .../GivenThatWeWantToBuildALibraryWithVB.cs | 2 +- ...venThatWeWantToBuildWithATargetPlatform.cs | 2 +- 5 files changed, 52 insertions(+), 5 deletions(-) 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 00e0c9e878d2..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 @@ -160,6 +160,16 @@ Copyright (c) .NET Foundation. All rights reserved. ResourceName="CppRequiresTFMVersion31" /> + + + <_EnableDefaultWindowsPlatform>false + false + + + + + Windows + 2.1 diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs index 796096daabf0..510a1120169f 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs @@ -417,7 +417,7 @@ public void It_implicitly_defines_compilation_constants_for_the_target_framework itemGroup.Add(supportedFramework); }); - AssertDefinedConstantsOutput(testAsset, targetFramework, new[] { "NETCOREAPP", "NET", "WINDOWS", "WINDOWS7_0" }.Concat(expectedDefines).ToArray()); + AssertDefinedConstantsOutput(testAsset, targetFramework, new[] { "NETCOREAPP", "NET"}.Concat(expectedDefines).ToArray()); } [Theory] @@ -605,6 +605,43 @@ public void It_fails_gracefully_if_targetframework_should_be_targetframeworks(bo $"The TargetFramework value '{targetFramework}' is not valid. To multi-target, use the 'TargetFrameworks' property instead"); } + [WindowsOnlyRequiresMSBuildVersionTheory("16.7.0-preview-20310-07")] + [InlineData("net5.0", "", false)] + [InlineData("net5.0", "UseWPF", true)] + [InlineData("net5.0", "UseWindowsForms", true)] + [InlineData("netcoreapp3.1", "", true)] + public void It_defines_target_platform_defaults_correctly(string targetFramework, string propertyName, bool defaultsDefined) + { + TestProject testProject = new TestProject() + { + Name = "TargetPlatformDefaults", + IsSdkProject = true, + TargetFrameworks = targetFramework + }; + + if (!propertyName.Equals(string.Empty)) + { + testProject.AdditionalProperties[propertyName] = "true"; + } + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), targetFramework, "TargetPlatformIdentifier"); + getValuesCommand + .Execute() + .Should() + .Pass(); + var values = getValuesCommand.GetValues(); + if (defaultsDefined) + { + values.Count().Should().Be(1); + values.FirstOrDefault().Should().Be("Windows"); + } + else + { + values.Count().Should().Be(0); + } + } + [Theory] [InlineData("net5.0")] [InlineData("netcoreapp3.1")] diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs index de03a97b2a33..c2c033013ba4 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs @@ -39,9 +39,9 @@ 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"; - testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; var testAsset = _testAssetsManager.CreateTestProject(testProject); @@ -60,8 +60,8 @@ public void WhenMinimumOSPlatformISNotSetTargetPlatformVersionIsSetItCanGenerate var targetPlatformIdentifier = "iOS"; testProject.AdditionalProperties["TargetPlatformIdentifier"] = targetPlatformIdentifier; testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; + testProject.AdditionalProperties["TargetPlatformVersionSupported"] = "true"; testProject.AdditionalProperties["TargetPlatformVersion"] = "13.2"; - testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; var testAsset = _testAssetsManager.CreateTestProject(testProject); diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithVB.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithVB.cs index 0afbfeaa3d39..def9568c0323 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithVB.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithVB.cs @@ -195,7 +195,7 @@ public void It_implicitly_defines_compilation_constants_for_the_configuration(st [InlineData("net45", new[] { "NETFRAMEWORK=-1", "NET45=-1" }, true)] [InlineData("net461", new[] { "NETFRAMEWORK=-1", "NET461=-1" }, true)] [InlineData("netcoreapp1.0", new[] { "NETCOREAPP=-1", "NETCOREAPP1_0=-1", "_MyType=\"Empty\"" }, false)] - [InlineData("net5.0", new[] { "NET=-1", "NET5_0=-1", "NETCOREAPP=-1", "NETCOREAPP3_1=-1", "WINDOWS=-1", "WINDOWS7_0=-1", "_MyType=\"Empty\"" }, false)] + [InlineData("net5.0", new[] { "NET=-1", "NET5_0=-1", "NETCOREAPP=-1", "NETCOREAPP3_1=-1", "_MyType=\"Empty\"" }, false)] [InlineData(".NETPortable,Version=v4.5,Profile=Profile78", new string[] { "_MyType=\"Empty\"" }, false)] [InlineData(".NETFramework,Version=v4.0,Profile=Client", new string[] { "NETFRAMEWORK=-1", "NET40=-1" }, false)] [InlineData("Xamarin.iOS,Version=v1.0", new string[] { "XAMARINIOS=-1", "XAMARINIOS1_0=-1", "_MyType=\"Empty\"" }, false)] diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs index 9f35771dd8bc..1e980ec3caee 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildWithATargetPlatform.cs @@ -21,7 +21,7 @@ public GivenThatWeWantToBuildWithATargetPlatform(ITestOutputHelper log) : base(l [WindowsOnlyTheory] [InlineData("netcoreapp3.1", ".NETCoreApp", "v3.1", "Windows", "7.0")] // Default values pre-5.0 - [InlineData("net5.0", ".NETCoreApp", "v5.0", "Windows", "7.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")] From 66133d2251ecc5af37b5ea7192616c52743bcaac Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2020 23:53:37 +0000 Subject: [PATCH 33/39] Update dependencies from https://github.com/dotnet/fsharp build 20200723.2 (#12615) [release/5.0.1xx-preview8] Update dependencies from dotnet/fsharp - Updates: - Microsoft.FSharp.Compiler: from 11.0.0-beta.20372.1 to 11.0.0-beta.20373.2 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2a5a6a7ec760..b793e96fb48d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -41,9 +41,9 @@ https://github.com/microsoft/msbuild e8338f5ad91d42c3196218648859e9e837099842 - + https://github.com/dotnet/fsharp - 670ae9e8a6e06b7dc0a5c4cb041851cebba2a0e4 + 494e1dca147f0454b4627bfce625148e7815d81e https://github.com/dotnet/roslyn diff --git a/eng/Versions.props b/eng/Versions.props index d7eadf2be941..55a48508b792 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -107,7 +107,7 @@ - 11.0.0-beta.20372.1 + 11.0.0-beta.20373.2 From 52dc3f16e3360e4b58fb25c4bdd94ae00322b984 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2020 02:19:50 +0000 Subject: [PATCH 34/39] Update dependencies from https://github.com/dotnet/roslyn build 20200723.6 (#12619) [release/5.0.1xx-preview8] Update dependencies from dotnet/roslyn - Updates: - Microsoft.Net.Compilers.Toolset: from 3.8.0-1.20373.2 to 3.8.0-1.20373.6 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b793e96fb48d..954b67fe500f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -45,9 +45,9 @@ https://github.com/dotnet/fsharp 494e1dca147f0454b4627bfce625148e7815d81e - + https://github.com/dotnet/roslyn - 7435f69531ae3bf6809d5e2939afdba4561c08bb + fc5f6179a2521062cb61d44d0e41e1ef596907d9 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 55a48508b792..8d21ec34c6e8 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -111,7 +111,7 @@ - 3.8.0-1.20373.2 + 3.8.0-1.20373.6 From 2842612683ae4c7478144e0a14284fc509ab24f6 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2020 22:08:36 +0000 Subject: [PATCH 35/39] Update dependencies from https://github.com/dotnet/fsharp build 20200724.3 (#12634) [release/5.0.1xx-preview8] Update dependencies from dotnet/fsharp - Updates: - Microsoft.FSharp.Compiler: from 11.0.0-beta.20373.2 to 11.0.0-beta.20374.3 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 954b67fe500f..351b3fc21dd1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -41,9 +41,9 @@ https://github.com/microsoft/msbuild e8338f5ad91d42c3196218648859e9e837099842 - + https://github.com/dotnet/fsharp - 494e1dca147f0454b4627bfce625148e7815d81e + 72f462067ec79a97c27ffa746ef1b0300e78556a https://github.com/dotnet/roslyn diff --git a/eng/Versions.props b/eng/Versions.props index 8d21ec34c6e8..bbd297e9ee0f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -107,7 +107,7 @@ - 11.0.0-beta.20373.2 + 11.0.0-beta.20374.3 From f9e30fa170a700c5443c62716fe23b4dfc02c712 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Sat, 25 Jul 2020 13:36:25 +0000 Subject: [PATCH 36/39] Update dependencies from https://github.com/dotnet/fsharp build 20200725.1 (#12638) [release/5.0.1xx-preview8] Update dependencies from dotnet/fsharp - Updates: - Microsoft.FSharp.Compiler: from 11.0.0-beta.20374.3 to 11.0.0-beta.20375.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 351b3fc21dd1..7f58d97f272d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -41,9 +41,9 @@ https://github.com/microsoft/msbuild e8338f5ad91d42c3196218648859e9e837099842 - + https://github.com/dotnet/fsharp - 72f462067ec79a97c27ffa746ef1b0300e78556a + a038bd41b59c33b5e46a80a0eeea526938ec4aa6 https://github.com/dotnet/roslyn diff --git a/eng/Versions.props b/eng/Versions.props index bbd297e9ee0f..3832f96b61af 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -107,7 +107,7 @@ - 11.0.0-beta.20374.3 + 11.0.0-beta.20375.1 From 1133bf0f07dce913ecdf2766a3bba4e72392be8d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Sat, 25 Jul 2020 22:45:56 +0000 Subject: [PATCH 37/39] Update dependencies from https://github.com/dotnet/fsharp build 20200725.2 (#12639) [release/5.0.1xx-preview8] Update dependencies from dotnet/fsharp - Updates: - Microsoft.FSharp.Compiler: from 11.0.0-beta.20375.1 to 11.0.0-beta.20375.2 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7f58d97f272d..e0948fe47dcd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -41,9 +41,9 @@ https://github.com/microsoft/msbuild e8338f5ad91d42c3196218648859e9e837099842 - + https://github.com/dotnet/fsharp - a038bd41b59c33b5e46a80a0eeea526938ec4aa6 + 9abe1ba94b260429e5d055f1cc1b9e2a83fddf30 https://github.com/dotnet/roslyn diff --git a/eng/Versions.props b/eng/Versions.props index 3832f96b61af..701869f8820b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -107,7 +107,7 @@ - 11.0.0-beta.20375.1 + 11.0.0-beta.20375.2 From aa52f3a23cc832c2851217f36a1c112b56a8ee01 Mon Sep 17 00:00:00 2001 From: William Li Date: Sun, 26 Jul 2020 17:19:40 -0700 Subject: [PATCH 38/39] Merge format --- .../GivenThatWeWantToBuildAWindowsDesktopProject.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs index c17e517725b1..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,8 +101,8 @@ public void It_warns_when_specifying_windows_desktop_sdk() .And .HaveStdOutContaining("NETSDK1137"); } - - [WindowsOnlyFact] + + [WindowsOnlyFact] public void It_fails_if_windows_target_platform_version_is_invalid() { var testProject = new TestProject() From 033483dfd14bc0034b4140be3b7c3e1d1aed98a4 Mon Sep 17 00:00:00 2001 From: William Li Date: Sun, 26 Jul 2020 17:24:04 -0700 Subject: [PATCH 39/39] String merge conflict --- eng/Version.Details.xml.orig | 148 ++++ eng/Versions.props.orig | 157 +++++ src/Layout/redist/minimumMSBuildVersion.orig | 5 + src/Tasks/Common/Resources/Strings.resx | 5 +- src/Tasks/Common/Resources/Strings.resx.orig | 666 ++++++++++++++++++ src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 12 +- src/Tasks/Common/Resources/xlf/Strings.de.xlf | 12 +- src/Tasks/Common/Resources/xlf/Strings.es.xlf | 12 +- src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 12 +- src/Tasks/Common/Resources/xlf/Strings.it.xlf | 12 +- src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 12 +- src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 12 +- src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 12 +- .../Common/Resources/xlf/Strings.pt-BR.xlf | 12 +- src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 12 +- src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 12 +- .../Common/Resources/xlf/Strings.zh-Hans.xlf | 12 +- .../Common/Resources/xlf/Strings.zh-Hant.xlf | 12 +- ...eWantToBuildAWindowsDesktopProject.cs.orig | 140 ++++ ...uiresMSBuildVersionTheoryAttribute.cs.orig | 25 + 20 files changed, 1221 insertions(+), 81 deletions(-) create mode 100644 eng/Version.Details.xml.orig create mode 100644 eng/Versions.props.orig create mode 100644 src/Layout/redist/minimumMSBuildVersion.orig create mode 100644 src/Tasks/Common/Resources/Strings.resx.orig create mode 100644 src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs.orig create mode 100644 src/Tests/Microsoft.NET.TestFramework/Attributes/WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs.orig 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/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 230eb9d315db..66ac8f2da9d2 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -652,14 +652,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: "} - - NETSDK1136: The target platform identifier {0} was not recognized. + NETSDK1138: The target platform identifier {0} was not recognized. {StrBegin="NETSDK1138: "} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + 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 e9bdf5b83fa5..cfdd301e2776 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1137: "} + {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. @@ -656,9 +656,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1136: The target platform identifier {0} was not recognized. - NETSDK1136: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1136: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 6b5795b48472..932d989441a4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1137: "} + {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. @@ -656,9 +656,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1136: The target platform identifier {0} was not recognized. - NETSDK1136: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1136: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index d450e364da27..12b009af02a5 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1137: "} + {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. @@ -656,9 +656,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1136: The target platform identifier {0} was not recognized. - NETSDK1136: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1136: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index ad492d332e65..ad6d99edeae3 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1137: "} + {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. @@ -656,9 +656,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1136: The target platform identifier {0} was not recognized. - NETSDK1136: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1136: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index 406232a0432d..8907bdd16159 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1137: "} + {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. @@ -656,9 +656,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1136: The target platform identifier {0} was not recognized. - NETSDK1136: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1136: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index 79e416ffde98..94eb8c881ed6 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1137: "} + {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. @@ -656,9 +656,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1136: The target platform identifier {0} was not recognized. - NETSDK1136: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1136: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index 588a6664dee1..9bda9a150071 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1137: "} + {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. @@ -656,9 +656,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1136: The target platform identifier {0} was not recognized. - NETSDK1136: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1136: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 8b15e2393e6c..e664a7c86d6e 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1137: "} + {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. @@ -656,9 +656,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1136: The target platform identifier {0} was not recognized. - NETSDK1136: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1136: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index e119de3946fb..4cc49be58ab4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1137: "} + {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. @@ -656,9 +656,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1136: The target platform identifier {0} was not recognized. - NETSDK1136: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1136: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index ad5eddc40f31..066fd22b63a8 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1137: "} + {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. @@ -656,9 +656,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1136: The target platform identifier {0} was not recognized. - NETSDK1136: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1136: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index a319c6f86f8e..8f08de105b7a 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1137: "} + {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. @@ -656,9 +656,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1136: The target platform identifier {0} was not recognized. - NETSDK1136: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1136: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index 7482e5cc3f3c..090e069030d0 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1137: "} + {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. @@ -656,9 +656,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1136: The target platform identifier {0} was not recognized. - NETSDK1136: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1136: "} + 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. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index b14f14c959b6..5bf479e15412 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -396,11 +396,11 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1104: "} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - NETSDK1137: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: + NETSDK1139: {0} is not a valid TargetPlatformVersion for {1}. Valid versions include: {2} - {StrBegin="NETSDK1137: "} + {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. @@ -656,9 +656,9 @@ The following are names of parameters or literal values and should not be transl {StrBegin="NETSDK1045: "} - NETSDK1136: The target platform identifier {0} was not recognized. - NETSDK1136: The target platform identifier {0} was not recognized. - {StrBegin="NETSDK1136: "} + 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. 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.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); + } + } +}