Deployment error, unknown type: System.Diagnostics.DebuggerBrowsableState
therealjohn opened this issue · 8 comments
Overview
Unable to deploy app to N3 Wifi.
Steps to Reproduce
Deploy the DemoWeb project from this repository.
Actual Results
Found debugger!
Create TS.
Loading start at 8065cac, end 808cd2c
Assembly: mscorlib (4.3.1.0)
Assembly: Microsoft.SPOT.Native (4.3.1.0)
Assembly: Microsoft.SPOT.Hardware (4.3.1.0)
Assembly: Microsoft.SPOT.Net (4.3.1.0)
Assembly: Microsoft.SPOT.Net.Security (4.3.1.0)
Assembly: System (4.3.1.0)
Assembly: System.Net.Security (4.3.1.0)
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.3.1.0)
Assembly: Microsoft.SPOT.IO (4.3.1.0)
Assembly: System.IO (4.3.1.0)
Assembly: Microsoft.SPOT.Hardware.PWM (4.3.1.0)
Assembly: Microsoft.SPOT.Hardware.Usb (4.3.1.0)
Assembly: Netduino.IP (1.0.0.0)
Assembly: Netduino.IP.Interop (1.0.0.0)
Assembly: Netduino.IP.LinkLayers.CC3100 (1.0.0.0)
Assembly: SecretLabs.NETMF.Diagnostics (4.3.1.0)
Assembly: GoBus (1.5.0.0)
Assembly: SecretLabs.NETMF.Hardware.Netduino (4.3.1.0)
Assembly: Microsoft.SPOT.Hardware.OneWire (4.3.1.0)
Loading Deployment Assemblies.
Attaching deployed file.
Assembly: Rinsen.WebServer (1.0.0.0)
Attaching deployed file.
Assembly: Rinsen.WebServer.FileAndDirectoryServer (1.0.0.0)
Attaching deployed file.
Assembly: System.Text.RegularExpressions (4.3.1.0)
Attaching deployed file.
Assembly: SecretLabs.NETMF.Hardware (4.3.1.0)
Attaching deployed file.
Assembly: DemoWeb (1.0.0.0)
Resolving.
Resolve: unknown type: System.Diagnostics.DebuggerBrowsableState
Error: ff000000
Waiting for debug commands...
The program '[2] Micro Framework application: Managed' has exited with code 0 (0x0).
Expected Results
Deploys.
Additional Info
Tried adding the enum manually, which seems to be the hack being used in the samples too. Unfortunately, it does not work 100% of the time.
This happens when deploying on Windows from VS 2015. On Mac, I receive a similar error but for a different type.
To workaround the problem, I've had to add this hack to each library project in the solution the main program is using too.
namespace System.Diagnostics
{
public enum DebuggerBrowsableState
{
Never = 0,
Collapsed = 2,
RootHidden = 3
}
}
Also encountered on the Netduino 2 4.3.2.
Seems I can blink the LED but as soon as I add another c# file like Fabien's netduino helpers I get this issue and nothing happens.
@cooltions - you a jaffa? :D
@cooltions - you a jaffa? :D
Wellingtonian my dude ;)
I am - but escaped to Europe and now back in sunny Northland where the NETMF magic happens :)
@therealjohn @KiwiBryn Thank you this saved me from pulling my hair out.
After 2 years of a project running it came time to do some upgrades, development machine I used to used was gone so had to set everything up again on Windows 10 and VS2019. Well lets say the USB drivers issues caused me to nearly throw out the Netduino and use another platform. Eventually got everything talking then hit this issue. If it wasn't for your quick fix I would have ditched the project as it was taking up too much of my time just to deploy the existing app.