sgen.exe fails during build

后端 未结 5 562
时光取名叫无心
时光取名叫无心 2021-01-17 10:22

After changing the output directory of a visual studio project it started to fail to build with an error very much like:

C:\\Program Files\\Microsoft Visu         


        
5条回答
  •  自闭症患者
    2021-01-17 11:05

    If you are having this problem while building your VS.NET project in Release mode here is the solution:

    Go to the project properties and click on the Build tab and set the value of the "Generate Serialization Assembly" dropdown to "Off".

    Sgen.exe is "The XML Serializer Generator creates an XML serialization assembly for types in a specified assembly in order to improve the startup performance of a XmlSerializer when it serializes or deserializes objects of the specified types." (MSDN)

提交回复
热议问题