Red Gate forums :: View topic - Assembly not found? SA deleted it.
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 5
SmartAssembly 5 forum

Assembly not found? SA deleted it.

Search in SmartAssembly 5 forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
Uniwares_AS



Joined: 11 Oct 2007
Posts: 132

PostPosted: Mon Jun 28, 2010 8:36 pm    Post subject: Assembly not found? SA deleted it. Reply with quote

Ok, weird problem this one. Never seen that before, but here we go.

During my build process I get the error from SA that it could not find my assembly (which is built using VS2010, SA is invoked as a build task on AfterCompile).
Looking at the obj/Release folder, there is really no assembly, yet it must have been there because of the copy my build step makes before passing it to SA.

"Something" must have deleted it. Using process monitor it shows clearly that its SA processes the file, does actually a lot with it, and then deletes it. Right after it tries to reopen the file and throws the error.

The SA project file settings are identical as all the other projects i my solution which build just fine.

I do have a procmon dump if wanted.
Back to top
View user's profile Send private message MSN Messenger
Uniwares_AS



Joined: 11 Oct 2007
Posts: 132

PostPosted: Mon Jun 28, 2010 8:40 pm    Post subject: Reply with quote

PS: building without the SA task and protecting after using the GUI works fine.
Back to top
View user's profile Send private message MSN Messenger
Uniwares_AS



Joined: 11 Oct 2007
Posts: 132

PostPosted: Mon Jun 28, 2010 8:59 pm    Post subject: Reply with quote

Solved.

Its a bug in SA. But not in SA 5.0.

The .csproj file was still referencing the build task for SA 4.2 instead of SA 5.0 but the {sa}proj file already contained the updated keyfile password. As it seems, SA 4 does exit without warning before signing the assembly because it cant read the password of the keyfile or something like that.

I tried to repro it here:
* setting the old Password value in the {sa}proj file and building it with the MSBuild task for SA 4.2, works.
* new Password value (as used in SA 5) and building with the task for SA 4.2, deletes the file.
* new password value and build task for SA 5, works too.
Back to top
View user's profile Send private message MSN Messenger
Paul.Martin



Joined: 03 Feb 2010
Posts: 83
Location: Cambridgeshire

PostPosted: Tue Jun 29, 2010 12:56 pm    Post subject: Reply with quote

That is a interesting bug, glad you managed to get to the bottom of it.


I presume you are setting output to self.
SmartAssembly will delete the output file if it exists and then write out the new file. The signing is part of the write out step (rather than being a post build step) and as you've found if it can't open the strong name key because of a password decryption failure it will stop, leaving no file.

The failure should return a error code, I'll have a look into it and raise a bug if this is not the case.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group