Strong-Naming EntLib 3.0 Assemblies

Topics: Building and extending application blocks, General discussion
Jul 16, 2007 at 10:07 PM
Okie - I've searched this topic pretty thoroughly on the net and I'm not getting very far. Yet my problem is real simple: I want to strong-name the Enterprise Library, because Visual Studio 2005 keeps complaining that one or more assemblies I'm using in a strongly-named project uses references that aren't. And so....what's the best, quickest way to get the Enterprise Library .DLLs I'm referencing to use the strong name key I've defined for the application?

I've attempted to find information on how to get MSBuild.exe to accept a parameter to build against a specific key file. And I'm specifically trying to avoid going into every EntLib project and change the <AssemblyOriginatorKeyFile> attribute manually.

Any and all assistance appreciated!

Sincerely,
RH
Jul 16, 2007 at 10:44 PM
Hi RH,

Are you unable to use the assemblies signed by Microsoft? Anyway, what is the cost you're trying to avoid? Configuring the signing settings through the project properties should be a one time change; what's the reason for avoiding it?

Signing settings are really properties as far as MSBuild concerns. You could use the /property switch to provide the values, but that wouldn't work with the IDE.

Regards,
Fernando
Jul 16, 2007 at 10:59 PM

fsimonazzi wrote:
Hi RH,

Are you unable to use the assemblies signed by Microsoft? Anyway, what is the cost you're trying to avoid? Configuring the signing settings through the project properties should be a one time change; what's the reason for avoiding it?

Signing settings are really properties as far as MSBuild concerns. You could use the /property switch to provide the values, but that wouldn't work with the IDE.

Regards,
Fernando


Are you saying the April 2007 Enterprise Library is already signed??? And as for "avoiding cost" - it's nothing to do with that. I'm just trying to solve an exception that appears no matter what I do to the code:

error CS1577: Assembly generation failed -- Referenced assembly 'Microsoft.Practices.EnterpriseLibrary.Common' does not have a strong name

It makes no difference where I move my code - all the projects in the solution have strong-name keys. And this error follows the code whereever it goes! If the EntLib is already signed - there's sure no evidence of it. And if there are two versions floating around....I'm totally lost as to what I've got donwloaded and installed already I guess - I'd thought there was just a single version of the EntLib and that it wasn't strongly-typed.

I could well be wrong on all counts. Perhaps you could clear up my confusion?

RH
Jul 17, 2007 at 3:00 AM
Hi,


ross613 wrote:

Are you saying the April 2007 Enterprise Library is already signed??? And as for "avoiding cost" - it's nothing to do with that. I'm just trying to solve an exception that appears no matter what I do to the code:

error CS1577: Assembly generation failed -- Referenced assembly 'Microsoft.Practices.EnterpriseLibrary.Common' does not have a strong name

It makes no difference where I move my code - all the projects in the solution have strong-name keys. And this error follows the code whereever it goes! If the EntLib is already signed - there's sure no evidence of it. And if there are two versions floating around....I'm totally lost as to what I've got donwloaded and installed already I guess - I'd thought there was just a single version of the EntLib and that it wasn't strongly-typed.

I could well be wrong on all counts. Perhaps you could clear up my confusion?

RH



Yes, the Enterprise Library ships both the source code and binaries signed by Microsoft; please see the topic title "About the Enterprise Library 3.1 – May 2007 Release" in the integrated help. You will find the binaries in the "bin" folder, usually c:\Program Files\Microsoft Enterprise Library 3.1 - May 2007\Bin.

If you need to sign the enterprise library assemblies with your own key (e.g. if you did changes in the source) then you can use the strong naming guidance package. This guidance package has GAX as a pre-req http://msdn2.microsoft.com/en-us/teamsystem/aa718948.aspx.

Btw, there is a 3.1 version so you might want to use it instead of 3.0.

Fernando