ilmerge error "Unresolved assembly reference not allowed: xxxxxxx"
Asked Answered
U

2

7

I am trying to merge two assemblies using ilmerge with the method described here:

http://www.hanselman.com/blog/MixingLanguagesInASingleAssemblyInVisualStudioSeamlesslyWithILMergeAndMSBuild.aspx

however, I am getting an error with a project reference I don't want merged...so, of three referenced assemblies, I just want one merged, but the ilmerge doesn't seem to work with the project references.

I know there is a /lib: option, but how can I automate that in the Ilmerge.CSharp.targets so it works with any project?

Unsuitable answered 12/11, 2011 at 0:6 Comment(0)
T
1

What error message do you get?

After applying Scott Hanselman's changes to Ilmerge.CSharp.targets, manually set <IlMerge>True</IlMerge> in your csproj file only on those project references you want merged.

Threephase answered 17/12, 2011 at 12:10 Comment(2)
I think the resolution was that I had to use an earlier version of ilmerge. 2.9.1118Unsuitable
This only helps if you have checks for the ILMerge tag in the .targets fileCassandry
C
1

I've had this problem for dll's I wasn't merging with ILMerge (I was merging others). It was solved by copying them to the directory <project>\obj\<configuration>\, because that's where ILMerge was looking for them and caused the error Unresolved assembly reference not allowed.

Cassandry answered 3/4, 2017 at 6:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.