Skip to content

Commit

Permalink
Add ILRepackIgnoreReferences to ignore references to be repack
Browse files Browse the repository at this point in the history
  • Loading branch information
ricaun committed Sep 20, 2024
1 parent 76e8ba9 commit ccb6328
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [1.0.0] / 2024-09-03
- First Release
- Add `ILRepackIgnoreReferences` to ignore references to be repack.

[vNext]: ../../compare/1.0.0...HEAD
[1.0.0]: ../../compare/1.0.0
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ Property Name | Default Value | Description
</PropertyGroup>
```

## ItemGroup

Item Group | Description
-------------|-------------
`ILRepackIgnoreReferences`| Ignore references to be repack.

```xml
<ItemGroup>
<ILRepackIgnoreReferences Include="Newtonsoft.Json.dll" />
</ItemGroup>
```

## Todo
- [ ] Add option to ignore specific assembly/dependencies in the ILRepack.
- [ ] Delete dependencie debug file from the output.
Expand Down
4 changes: 4 additions & 0 deletions ricaun.ILRepack.Sample/ricaun.ILRepack.Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
<InternalsVisibleTo Include="$(AssemblyName).Tests" />
</ItemGroup>

<ItemGroup>
<ILRepackIgnoreReferences Include="Newtonsoft.Json.dll" />
</ItemGroup>

<PropertyGroup>
<ILRepackImportance>High</ILRepackImportance>
<ILRepackCommandImportance>low</ILRepackCommandImportance>
Expand Down
2 changes: 1 addition & 1 deletion 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.3</Version>
<Version>1.0.0-alpha.4</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
3 changes: 2 additions & 1 deletion ricaun.ILRepack/ricaun.ILRepack.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ILRepackDeleteEnabled Condition="'$(ILRepackDeleteEnabled)' == ''">true</ILRepackDeleteEnabled>
<ILRepackImportance Condition="'$(ILRepackImportance)' == ''">Low</ILRepackImportance>
</PropertyGroup>

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

<PropertyGroup>
Expand All @@ -32,6 +32,7 @@
Include="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')"
Exclude="@(ILRepackIncludedAssemblyReferences)" />
<ILRepackExcludedEmbeddedAssemblies Include="$(ILRepackProgramAssembly)" />
<ILRepackExcludedEmbeddedAssemblies Include="@(ILRepackIgnoreReferences->'$(OutputPath)%(identity)')" />
<ILRepackIncludedEmbeddedAssemblies
Include="@(ILRepackIncludedAssemblyReferences)"
Exclude="@(ILRepackExcludedEmbeddedAssemblies)" />
Expand Down

0 comments on commit ccb6328

Please sign in to comment.