Compile error on using Debug

How do you get rid of this error?

Severity Code Description Project File Line Suppression State
Error CS0433 The type ‘Debug’ exists in both ‘System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ and ‘mscorlib, Version=2.2.0.5000, Culture=neutral, PublicKeyToken=null’

somehow you mix mscorlib 4.0.0.0 (desktop) and mscorlib 2.x.x.x. (TinyCLR OS), probably you added some desktop libraries that TinyCLR doesn’t support.

You need to uninstall all libraries that TinyCLR doesn’t support, clean build, clear cache…
otherwise, they will add mscorlib 4.0.0.0 again.

Better if you make new project, and only use libraries that TinyCLR supports

So does this mean that functions like Dictionaries and LinkedLists from the System.Collections.Generic cannot be used? This is where the problem comes in.

Right, no Generic for now.

https://docs.ghielectronics.com/software/tinyclr/limitations.html

Thanks. It makes things a little harder but manageable. Overall this is an excellent way to develop quick products. Thanks for the quick response.

1 Like