Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to resolve assembly Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' #34

Open
FrankSzendzielarz opened this issue Aug 13, 2022 · 3 comments

Comments

@FrankSzendzielarz
Copy link

ILRepack task always fails with the above error.
This is even if the target is in an external file, or in the csproj. Even if the assembly list to merge is just a single assembly, the above error occurs.

Cannot get this to work.

@JustArion
Copy link

I've been getting the same issue.

@JustArion
Copy link

A workaround that fixed the issue for me was from the duplicate #26, from this comment .

@chocataw
Copy link

The workaround I came across for this same issue is below:
I had this issue and I believe the fix was adding an inputassemblies reference in ILRepack.targets. Please note the expandable ReferencePathWithRefAssemblies inclusion. Just add the file name and exclude the .dll (file type).
This fix was taken from https://www.meziantou.net/merging-assemblies-using-ilrepack.htm

  <ItemGroup>
      <InputAssemblies Include="$(TargetPath)"/>
      <InputAssemblies Include="@(ReferencePathWithRefAssemblies)" Condition="'%(filename)' == 'Newtonsoft.Json'" />
      <InputAssemblies Include="@(ReferencePathWithRefAssemblies)" Condition="'%(filename)' == 'Microsoft.Xrm.Sdk.Workflow'" />
      <InputAssemblies Include="@(ReferencePathWithRefAssemblies)" Condition="'%(filename)' == 'Microsoft.Xrm.Sdk'" />
      <InputAssemblies Include="@(ReferencePathWithRefAssemblies)" Condition="'%(filename)' == 'Microsoft.Crm.Sdk.Proxy'" />
      <InputAssemblies Include="$(OutputPath)\MyAssembly.dll" />
    </ItemGroup>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants