Skip to content

Commit

Permalink
Shorten package version properties (dotnet/aspnetcore#27784)
Browse files Browse the repository at this point in the history
* Shorten package version properties
- `$(...PackageVersion)` -> `$(...Version)`
- inspired by a similar dotnet/efcore change
- aligns names with Arcade SDK, meaning our values apply consistently

* Remove unused PublishSymbols.proj and related property
- restore Arcade's control of `$(MicrosoftSymbolUploaderBuildTaskVersion>)`
- would otherwise result in a version downgrade

* Update `$(MicrosoftNetCompilersToolsetVersion)` to match Arcade's value
- avoid using an older toolset
- now successfully overriding Arcade value

* Avoid an odd `CS8603` error
- delete the unused `GetOptionalProperty(...)` method

* Correct an unintentional change reading package metadata
- `%(ReferencePathWithRefAssemblies.NuGetPackageVersion)` is the correct name

Commit migrated from dotnet/aspnetcore@44c0e6651e38
  • Loading branch information
dougbu authored Nov 13, 2020
1 parent 488561f commit 8d2dfd9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ internal Task<MSBuildResult> DotnetMSBuild(
"/p:RunningAsTest=true",

$"/p:MicrosoftNETCoreAppRuntimeVersion={BuildVariables.MicrosoftNETCoreAppRuntimeVersion}",
$"/p:MicrosoftNetCompilersToolsetPackageVersion={BuildVariables.MicrosoftNetCompilersToolsetPackageVersion}",
$"/p:MicrosoftNetCompilersToolsetVersion={BuildVariables.MicrosoftNetCompilersToolsetVersion}",
$"/p:RazorSdkDirectoryRoot={BuildVariables.RazorSdkDirectoryRoot}",
$"/p:RepoRoot={BuildVariables.RepoRoot}",
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
</Target>

<Target Name="RestoreTestProjects" BeforeTargets="Restore;Build" Condition="'$(DotNetBuildFromSource)' != 'true'">
<MSBuild Projects="..\..\test\testassets\RestoreTestProjects\RestoreTestProjects.csproj" Targets="Restore" Properties="MicrosoftNetCompilersToolsetPackageVersion=$(MicrosoftNetCompilersToolsetPackageVersion);RepoRoot=$(RepoRoot)" />
<MSBuild Projects="..\..\test\testassets\PackageLibraryDirectDependency\PackageLibraryDirectDependency.csproj" Targets="Restore" Properties="MicrosoftNetCompilersToolsetPackageVersion=$(MicrosoftNetCompilersToolsetPackageVersion);RepoRoot=$(RepoRoot)" />
<MSBuild Projects="..\..\test\testassets\PackageLibraryTransitiveDependency\PackageLibraryTransitiveDependency.csproj" Targets="Restore" Properties="MicrosoftNetCompilersToolsetPackageVersion=$(MicrosoftNetCompilersToolsetPackageVersion);RepoRoot=$(RepoRoot)" />
<MSBuild Projects="..\..\test\testassets\RestoreTestProjects\RestoreTestProjects.csproj" Targets="Restore" Properties="MicrosoftNetCompilersToolsetVersion=$(MicrosoftNetCompilersToolsetVersion);RepoRoot=$(RepoRoot)" />
<MSBuild Projects="..\..\test\testassets\PackageLibraryDirectDependency\PackageLibraryDirectDependency.csproj" Targets="Restore" Properties="MicrosoftNetCompilersToolsetVersion=$(MicrosoftNetCompilersToolsetVersion);RepoRoot=$(RepoRoot)" />
<MSBuild Projects="..\..\test\testassets\PackageLibraryTransitiveDependency\PackageLibraryTransitiveDependency.csproj" Targets="Restore" Properties="MicrosoftNetCompilersToolsetVersion=$(MicrosoftNetCompilersToolsetVersion);RepoRoot=$(RepoRoot)" />
</Target>

<Target Name="EnsureLogFolder" AfterTargets="Build">
Expand Down
4 changes: 2 additions & 2 deletions src/test/testassets/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
We'll fall back to whatever the current SDK provides in regards to Roslyn's Microsoft.Net.Compilers.Toolset.
-->
<BuildingTestAppsIndependently>false</BuildingTestAppsIndependently>
<BuildingTestAppsIndependently Condition="'$(MicrosoftNetCompilersToolsetPackageVersion)' == ''">true</BuildingTestAppsIndependently>
<BuildingTestAppsIndependently Condition="'$(MicrosoftNetCompilersToolsetVersion)' == ''">true</BuildingTestAppsIndependently>

<!-- Do not resolve Reference ItemGroup since it has a different semantic meaning in Razor test apps -->
<EnableCustomReferenceResolution>false</EnableCustomReferenceResolution>
Expand Down Expand Up @@ -43,7 +43,7 @@
</ItemGroup>
<ItemGroup Condition="$(BuildingTestAppsIndependently) == 'false'">
<PackageReference Include="Microsoft.Net.Compilers.Toolset"
Version="$(MicrosoftNetCompilersToolsetPackageVersion)"
Version="$(MicrosoftNetCompilersToolsetVersion)"
PrivateAssets="all"
IsImplicitlyDefined="true" />
</ItemGroup>
Expand Down

0 comments on commit 8d2dfd9

Please sign in to comment.