views:

135

answers:

1

I am trying to speed up the start-up of my Click-Once (.net 2.0 in VS2008) app by shipping the pre-generated XML serialization assemblies.

So to test my scenario, I set VS2008 to break when an exception is thrown. Even though, the XML Serialization assemblies are there, there is still an exception, saying that it can't find or load the serialization assembly.

So I threw FileMon at the problem and it turns out that VS2008 looks for the serialization assemblies everywhere but where the assemblies actually are (e.g. bin folder).

Can someone clear up on why VS2008 is looking for the serialization assemblies in all the wrong places and whether I am barking up the wrong tree distributing them in the first place.

+1  A: 

Hmmm... My sgen'ed XML serialization assemblies are in the same folder with their original dll.

E.g. for MyAssembly.dll I have MyAssembly.XmlSerializers.dll right next to it.

Also, make sure that both assemblies declare the same Assembly Version in their properties.

Yacoder
Weird. When I run the app as standalone, it looks in the application directory. When I run it in VS2008, it does not. Could be my VS2008 setup.
AngryHacker
Follow-up question: how do I force sgen to keep the version of the source assembly. I opened a new question for this: http://stackoverflow.com/questions/2179621/how-to-make-sgen-exe-keep-the-version-of-the-assembly
AngryHacker