Unable to generate a temporary class (result=1). error CS2001: Source
file 'C:\Windows\TEMP\h3ugizgc.0.cs' could not be found error CS2008:
No inputs specified
error line
MemoryStream stream = new MemoryStream(System.Text.Encoding.Default.GetBytes(xmlSettings));
Line 52: XmlSerializer serializer = new XmlSerializer(typeof(Items));
Line 53: items = (Items)serializer.Deserialize(stream);
I am getting this error message when I try to rum my application using IIS on Windows 7.
Is your application configured to run under a specific user account?
If so, check the user account associated to the application has List Folder Contents and Read permissions on the %windir%\Temp folder.
I know this is an old question but it's still valid (and the issue still happens), and here's more information in case anyone else runs into this: http://blog.coderunnr.com/2012/06/net-xmlserializer-unable-to-generate-a-temporary-class/.
The post includes a couple of solutions (adding an attribute to the schema) with examples. The problem is actually a bug in .NET's XmlSerializer: http://connect.microsoft.com/VisualStudio/feedback/details/349967/xsd-exe-generates-code-with-the-wrong-type-in-an-xmlarrayitemattribute
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With