Resolve: unknown type: System.Diagnostics.DebuggerBrowsableState

Hi all - I believe I’ve made some sort of common mistake, but I can’t for the life of me figure out what it is.

A program that I wrote and debugged yesterday is “suddenly” not working anymore (note the quotes, I MUST’ve done something, of course!)

The output from debug is the following:


Found debugger!

Create TS.

 Loading start at 20251ea0, end 202871d4

   Assembly: mscorlib (4.3.1.0)     Assembly: Microsoft.SPOT.Native (4.3.1.0)     Assembly: Microsoft.SPOT.Security.PKCS11 (4.3
.1.0)     Assembly: System.Security (4.3.1.0)     Assembly: Microsoft.SPOT.Hardware (4.3.1.0)  
   Assembly: Microsoft.SPOT.Graphics (4.3.1.0)     Assembly: Microsoft.SPOT.TinyCore (4.3.1.0)  
   Assembly: Microsoft.SPOT.IO (4.3.1.0)     Assembly: System.IO (4.3.1.0)     Assembly: Microsoft.SPOT.Hardware.Usb (4.3.1.0) 
    Assembly: Microsoft.SPOT.Hardware.SerialPort (4.3.1.0)     Assembly: Microsoft.SPOT.Touch (4.3.1.0)  
   Assembly: Microsoft.SPOT.Ink (4.3.1.0)     Assembly: Microsoft.SPOT.Hardware.PWM (4.3.1.0)  
   Assembly: Microsoft.SPOT.Hardware.OneWire (4.3.1.0)     Assembly: System.Xml (4.3.1.0)  
   Assembly: Microsoft.SPOT.Time (4.3.1.0)     Assembly: Microsoft.SPOT.Net (4.3.1.0)  
   Assembly: System (4.3.1.0)     Assembly: Microsoft.SPOT.Net.Security (4.3.1.0)  
   Assembly: System.Net.Security (4.3.1.0)  Loading Deployment Assemblies.

Attaching deployed file.

   Assembly: Gadgeteer (2.43.1.0)  Attaching deployed file.

   Assembly: GTM.GHIElectronics.EthernetENC28 (4.3.7.9)  Attaching deployed file.

   Assembly: GHI.Hardware (4.3.7.9)  Attaching deployed file.

   Assembly: GTM.GHIElectronics.CharacterDisplay (4.3.7.9)  Attaching deployed file.

   Assembly: CareForPlant (1.0.0.0)  Attaching deployed file.

   Assembly: GTM.GHIElectronics.Moisture (4.3.7.9)  Attaching deployed file.

   Assembly: GHIElectronics.Gadgeteer.FEZHydra (4.3.7.9)  Attaching deployed file.

   Assembly: Gadgeteer.SPI (2.43.1.0)  Attaching deployed file.

   Assembly: GTM.GHIElectronics.LightSense (4.3.7.9)  Attaching deployed file.

   Assembly: GHI.Networking (4.3.7.9)  Resolving.

Resolve: unknown type: System.Diagnostics.DebuggerBrowsableState

Error: ff000000

Waiting for debug commands...

The program '[9] Micro Framework application: Managed' has exited with code 0 (0x0).

And the output from Service Deployment is:


Looking for a device on transport 'USB'
Starting device deployment...
Iteration 0
Opening port \\?\usb#vid_1b9f&pid_0102#0000000001#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Attaching debugger engine...
... debugger engine attached!
Querying device assemblies...
Found Assembly mscorlib 4.3.1.0
Found Assembly Microsoft.SPOT.Native 4.3.1.0
Found Assembly Microsoft.SPOT.Security.PKCS11 4.3.1.0
Found Assembly System.Security 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware 4.3.1.0
Found Assembly Microsoft.SPOT.Graphics 4.3.1.0
Found Assembly Microsoft.SPOT.TinyCore 4.3.1.0
Found Assembly Microsoft.SPOT.IO 4.3.1.0
Found Assembly System.IO 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware.Usb 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware.SerialPort 4.3.1.0
Found Assembly Microsoft.SPOT.Touch 4.3.1.0
Found Assembly Microsoft.SPOT.Ink 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware.PWM 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware.OneWire 4.3.1.0
Found Assembly System.Xml 4.3.1.0
Found Assembly Microsoft.SPOT.Time 4.3.1.0
Found Assembly Microsoft.SPOT.Net 4.3.1.0
Found Assembly System 4.3.1.0
Found Assembly Microsoft.SPOT.Net.Security 4.3.1.0
Found Assembly System.Net.Security 4.3.1.0
Found Assembly Gadgeteer 2.43.1.0
Found Assembly GHI.Hardware 4.3.7.9
Found Assembly GTM.GHIElectronics.CharacterDisplay 4.3.7.9
Found Assembly GHI.Networking 4.3.7.9
Found Assembly CareForPlant 1.0.0.0
Found Assembly Gadgeteer.SPI 2.43.1.0
Found Assembly GHIElectronics.Gadgeteer.FEZHydra 4.3.7.9
Found Assembly GTM.GHIElectronics.EthernetENC28 4.3.7.9
Found Assembly GTM.GHIElectronics.Moisture 4.3.7.9
Adding pe file C:\Program Files (x86)\Microsoft .NET Gadgeteer\Core\Assemblies\.NET Micro Framework 4.3\le\gadgeteer.pe to deployment bundle
Adding pe file C:\Program Files (x86)\GHI Electronics\.NET Gadgeteer SDK\Modules\EthernetENC28\NETMF 4.3\le\gtm.ghielectronics.ethernetenc28.pe to deployment bundle
Adding pe file C:\Program Files (x86)\GHI Electronics\NETMF v4.3 SDK\Libraries\le\ghi.hardware.pe to deployment bundle
Adding pe file C:\Program Files (x86)\GHI Electronics\.NET Gadgeteer SDK\Modules\CharacterDisplay\NETMF 4.3\le\gtm.ghielectronics.characterdisplay.pe to deployment bundle
Adding pe file D:\Dev\Private\IoT\Gadgeteer\Hydra\WaterMyPlant\WaterMyPlant\CareForPlant\bin\Debug\le\CareForPlant.pe to deployment bundle
Adding pe file C:\Program Files (x86)\GHI Electronics\.NET Gadgeteer SDK\Modules\Moisture\NETMF 4.3\le\gtm.ghielectronics.moisture.pe to deployment bundle
Adding pe file C:\Program Files (x86)\GHI Electronics\.NET Gadgeteer SDK\Mainboards\FEZHydra\NETMF 4.3\le\ghielectronics.gadgeteer.fezhydra.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Gadgeteer\Core\Assemblies\.NET Micro Framework 4.3\le\gadgeteer.spi.pe to deployment bundle
Adding pe file C:\Program Files (x86)\GHI Electronics\.NET Gadgeteer SDK\Modules\LightSense\NETMF 4.3\le\gtm.ghielectronics.lightsense.pe to deployment bundle
Adding pe file C:\Program Files (x86)\GHI Electronics\NETMF v4.3 SDK\Libraries\le\ghi.networking.pe to deployment bundle
Attempting deployment...
Incrementally deploying assemblies to device
Deploying assemblies for a total size of 110376 bytes
Assemblies successfully deployed to device.
Restarting interpreter...
Attaching to device...
Waiting for device to initialize...

I am running the 4.3 Version of .Net Micro Framework, and the corresponding Libraries.
Could it be that I am simply missing some framework Library? According to the Object browser, the missing type “System.Diagnostics.DebuggerBrowsableState” can be navigated to, but exerience has taught me that namespaces are not necessarily tied to the dll. Any input largely appreciated!

@ andre.m - Thanks!

The trick was to add the namespace and enum manually. Wonder why it worked yesterday though

The same problem after updating to GHI Electronics NETMF SDK 2015 R1. Adding enum manually doesn’t work.

I’ve just gone through this exercise, and the usual hack did work for me. How did you add the enum? Is it in the right namespace? Can you post the code you are using?

Yes, I’m using exactly the same code and it doesn’t work for me.
Cerb40
.NET MF SDK 4.3.1.0
GHI SDK 4.3.7.10 (2015 R1)
VS2015

BTW, is it OK that I installed netmf-v4.3.2-SDK-QFE2-RTM but dlls version is 4.3.1.0?

And one more bug: I can’t use foreach loop for strings after that SDK update.

Yes, it has additional references. Working version of my project is here: imBMW/Sources/NET-MF at master · toxsedyshev/imBMW · GitHub
(Devices/V2)

I tried to add that enum to both main app and my dll (I don’t use any other dlls except NETMF and GHI) - the same problem.

Regarding string enumeration, I don’t care - changed foreach loop to for loop and improved performance this way :slight_smile: Now I want to fix the bug with enum that prevent my project to run.

Attached references of the solution. Tried to add enum to both projects.

BTW, I removed mscorlib from references and when I add it back to the projects - nothing is happened.

After several tries of removing/adding references and VS restarting, hack with adding enum started working!

But anyway, it should be fixed.

@ digitaldias - have you added an issue to bug tracker?

1 Like

Any news here? I have the same problem.