Skip to content

Commit

Permalink
Temporary introduce rc1 workaround to arcade tools restore until ther…
Browse files Browse the repository at this point in the history
…e's a fix
  • Loading branch information
vzarytovskii authored Sep 13, 2024
1 parent 91d5a0a commit ddc90b8
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions eng/common/internal/Tools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,31 @@
<AutomaticallyUseReferenceAssemblyPackages>false</AutomaticallyUseReferenceAssemblyPackages>
<BuildWithNetFrameworkHostedCompiler>false</BuildWithNetFrameworkHostedCompiler>
</PropertyGroup>
<!-- BEGIN workaround for https://github.com/dotnet/sdk/issues/43339; remove after updated to VS 17.12, future 17.11 patch or when arcade ships the the same workaround -->
<Target Name="WorkaroundDotnetSdk43339" BeforeTargets="ResolvePackageAssets" Condition=" '$(MSBuildRuntimeType)' == 'Full' and $([MSBuild]::VersionLessThan($(MSBuildVersion), 17.12.0))">
<PrimeSystemTextJson804 />
</Target>
<UsingTask
TaskName="PrimeSystemTextJson804"
TaskFactory="RoslynCodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll" >
<Task>
<Code Type="Fragment" Language="cs">
<![CDATA[
try
{
System.Reflection.Assembly.LoadFrom(@"$(MicrosoftNETBuildTasksDirectoryRoot)\..\..\..\DotnetTools\dotnet-format\BuildHost-net472\System.Text.Json.dll");
}
catch
{
// Best effort: if something moves in the SDK don't break the build.
}
]]>
</Code>
</Task>
</UsingTask>
<!-- END workaround for https://github.com/dotnet/sdk/issues/43339 -->

<ItemGroup>
<!-- Clear references, the SDK may add some depending on UsuingToolXxx settings, but we only want to restore the following -->
<PackageReference Remove="@(PackageReference)"/>
Expand Down

0 comments on commit ddc90b8

Please sign in to comment.