Skip to content

Commit

Permalink
Build w/ VS 2019 (#20104)
Browse files Browse the repository at this point in the history
- should clean up `restore` of RepoTasks.csproj
- change `demands` for our Windows jobs
- widen `versionRange` and update `requiredWorkloads` in main and Windows Installers builds
- avoid F# projects for now
  - until VS 2019 build issues are resolved or we remove the project entirely
  - apparently, no tests reference the F# web site
- add `$(TargetFrameworkMoniker)` setting for *.wixproj projects
  - remove `$(TargetFramework)` property; `$(TargetFrameworkMoniker)` should be enough
  • Loading branch information
dougbu committed Nov 30, 2021
1 parent 220d4d1 commit 1439587
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .azure/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
clean: all
pool:
name: NetCore1ESPool-Svc-Internal
demands: ImageOverride -equals Build.Server.Amd64.VS2017
demands: ImageOverride -equals Build.Server.Amd64.VS2019
variables:
_SignType: real
JAVA_HOME: $(Agent.BuildDirectory)\.tools\jdk
Expand Down Expand Up @@ -356,7 +356,7 @@ jobs:
clean: all
pool:
name: NetCore1ESPool-Svc-Internal
demands: ImageOverride -equals Build.Server.Amd64.VS2017
demands: ImageOverride -equals Build.Server.Amd64.VS2019
variables:
_SignType: real
JAVA_HOME: $(Agent.BuildDirectory)\.tools\jdk
Expand Down Expand Up @@ -434,7 +434,7 @@ jobs:
clean: all
pool:
name: NetCore1ESPool-Svc-Internal
demands: ImageOverride -equals Build.Server.Amd64.VS2017
demands: ImageOverride -equals Build.Server.Amd64.VS2019
variables:
_SignType: real
JAVA_HOME: $(Agent.BuildDirectory)\.tools\jdk
Expand Down Expand Up @@ -586,7 +586,7 @@ jobs:
clean: all
pool:
name: NetCore1ESPool-Svc-Internal
demands: ImageOverride -equals Build.Server.Amd64.VS2017
demands: ImageOverride -equals Build.Server.Amd64.VS2019
variables:
_SignType: real
JAVA_HOME: $(Agent.BuildDirectory)\.tools\jdk
Expand Down
4 changes: 2 additions & 2 deletions .azure/pipelines/jobs/default-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ jobs:
${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Windows')) }}:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: NetCore1ESPool-Svc-Public
demands: ImageOverride -equals Build.Server.Amd64.VS2017.Open
demands: ImageOverride -equals Build.Server.Amd64.VS2019.Open
${{ if ne(variables['System.TeamProject'], 'public') }}:
name: NetCore1ESPool-Svc-Internal
demands: ImageOverride -equals Build.Server.Amd64.VS2017
demands: ImageOverride -equals Build.Server.Amd64.VS2019
variables:
AgentOsName: ${{ parameters.agentOs }}
BuildScriptArgs: ${{ parameters.buildArgs }}
Expand Down
3 changes: 3 additions & 0 deletions build/repo.props
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
$(RepositoryRoot)src\SignalR\clients\cpp\**\*.*proj;
$(RepositoryRoot)src\SignalR\clients\ts\**\node_modules\**\*.*proj;
" />

<!-- Temporary: Avoid F# until VS 2019 build issues are resolved. -->
<ProjectToExclude Include="$(RepositoryRoot)src\Mvc\test\WebSites\FSharpWebSite\FSharpWebSite.fsproj" />
</ItemGroup>

<Choose>
Expand Down
3 changes: 2 additions & 1 deletion eng/targets/Wix.Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

<PropertyGroup>
<!-- Required to make NuGet happy -->
<TargetFramework>net461</TargetFramework>
<TargetFrameworkMoniker>Native,Version=v0.0</TargetFrameworkMoniker>

<MSBuildProjectExtensionsPath>$(BaseIntermediateOutputPath)</MSBuildProjectExtensionsPath>
<MSBuildProjectExtensionsPath Condition="'$(MSBuildProjectExtensionsPath)' == ''">$(MSBuildProjectDir)\obj\</MSBuildProjectExtensionsPath>
<NuGetRestoreTargets Condition="'$(NuGetRestoreTargets)'==''">$(MSBuildExtensionsPath)\..\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets</NuGetRestoreTargets>
Expand Down
4 changes: 2 additions & 2 deletions korebuild.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"Windows"
],
"includePrerelease": true,
"versionRange": "[15.8, 16.0)",
"versionRange": "[15.8, 17.0)",
"requiredWorkloads": [
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81",
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.VC.ATL",
"Microsoft.VisualStudio.Component.Windows10SDK.17134"
Expand Down
7 changes: 5 additions & 2 deletions scripts/common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ function Get-MSBuildPath {
}
}

$installs = & $vswhere -format json -version '[15.0, 16.0)' -latest -products * @vswhereArgs | ConvertFrom-Json
$installs = & $vswhere -format json -version '[15.0, 17.0)' -latest -products * @vswhereArgs | ConvertFrom-Json
if (!$installs) {
Write-Error "Missing prerequisite: could not find any installations of Visual Studio"
}
Expand All @@ -286,7 +286,10 @@ function Get-MSBuildPath {
Write-Host "Using $($vs.displayName)"
}

$msbuild = Join-Path $vsInstallDir 'MSBuild/15.0/bin/msbuild.exe'
$msbuild = Join-Path $vsInstallDir 'MSBuild/15.0/bin/msbuild.exe'
if (!(Test-Path $msbuild)) {
$msbuild = Join-Path $vsInstallDir 'MSBuild/Current/bin/msbuild.exe'
}
if (!(Test-Path $msbuild)) {
Write-Error "Missing prerequisite: could not find msbuild.exe"
}
Expand Down

0 comments on commit 1439587

Please sign in to comment.