diff --git a/build.ps1 b/build.ps1 index fc4830731a..2d08643422 100644 --- a/build.ps1 +++ b/build.ps1 @@ -102,6 +102,11 @@ param( [Parameter(ParameterSetName = 'Groups')] [switch]$Installers, + # By default, Windows builds will use MSBuild.exe. Passing this will force the build to run on + # dotnet.exe instead, which may cause issues if you invoke build on a project unsupported by + # MSBuild for .NET Core + [switch]$ForceCoreMsbuild, + # Other lifecycle targets [switch]$Help, # Show help @@ -269,6 +274,9 @@ Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1') try { Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $RepoRoot -ConfigFile $ConfigFile -CI:$CI + if ($ForceCoreMsbuild) { + $global:KoreBuildSettings.MSBuildType = 'core' + } Invoke-KoreBuildCommand 'default-build' @MSBuildArguments } finally { diff --git a/build/Publish.targets b/build/Publish.targets index 54d9b39641..fa3e8c9d77 100644 --- a/build/Publish.targets +++ b/build/Publish.targets @@ -1,130 +1,13 @@ - - - GetFilesToPublish; - PublishToAzureFeed; - PublishToMyGet; - - + + - - - - - - <_FilesToPublish Include="$(InstallersOutputPath)*.txt"> - text/plain - - - <_FilesToPublish Include="$(InstallersOutputPath)*.version"> - text/plain - no-cache, no-store, must-revalidate - - - <_FilesToPublish Include="$(InstallersOutputPath)*.svg"> - no-cache, no-store, must-revalidate - image/svg+xml - - - - <_FilesToPublish Include="$(InstallersOutputPath)*" Exclude="@(_FilesToPublish)" /> - - - <_FilesToPublish Include="$(ProductPackageOutputPath)*.jar;$(ProductPackageOutputPath)*.pom"> - aspnetcore/jar/$(PackageVersion)/ - - - - - %(_FilesToPublish.BlobBasePath)%(_FilesToPublish.FileName)%(_FilesToPublish.Extension) - aspnetcore/Runtime/$(PackageVersion)/%(_FilesToPublish.FileName)%(_FilesToPublish.Extension) - - <_FilesToPublish Remove="@(_FilesToPublish)" /> - - - - - - - - - - - - NonShipping=true - - - NonShipping=true - - - - - - - - - - - - - - - - - - - $(PublishMyGetNpmRegistryUrl.Replace("https:", "")):_authToken - - - - - - - - - - - - - - - - - - - + diff --git a/build/publish/Publish.csproj b/build/publish/Publish.csproj new file mode 100644 index 0000000000..577b107fd9 --- /dev/null +++ b/build/publish/Publish.csproj @@ -0,0 +1,186 @@ + + + + + + + netcoreapp3.0 + true + $(ArtifactsDir)manifests\ + https://maestro-prod.westus2.cloudapp.azure.com + + + + + + + + + + + + GetFilesToPublish; + GenerateBuildAssetManifest; + PublishToAzureFeed; + PublishToMyGet; + PublishToBuildAssetRegistry; + + + + + + + + + <_FilesToPublish Include="$(InstallersOutputPath)*.txt"> + text/plain + + + <_FilesToPublish Include="$(InstallersOutputPath)*.version"> + text/plain + no-cache, no-store, must-revalidate + + + <_FilesToPublish Include="$(InstallersOutputPath)*.svg"> + no-cache, no-store, must-revalidate + image/svg+xml + + + + <_FilesToPublish Include="$(InstallersOutputPath)*" Exclude="@(_FilesToPublish)" /> + + + <_FilesToPublish Include="$(ProductPackageOutputPath)*.jar;$(ProductPackageOutputPath)*.pom"> + aspnetcore/jar/$(PackageVersion)/ + + + + + aspnetcore/npm/$(PackageVersion)/ + + <_FilesToPublish Include="@(NpmPackageToPublish)" /> + + + + %(_FilesToPublish.BlobBasePath)%(_FilesToPublish.FileName)%(_FilesToPublish.Extension) + aspnetcore/Runtime/$(PackageVersion)/%(_FilesToPublish.FileName)%(_FilesToPublish.Extension) + + <_FilesToPublish Remove="@(_FilesToPublish)" /> + + + + + + + + + NonShipping=true + + + NonShipping=true + + + + + + + + + + + + + + + + + + + + + + + $(PublishMyGetNpmRegistryUrl.Replace("https:", "")):_authToken + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/tasks/PublishToAzureBlob.cs b/build/tasks/PublishToAzureBlob.cs index 86150d0be3..71f1b1c29a 100644 --- a/build/tasks/PublishToAzureBlob.cs +++ b/build/tasks/PublishToAzureBlob.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#if BUILD_AZ_TASKS using System; using System.Collections.Generic; using System.IO; @@ -142,3 +143,4 @@ namespace RepoTasks } } } +#endif diff --git a/build/tasks/RepoTasks.csproj b/build/tasks/RepoTasks.csproj index 82c90e29a2..06c08355a3 100644 --- a/build/tasks/RepoTasks.csproj +++ b/build/tasks/RepoTasks.csproj @@ -5,13 +5,14 @@ netcoreapp2.2 net461 $(DefineConstants);BUILD_MSI_TASKS + $(DefineConstants);BUILD_AZ_TASKS - + diff --git a/build/tasks/RepoTasks.tasks b/build/tasks/RepoTasks.tasks index 43323cf2e2..e073e49173 100644 --- a/build/tasks/RepoTasks.tasks +++ b/build/tasks/RepoTasks.tasks @@ -9,6 +9,6 @@ - +