dotnet/format: Fix ref-only extensions package usage at runtime

This commit is contained in:
Davis Goodin 2021-10-22 12:55:26 -05:00
parent 7828a7f0f0
commit 3e0a3b5b49

View file

@ -9,6 +9,20 @@
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
</PropertyGroup>
<ItemGroup>
<!--
dotnet/format has a single property MicrosoftExtensionsVersion that controls the version of
all packages like 'Microsoft.Extensions.*'. But, there is no package called
"Microsoft.Extensions", so the source-built version isn't used and dotnet/format downloads an
old version that comes from SBRP and fails at runtime, when you try to use dotnet-format.
Pick an arbitrary representative package to pass in as MicrosoftExtensionsVersion so it uses
the source-built version from the PVP.
-->
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftExtensionsVersion" Version="%24(MicrosoftExtensionsDependencyInjectionVersion)" />
</ItemGroup>
<ItemGroup>
<RepositoryReference Include="roslyn" />
<RepositoryReference Include="roslyn-analyzers" />