ILRepack.Lib.MSBuild.Task icon indicating copy to clipboard operation
ILRepack.Lib.MSBuild.Task copied to clipboard

Where do we put the reference to the key

Open TomT15 opened this issue 2 years ago • 3 comments

Im trying to understand the following: image The documentation does not specifically say where i should put this reference so i tried following directions from this documentation but have been unable to get the key to work properly https://learn.microsoft.com/en-us/dotnet/standard/assembly/sign-strong-name

TomT15 avatar Sep 22 '22 20:09 TomT15

If you are using the same config, then the key file should be present in your project directory where your .csproj and ILRepack.Config.props file resides.

ravibpatel avatar Sep 23 '22 16:09 ravibpatel

I did try adding a ILRepack.Config.props to the project file and noticed no different when building and deploying as it still says that there is not a key assigned to it. I will try more Monday

Thomas Tramp

On Fri, Sep 23, 2022, 11:24 AM Ravi Patel @.***> wrote:

If you are using the same config, then the key file should be present in your project directory where your .csproj and ILRepack.Config.props file resides.

— Reply to this email directly, view it on GitHub https://github.com/ravibpatel/ILRepack.Lib.MSBuild.Task/issues/35#issuecomment-1256416334, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALLG2AJKATUDQ6HGB2GLFMLV7XKSFANCNFSM6AAAAAAQTNBF7M . You are receiving this because you authored the thread.Message ID: @.***>

TomT15 avatar Sep 24 '22 03:09 TomT15

I did try adding a ILRepack.Config.props to the project file and noticed no different when building and deploying as it still says that there is not a key assigned to it. I will try more Monday Thomas Tramp

@TomT15 , I was able to get it to work by putting a KeyFile attribute on the <ILRepack> element in the ILRepack.targets file (see my other issue):

    <ILRepack Parallel="true" Internalize="true" InternalizeExclude="@(DoNotInternalizeAssemblies)" InputAssemblies="@(InputAssemblies)" TargetKind="Dll" OutputFile="$(OutputPath)\$(AssemblyName).dll" 
    KeyFile="$(ProjectDir)key.snk" />

The README.md file seems to give incorrect instructions.

mamift avatar Oct 17 '22 01:10 mamift

As mentioned in the doc, "This configuration option only applies if you are using the default targets file provided in NuGet package." So if you are using custom targets file then it won't work.

ravibpatel avatar Jan 09 '24 06:01 ravibpatel