Compiler cant handle auto properties and events


When I use property in class like this:
public int Prop { get; set; }
Or events :
public event Action ActionEvent;
delegate void Action(bool value);

Debugger crasch:
Loading Deployment Assemblies.
Attaching deployed file.
Assembly: SecretLabs.NETMF.Hardware (
Attaching deployed file.
Assembly: HomeAutomation (
Resolve: unknown type: System.Diagnostics.DebuggerBrowsableState
Error: ff000000
Waiting for debug commands…
The program ‘[1] Micro Framework application: Managed’ has exited with code 0 (0x0).

For properties with backing fields it works:
private int prop;
public int Prop
get { return prop; }
set { prop = value; }

Netduino3 ethernet

Add this to your project.

namespace System.Diagnostics
    public enum DebuggerBrowsableState

This is something that was raised as a problem back in the Netduino Forums.
See the following:

So anyway, I came across an October 2017 Blog Post by the Visual Studio Engineering Team which happens to mention DebuggerBrowsableState and talks about some ways in which it can be utilized. The blog post relates to Visual Studio 2017…

7 Hidden Gems in Visual Studio 2017

See gems 2 & 3.

I’m using auto properties in the code I’m writing and I do not see this issue. I’m also using the N3W and NETMF 4.3.

Is the System namespace referenced in your code?


O , incidentally i realized that i was programming in vb (vreating microproj in vb project seems not to have reference to netduinoplus).

Come back to C# project it works good .(with the simpler sample, “blinky”).

Thanks a lot.

Yes, but in the code is marked as an arror by the designtime(writing time) debugger

I hate to drag up an old topic, but I’ve just run into this when working on my new project. I really don’t remember running into this before. Fortunately, the response from IdleGoose works. Anyone have any idea why this is happening?

I think two different compilers are being used. The code time compilation is happening in the background with Roslyn, for autocomplete, syntax error highlighting, etc. but the actual compilation is forced to use the older build system, because Roslyn breaks all the things.