I've refactored my solution, and after renaming my projects and compiling I've got following strange errors for a WPF Window.
Compile error in the xaml of the window: Error CS0234 The type or namespace name 'Diagnostics' does not exist in the namespace 'CustomAssembly.System' (are you missing an assembly reference?)
//There is no Diagnostics in this namespace.
Compile error for the g.cs of the window:
Error CS0234 The type or namespace name 'Windows' does not exist in the namespace 'CustomAssembly.System' (are you missing an assembly reference?)
//There is no Windows in this namespace.
Error CS0234 The type or namespace name 'Type' does not exist in the namespace 'CustomAssembly.System' (are you missing an assembly reference?)
//There is no Type in this namespace.
Error CS0246 The type or namespace name 'CompanyName' could not be found (are you missing a using directive or an assembly reference?)
//There is no CompanyName namespace.
Error CS0234 The type or namespace name 'Delegate' does not exist in the namespace 'CUstomAssembly.System' (are you missing an assembly reference?)
//There is no Type in this namespace.
Error CS0234 The type or namespace name 'ComponentModel' does not exist in the namespace 'CUstomAssembly.System' (are you missing an assembly reference?)
//There is no ComponentModel in this namespace.
Error CS0234 The type or namespace name 'CodeDom' does not exist in the namespace 'CustomAssembly.System' (are you missing an assembly reference?)
//There is no CodeDom in this namespace.
Error CS0538 'Windows.Markup.IComponentConnector' in explicit interface declaration is not an interface CustomAssembly.CustomProject
The strange thing is, in the g.cs file are references which doesn't exist anymore and which aren't referenced.
I've already serached through all project files if there are still some Reference issues. Also deleted bin and obj folder for whole solution. -> Rebuild -> Same problem.
It looks like Visual Studio mix up the System from Microsoft and the CustomAssembly.System.
Does anyone have experience with this issue?
Regards