WPF error CS0433

I'm getting this error in my WPF application. I get this error not always. If I make Clean and then Rebuild everything is ok.

SGEN (0,0):                                             
error: Unable to generate a temporary class (result=1).

SGEN (0,0):
errorCS0433: The type 'XamlGeneratedNamespace.GeneratedInternalTypeHelper' exists in both 'library1.dll' and 'library2.dll'

You could use RummageTypeRenamer, a free tool bundled with our obfuscator Rummage (I work for Aldaray), to rename the GeneratedInternalTypeHelper type to something else.

We rename it to something like GeneratedInternalTypeHelper$(ProjectName) so that it is unique across projects and never clashes. We do that in all our build scripts to get ILMerge to work (blog entry in my colleague's private blog).


Here's an article by Scott Hanselman discussing this issue for WPF.

Other people that have had this problem have fixed it by installing some hotfixes. Check out this article for more information.

If you're using Citrix, you might want to check this out. You could have a permissions issue. This particular article deals with an ASP .NET application, but you might have a similar issue in your WPF application. It's a good place to start.


This error comes from the persistent compiled XML serialization assembly generator. It generates classes from XML serializable types. If you don't use this, you can uncheck this in project properties.

链接地址: http://www.djcxy.com/p/48248.html

上一篇: 如何查看WebLogic部署计划的结果

下一篇: WPF错误CS0433