CompilerError CS0101

Feb 24, 2012 at 1:43 PM

Hello,

I try to compile cinch\V2 (VS2010 WPF) using VS 2010 and get this compiler error: "The namespace 'XamlGeneratedNamespace' already contains a definition for 'GeneratedInternalTypeHelper' ". Does anyone know where it may come from and how to fix it?

Regards

 

NBT0511

 

 

Coordinator
Feb 27, 2012 at 8:59 PM

I have no idea on that one. Could it be that you are using ClientProfile, or have your compile target set to AnyCPU or something like that. Try use full .NET framework and that ClientProfile is not selected, and your project is set for x86. Both from project properties.

Feb 28, 2012 at 7:32 AM

Hello Sacha,

ClientProfile is (and was) not selected. CPU was set to AnyCPU, but setting it to x86 had no effect. Here I translated the appering messages from German to English, so they may differ a bit from the original ones:

Error    1    The Namespace "XamlGeneratedNamespace" contains already a definition for "GeneratedInternalTypeHelper".    D:\cinch-66567\cinch\V2 (VS2010 WPF and SL)\CinchV2.WPF\obj\x86\Debug\GeneratedInternalTypeHelper.g.i.cs    19    25    Cinch.WPF

Warning    2    The TKey-Typparameter has the same name as the Typparameter of the outer Type "Cinch.ObservableDictionary<TKey,TValue>".    D:\cinch-66567\cinch\V2 (VS2010 WPF and SL)\CinchV2.WPF\Utilities\ObservableDictionary.cs    617    56    Cinch.WPF

Warning    3    The TKey-Typparameter has the same name as the Typparameter of the outer Type "Cinch.ObservableDictionary<TKey,TValue>".    D:\cinch-66567\cinch\V2 (VS2010 WPF and SL)\CinchV2.WPF\Utilities\ObservableDictionary.cs    656    34    Cinch.WPF

Warning    4    The TKey-Typparameter has the same name as the Typparameter of the outer Type "Cinch.ObservableDictionary<TKey,TValue>".    D:\cinch-66567\cinch\V2 (VS2010 WPF and SL)\CinchV2.WPF\Utilities\ObservableDictionary.cs    656    40    Cinch.WPF

Warning    5    The source file "D:\cinch-66567\cinch\V2 (VS2010 WPF and SL)\CinchV2.WPF\obj\x86\Debug\Threading\Controls\AsyncBusyUserControl.g.cs" was stated several times.    D:\cinch-66567\cinch\V2 (VS2010 WPF and SL)\CinchV2.WPF\CSC    Cinch.WPF

Warning    6    The source file "D:\cinch-66567\cinch\V2 (VS2010 WPF and SL)\CinchV2.WPF\obj\x86\Debug\Threading\Controls\AsyncFailedUserControl.g.cs" was stated several times.    D:\cinch-66567\cinch\V2 (VS2010 WPF and SL)\CinchV2.WPF\CSC    Cinch.WPF

Warning    7    The source file "D:\cinch-66567\cinch\V2 (VS2010 WPF and SL)\CinchV2.WPF\obj\x86\Debug\Threading\Controls\CircularProgressBar.g.cs" was stated several times.    D:\cinch-66567\cinch\V2 (VS2010 WPF and SL)\CinchV2.WPF\CSC    Cinch.WPF

Warning    8    The source file "D:\cinch-66567\cinch\V2 (VS2010 WPF and SL)\CinchV2.WPF\obj\x86\Debug\GeneratedInternalTypeHelper.g.cs" was stated several times.    D:\cinch-66567\cinch\V2 (VS2010 WPF and SL)\CinchV2.WPF\CSC    Cinch.WPF

May be you can discover something.

 

 

 

 

Coordinator
Feb 29, 2012 at 6:58 AM

Man, sorry to say I simply  have no idea. I think if the 1st one gets fixed them may all just go away. But I honestly have no idea.

Mar 12, 2012 at 2:09 AM

I've only seen a couple of reports of such errors.  At first I thought you were trying to build the solution (never could get that to work) instead of just the WPF project maybe, but the errors are quite different when I try to build the whole solution.

A couple of things to try:

Clean the solution, then build the WPF (or SL) project.  I think you need the Blend SDK (and I think it's a different one for WPF and for SL) installed by the way.  Most likely won't do anything, but it takes a minute to try it.

If that doesn't work, delete the entire directory structure where you unzipped Cinch, then unzip it again, then load the solution and try to build the WPF (or SL) project - just make sure you have all the pre-requisites.

The only other solution I saw involved having to edit the IL to change the namespace.  That sounds "way out there."

Coordinator
Mar 12, 2012 at 10:07 PM

Agreed,

 

Get all the prequisites (they should be available with the source code), read the release notes, and README.txt (that explains why Cinch Dll errors should be ignored. I am essentially using linked files.

 

Build Cinch.SL and Cinch.WPF, all should be ok.

 

IL weaving should not need to be done at all