Skip to content

Commit

Permalink
Workaround NuGet Json issue (#575)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyGerlicher authored Sep 25, 2024
1 parent b925b61 commit 64721c9
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,29 @@
<ItemGroup>
<InternalsVisibleTo Update="@(InternalsVisibleTo)" Condition="'$(SignType)' == 'Test' Or '$(SignType)' == 'Real'" Key="002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4" />
</ItemGroup>

<!-- BEGIN workaround for https://github.com/dotnet/sdk/issues/43339; remove after updated to VS 17.12 or a future 17.11 patch -->
<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 -->
</Project>

0 comments on commit 64721c9

Please sign in to comment.