Skip to content

Commit 7bfaceb

Browse files
committed
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`
1 parent 983e7ed commit 7bfaceb

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

.azure/pipelines/jobs/codesign-xplat.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
- powershell: .\eng\common\build.ps1
3232
-ci
3333
-nobl
34+
-msbuildEngine dotnet
3435
-restore
3536
-sign
3637
-publish

eng/Publishing.props

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@
3131
</ItemGroup>
3232

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

eng/targets/Npm.Common.targets

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<BuildOutputFiles Include="dist\**\*.js" />
3030
</ItemGroup>
3131

32-
<Target Name="_CheckForInvalidConfiguration">
32+
<Target Name="_CheckForInvalidConfiguration" Condition=" '$(DisableYarnCheck)' != 'true' ">
3333
<Error Text="Missing expected property: PackageId" Condition="'$(IsPackable)' != 'false' and '$(PackageId)' == ''" />
3434

3535
<Exec ContinueOnError="true" Command="node -v" StandardOutputImportance="Low">
@@ -115,6 +115,19 @@
115115

116116
<Target Name="Pack" Condition="'$(IsPackable)' == 'true'" DependsOnTargets="$(PackDependsOn)" />
117117

118+
<!-- This target is used to get the package versions of projects. A variant also exists in Packaging.targets. -->
119+
<Target Name="_GetPackageVersionInfo" Returns="@(_ProjectPathWithVersion)">
120+
<ItemGroup>
121+
<_ProjectPathWithVersion Include="$(MSBuildProjectFullPath)">
122+
<PackageId>$(PackageId)</PackageId>
123+
<PackageVersion>$(PackageVersionForPackageVersionInfo)</PackageVersion>
124+
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
125+
<!-- Fill in the item though variable names like "@microsoft/signalrPackageVersion" are likely invalid. -->
126+
<VersionVariableName>$(PackageId.Replace('.',''))PackageVersion</VersionVariableName>
127+
</_ProjectPathWithVersion>
128+
</ItemGroup>
129+
</Target>
130+
118131
<Target Name="_RestoreBackupPackageJsonFile">
119132
<Move SourceFiles="$(_BackupPackageJson)" DestinationFiles="$(PackageJson)" />
120133
</Target>

eng/targets/Packaging.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
See $(RepoRoot)eng\tools\BaselineGenerator\README.md for instructions on updating this baseline." />
88
</Target>
99

10-
<!-- This target is used to get the package versions of projects -->
10+
<!-- This target is used to get the package versions of projects. A variant also exists in Npm.Common.targets. -->
1111
<Target Name="_GetPackageVersionInfo" DependsOnTargets="$(GetPackageVersionDependsOn)"
1212
Returns="@(_ProjectPathWithVersion)">
1313
<ItemGroup>

0 commit comments

Comments
 (0)