title: Getting "Generate serialization assembly" to work
body: <p>I am in charge of a desktop WPF application, using a few web services (via <code>Service References</code> of the project).</p>
  
  <p>Due to a <code>Cannot execute a program. The command being executed was \"C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\csc.exe\" /noconfig /fullpaths @"C:\Documents and Settings\admin\Ustawienia lokalne\Temp\btucqeci.cmdline"</code> error on a client's machine  (which I understand is caused by <code>csc</code> trying to compile objects for the webservice request on the fly, and failing due to insufficient permissions), I hoped I could use a solution that I came across somewhere and enable the <code>Generate serialization assembly</code> option in the <code>Build / Properties</code> tab of my project.</p>
  
  <p>It won't build, though - I keep on getting a compile error <code>Could not find file 'E:\xxxx\xxxx\obj\Debug\xxxx.XmlSerializers.dll</code>. Well I know it's not there, creating this DLL is precisely what I'm trying to achieve.</p>
  
  <p>All the code for communicating with web-services is auto-generated and I haven't modified it at all.</p>
  
  <p>I tried using <code>sgen</code> to achieve the same result "manually", but with no luck: I'm getting <code>Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.</code></p>
  
  <p>Could you point me in right direction? If additional information is needed, I will supply it. It's the first time I ran into this type of issue, so I'm a bit in the dark.</p>
  
  <p>By the way, I have a (remote) access to the client's computer, but I failed to resolve the problem by resetting permissions. They run the program on an admin account and permissions do not seem to restricted in any way (based on what I googled up, including <a href="https://stackoverflow.com/questions/3310745/creating-xmlserializer-in-net-throws-exception">this question</a>, I suspected the infamous IIS lockdown effect).</p>