Notifications
Clear all
BugOverflow
1
Posty
1
Users
0
Reactions
1,159
Widok
0
23/06/2022 1:31 pm
Topic starter
example
1 Answer
0
23/06/2022 1:37 pm
Topic starter
- inside NuGet console, type
Install-Package ILRepack.Lib.MSBuild.Task
- inside directory where is *.csproj create ILRepack.targets file
-
<?xml version="1.0" encoding="utf-8" ?> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Target Name="ILRepacker" AfterTargets="Build" Condition="'$(Configuration)' == 'Release'"> <ItemGroup> <InputAssemblies Include="$(OutputPath)$(TargetName)$(TargetExt)" /> <InputAssemblies Include="$(OutputPath)MyAnotherDll.dll" /> </ItemGroup> <ILRepack Parallel="true" DebugInfo="true" AllowDuplicateResources="false" InputAssemblies="@(InputAssemblies)" TargetKind="SameAsPrimaryAssembly" KeyFile="$(KeyFile)" OutputFile="$(OutputPath)merged\$(TargetName)$(TargetExt)" /> </Target> </Project>
- this configuration also repair's error
The process cannot access the file 'bin\Debug\MyAssembly.pdb' because it is being used by another process.
- switch project to RELEASE, now run or compile
- merged file is inside _PROJECT_\bin\Release\merged