Remove requirements for VS 16.7

- use SignalR.Npm.FunctionalTests.npmproj to get non-stable version
  - not Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj (avoid C# and F# projects)
  - add `_GetPackageVersionInfo` target to all `*.npmproj` projects
    - make `_GetPackageVersionInfo` target work when `yarn` is not installed
- switch codesign-xplat.yml to use `dotnet msbuild`
  - above change also fixes Code-sign jobs but they're slightly faster using `dotnet msbuild`
This commit is contained in:
Doug Bunting 2020-08-06 13:11:38 -07:00
parent 15ba83248f
commit 3ee7058ef0
4 changed files with 23 additions and 7 deletions

View File

@ -31,6 +31,7 @@ jobs:
- powershell: .\eng\common\build.ps1
-ci
-nobl
-msbuildEngine dotnet
-restore
-sign
-publish

View File

@ -31,12 +31,14 @@
</ItemGroup>
<Target Name="_PublishInstallersAndChecksums">
<!--
This target is defined in eng/targets/Packaging.targets and included in every C# and F# project.
We use Microsoft.AspNetCore.DeveloperCertificates.XPlat because it is a nonshipping package, and we need a non-stable version string to use as our publish location.
If Microsoft.AspNetCore.DeveloperCertificates.XPlat ever becomes a shipping package, this logic will break, so be careful
<!--
This target is defined in eng/targets/Packaging.targets and Npm.Common.targets and included in every C#, F#,
and npm project. We use SignalR.Npm.FunctionalTests.npmproj because it is non-shipping (we need a non-stable
version string to use as our publish location), non-packed (won't be shipped in the future), and it is _not_ a
C# or F# project. For now at least, C# and F# projects should not be referenced when using desktop msbuild.
-->
<MSBuild Projects="$(RepoRoot)src\Tools\FirstRunCertGenerator\src\Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj"
<MSBuild Projects="$(RepoRoot)src\SignalR\clients\ts\FunctionalTests\SignalR.Npm.FunctionalTests.npmproj"
Properties="DisableYarnCheck=true"
Targets="_GetPackageVersionInfo"
SkipNonexistentProjects="false">
<Output TaskParameter="TargetOutputs" ItemName="_ResolvedPackageVersionInfo" />

View File

@ -29,7 +29,7 @@
<BuildOutputFiles Include="dist\**\*.js" />
</ItemGroup>
<Target Name="_CheckForInvalidConfiguration">
<Target Name="_CheckForInvalidConfiguration" Condition=" '$(DisableYarnCheck)' != 'true' ">
<Error Text="Missing expected property: PackageId" Condition="'$(IsPackable)' != 'false' and '$(PackageId)' == ''" />
<Exec ContinueOnError="true" Command="node -v" StandardOutputImportance="Low">
@ -115,6 +115,19 @@
<Target Name="Pack" Condition="'$(IsPackable)' == 'true'" DependsOnTargets="$(PackDependsOn)" />
<!-- This target is used to get the package versions of projects. A variant also exists in Packaging.targets. -->
<Target Name="_GetPackageVersionInfo" Returns="@(_ProjectPathWithVersion)">
<ItemGroup>
<_ProjectPathWithVersion Include="$(MSBuildProjectFullPath)">
<PackageId>$(PackageId)</PackageId>
<PackageVersion>$(PackageVersionForPackageVersionInfo)</PackageVersion>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<!-- Fill in the item though variable names like "@microsoft/signalrPackageVersion" are likely invalid. -->
<VersionVariableName>$(PackageId.Replace('.',''))PackageVersion</VersionVariableName>
</_ProjectPathWithVersion>
</ItemGroup>
</Target>
<Target Name="_RestoreBackupPackageJsonFile">
<Move SourceFiles="$(_BackupPackageJson)" DestinationFiles="$(PackageJson)" />
</Target>

View File

@ -7,7 +7,7 @@
See $(RepoRoot)eng\tools\BaselineGenerator\README.md for instructions on updating this baseline." />
</Target>
<!-- This target is used to get the package versions of projects -->
<!-- This target is used to get the package versions of projects. A variant also exists in Npm.Common.targets. -->
<Target Name="_GetPackageVersionInfo" DependsOnTargets="$(GetPackageVersionDependsOn)"
Returns="@(_ProjectPathWithVersion)">
<ItemGroup>