The type 'Debug' exists in both 'System' and 'mscorlib'

Whenever I try to use Debug I get the following error.
I can’t figure out how my project has ended up with two implementations of Debug, and I’m not sure how to solve this. Any suggestions?

Can you start a new project and show us the steps?

I am guessing there is a mix up with with different versions of what OS you are suing.

You’ve just helped me realise what’s likely happened. This only started being an issue for my project partway through.

There’s a chance that I’ve managed to add one of my new class files through an option other than a TinyCLR Class. Which seems to have permanently mixed ‘System’ and ‘mscorlib’ in my project.

Is there a better way of fixing this than starting a new project and copying my .cs files across?

You can fight it and find a way or just start a new project and copy your CS files :slight_smile:

Remove all system or system.xx assemblies in your project.