Hello,

I have installed DO 4.3.0 RC4. My DO model assembly is signed by "xyz.pfx" strong name key file (like other assemblies in solution). When I try to build this model assembly I gets error :

"Error 2 "sn.exe" exited with code 1. Altea4.Data.Models"

Assembly is x86. Any idea how I can solve this problem?

Other signed assemblies with the same key file in solution I can build without problems.


Updated at 02.07.2010 7:20:53

All assemblies in solution are bilt for x86.

Step-by-step to reproduce a problem:

  1. Create new DO4 model assembly + create model entities
  2. Sign assembly with "pfx" key name file.
  3. First build throws error that "snk" file generation is needed
  4. OK, generate snk file with sn.exe to same location as pfx file
  5. Second build throws error, which I described in previous post.

This thread was imported from our support forum. The original discussion may contain more detailed answer. Original topic by bakotomas.

asked Jul 01 '10 at 20:41

Editor's gravatar image

Editor
46154156157

So the only difference is that assembly is built for x86?

If so, likely, we must report about this to PostSharp team.

(Jul 01 '10 at 20:41) Alex Yakunin Alex%20Yakunin's gravatar image

One Answer:

psulek wrote:

All assemblies in solution are bilt for x86. Step-by-step to reproduce a problem: 1. Create new DO4 model assembly + create model entities 2. Sign assembly with "pfx" key name file. 3. First build throws error that "snk" file generation is needed 4. OK, generate snk file with sn.exe to same location as pfx file 5. Second build throws error, which I described in previous post. It seems that if i use Any CPU than everything builds just fine. Seems to be some bug only in x86 build from postsharp?!


sharpcrafters wrote:

This may be due to PostSharp. Support for PFX is quite bad. The recommended approach is to delay-sign your assembly with an SNK, and sign it with a PFX only at the end of the build (or, even better, when you build the setup program -- in large companies, developers dont even have the PFX).

You can export the public key of a PFX into an SNK by using 'sn -p MyKey.pfx MyKey.snk'.

-gael


psulek wrote:

This may be due to PostSharp. Support for PFX is quite bad. The recommended approach is to delay-sign your assembly with an SNK, and sign it with a PFX only at the end of the build (or, even better, when you build the setup program -- in large companies, developers dont even have the PFX). You can export the public key of a PFX into an SNK by using 'sn -p MyKey.pfx MyKey.snk'. -gael Thanks for tip, this should work for me too :-)

answered Jul 02 '10 at 10:19

Editor's gravatar image

Editor
46154156157

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×573

Asked: Jul 01 '10 at 20:41

Seen: 4,999 times

Last updated: Jul 01 '10 at 20:41

powered by OSQA