Failed to create a temporary class

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 get this error message when I try to start my application using IIS in Windows 7.

+4
source share
3 answers

Is your application configured to work under a specific user account?

If so, check that the user account associated with the application has the contents of the list of folders and read permissions in the% windir% \ Temp folder.

+8
source

I know this is an old question, but it is still valid (and the problem is still happening), and here is more information if anyone else comes across this: http://blog.coderunnr.com/2012/06/net -xmlserializer-unable-to-generate-a-temporary-class / .

The message includes several solutions (adding an attribute to the schema) with examples. The problem is actually a bug in the .NET XmlSerializer: http://connect.microsoft.com/VisualStudio/feedback/details/349967/xsd-exe-generates-code-with-the-wrong-type-in-an -xmlarrayitemattribute

+1
source

Perhaps if you make the user a local administrator

  • Open Computer Management and right-click "Computer" and select "Management".
  • Expand: Groups
  • Double-click: Admin Group
  • Add user to group

Hope this works.

0
source

Source: https://habr.com/ru/post/1340128/


All Articles