upgrade-assistant/TryConvertInstaller.targets

28 строки
1.2 KiB
XML

<Project>
<PropertyGroup>
<InstallTryConvert Condition=" '$(InstallTryConvert)' == '' ">false</InstallTryConvert>
</PropertyGroup>
<Target Name="RestoreAndCopyTryConvert" BeforeTargets="AssignTargetPaths" Condition="$(InstallTryConvert)">
<PropertyGroup>
<!-- By default, NuGet will not include files starting with '.' or ending with '.nupkg'. Since we are including try-convert via dotnet tools, some of the files fit into this. -->
<NoDefaultExcludes>true</NoDefaultExcludes>
<ToolsDirectory>$(MSBuildThisFileDirectory).tools\</ToolsDirectory>
<TryConvertVersion>0.7.226301</TryConvertVersion>
<TryConvertDirectory>$(ToolsDirectory)try-convert\$(TryConvertVersion)\</TryConvertDirectory>
</PropertyGroup>
<Exec Command="dotnet tool install try-convert --version $(TryConvertVersion) --tool-path $(TryConvertDirectory)" Condition="!Exists($(TryConvertDirectory))" />
<ItemGroup>
<__TryConvertContents Include="$(TryConvertDirectory)\**\*" />
<None Include="@(__TryConvertContents)">
<Link>tools/%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Target>
</Project>