|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How can I embed .manifest into a .net class libarayI 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. did u chk for the atrributes such as DependencyAttribute
reg Subramanian Show quote "jamiec" wrote: > 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. > 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 Show quote "Subramanian" wrote: > did u chk for the atrributes such as DependencyAttribute > > reg > Subramanian > > "jamiec" wrote: > > > 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. > > |
|||||||||||||||||||||||