TinyCLR Intellisense doesn't find 'Debug' and other Keywords in Project 'CarWashExample'

I cloned the TinyCLR-Samples Repo, opened the App CarWashExample and actualized the Nuget References to preview4.

The Intellisense in the project now shows a strange behavior (see picture).
For example it shows error squiggles for the keyword ‘Debug’ although Using System.Diagnostics; is present,
It shows error squiggles for a local int variable with the prompt better to use Var.

Despite the error squiggles the code compiles.

When I set up a new project the error squiggles do not appear.

I think Intellisense should work correct even if an old project is opened.

VS sometimes confuses its mscorelib with our maybe library. We are still looking into this issue but for now all you have to do is go under assemblies and delete TinyCLR native. Do not remove the NuGet, just delete that assembly. When you rebuild, VS will pull in the correct mscorelib.

Please try and let us know if that worked for you

Thanks, it helps partially. The keyword ‘Debug’ now is found but when I create a new local variable like: int cnt = 1; it still shows the hint that var should be used as type. This is not the case in a project created from scratch.

That is correct because we have rules made for the samples repo so you can’t write ugly code :slight_smile: You did not follow the rules.

Oh, I’m proud to hear that it was me, who wrote this nice ‘CarWashExample’ App. :wink: :stuck_out_tongue_winking_eye:

2 Likes