Skip to content

Commit

Permalink
Update to use NuGetPackageRoot
Browse files Browse the repository at this point in the history
  • Loading branch information
ricaun committed Sep 3, 2024
1 parent a833abd commit d0195ca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Property Name | Default Value | Description
`ILRepackDeleteEnabled`| `true` | Enable / Disable delete dependencies repacked from output.
`ILRepackImportance` | `Low` | Log importance to show in the console. (`Low` or `High`)
`ILRepackCommandImportance` | `Low` | Log importance from the `ILRepack.exe` to show in the console. (`Low` or `High`)
`ILRepackCommandExtra` | `` | Extra command to be used in the `ILRepack.exe`.
`ILRepackCommandExtra` | | Extra command to be used in the `ILRepack.exe`.

```xml
<PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions ricaun.ILRepack/ricaun.ILRepack.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<PropertyGroup>
<PackageId>ricaun.ILRepack</PackageId>
<Version>1.0.0-alpha.1</Version>
<Version>1.0.0-alpha.2</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -98,7 +98,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="ILRepack" Version="2.0.34" GeneratePathProperty="true"/>
<PackageReference Include="ILRepack" Version="2.0.34" />
</ItemGroup>

<Target Name="CopyPackFiles" AfterTargets="Pack">
Expand Down
22 changes: 3 additions & 19 deletions ricaun.ILRepack/ricaun.ILRepack.targets
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
<Project>

<!--
<PropertyGroup>
<ILRepackImportance>low</ILRepackImportance>
<ILRepackCommandImportance>low</ILRepackCommandImportance>
<ILRepackCommandExtra></ILRepackCommandExtra>
<ILRepackVersion>2.0.34</ILRepackVersion>
<ILRepack Condition="'$(ILRepack)' == ''">$(NuGetPackageRoot)ilrepack\$(ILRepackVersion)\tools\ILRepack.exe</ILRepack>
</PropertyGroup>
-->

<PropertyGroup>
<ILRepackEnabled Condition="'$(ILRepackEnabled)' == ''">true</ILRepackEnabled>
<ILRepackDeleteEnabled Condition="'$(ILRepackDeleteEnabled)' == ''">true</ILRepackDeleteEnabled>
<ILRepackImportance Condition="'$(ILRepackImportance)' == ''">Low</ILRepackImportance>
</PropertyGroup>

<!--<ItemGroup Condition="$(ILRepackEnabled)">
<PackageReference Include="ILRepack" Version="2.0.34" GeneratePathProperty="true">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>-->

<PropertyGroup>
<ILRepackFilePathExec>ilrepack\2.0.34\tools\ILRepack.exe</ILRepackFilePathExec>
<ILRepack Condition="'$(ILRepack)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..\$(ILRepackFilePathExec)'))</ILRepack>
</PropertyGroup>

<Target Name="ILRepackTarget" AfterTargets="CopyFilesToOutputDirectory" Condition="$(ILRepackEnabled)">

<PropertyGroup>
Expand Down Expand Up @@ -77,8 +62,7 @@
<ILRepackFullCommand> &quot;$(ILRepack)&quot; $(ILRepackCommandExtra) $(ILRepackCommandLibFolder) $(ILRepackCommandOutput) $(ILRepackCommandInputAssemblies) </ILRepackFullCommand>
</PropertyGroup>

<Message Text="ILRepack Exec: '$(ILRepackFullCommand)'" Importance="$(ILRepackImportance)" />
<Error Condition="'$(ILRepack)' == ''" Text="Unable to locate 'ILRepack.exe'" />
<!--<Message Text="ILRepack Exec: '$(ILRepackFullCommand)'" Importance="$(ILRepackImportance)" />-->
<Error Condition="!Exists('$(ILRepack)')" Text="Unable to locate '$(ILRepack)'" />

<Exec Command="$(ILRepackFullCommand)"
Expand Down

0 comments on commit d0195ca

Please sign in to comment.