Share via


Use an unsigned assembly in a signed project. Impossible?

Question

Monday, June 20, 2011 3:25 AM

Hi,

I use in my project a class library which has a reference to Microsoft.Interop.office.interop.word. I need to create/modify word files in my web application based on asp.net.

First time I used Microsoft.Interop.office.interop.word, I tested it with a windows application, my code worked.
Second time, I implemented it in my project...but I hada problem.
My class library is signed with a .snk file.

Microsoft.Interop.office.interop.word is not a signed assembly, so when I compile my class library, it doesn't work correctly...
I didn't find anything about this topic on internet, so maybe someone have an idea for me...^^

thanks

All replies (4)

Thursday, June 23, 2011 11:19 PM âś…Answered

Hi,

I think the problem is not due to you use the unsigned assembly in a signed assembly but you may not build a signed assembly correctly.

This tutorial about how to create a signed friend assembly you may have a check:

http://msdn.microsoft.com/en-us/library/bb385180.aspx

And this tutorial about how to sign an assembly with strong name you may see:

http://msdn.microsoft.com/en-us/library/xc31ft41.aspx


Monday, June 20, 2011 3:47 AM

Pls refer below links

http://msdn.microsoft.com/en-us/library/ms228237.aspx for compiler error (CS 1726)

http://msdn.microsoft.com/en-us/library/bb384966.aspx for creating friend assembly

 

You can also refer to this link for an alternate solution

http://www.jaylee.org/post/2008/09/02/NET-2-0-InternalsVisibleTo-Attribute-and-Unsigned-Assemblies.aspx


Monday, June 20, 2011 3:55 AM

 

Pls refer this link as well

http://support.microsoft.com/kb/313666


Monday, June 20, 2011 6:16 AM

I tried that, but it doesn't work..

I'm going to test your first answer...

At this time, my code is :

Class library A which is signed

Class library B which is not signed

Class library B referenced to Microsoft.interop.office.interop.word.

so I think your first link will work...?