зеркало из https://github.com/dotnet/msbuild.git
Preload System.Text.Json 8.0.0.4
This works around dotnet/sdk#43339 by preloading a copy of the assembly that can't be located with the normal load processes. It should be harmless (other than wasting time) in circumstances where it's not necessary.
This commit is contained in:
Родитель
d93deee6ea
Коммит
2e8f2dcf94
|
@ -37,4 +37,30 @@
|
|||
<RemoveDir Directories="$(_PackageFolderInGlobalPackages)"
|
||||
Condition="Exists('$(_PackageFolderInGlobalPackages)')" />
|
||||
</Target>
|
||||
|
||||
<!-- 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>
|
||||
|
|
Загрузка…
Ссылка в новой задаче