How can I embed .manifest into a .net class libaray

G

Guest

Hi there,

I am making a class libaray which is to use interop to work with a unmanaged
COM object. What happens is that I also need to use .manifest file to control
the version of COM object to load becuase there are multiple versions of COM
objects.

example: myapp.exe.manifest
<?xml version="1.0" ......
<dependency>
<dependentAssembly>
<assemblyIdentity name="..." version="1.3" ... <<== Here specify
the version of COM object to use

The problem is that I am making a class libaray not a .exe, therefore, I
need to figure out a way to embed this <dependecy..> into the class library's
assembly so that my class libaray will always load the right version of COM
object.

I have searched the net and tried many approaches and couldn't get it
working. Can someone who has the expereince share his input on this?

Many thanks and I really appreaciate your help.
 
G

Guest

Thanks for the reply.

I checked it but it seems that this attribute is just to let you specify the
assmebly name only but not the version. My case is that I have the same
assembly name with 2 different versions and I would like to control which
version to use.

Jamie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top