Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment error, unknown type: System.Diagnostics.DebuggerBrowsableState #14

Open
therealjohn opened this issue Jan 9, 2018 · 8 comments

Comments

@therealjohn
Copy link

therealjohn commented Jan 9, 2018

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.

@therealjohn
Copy link
Author

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
    }
}

@bryancostanich
Copy link
Contributor

This is a roslyn bug. :(

We're going to have to take a deeper look at this when we get VS2017 out the door. In the meantime:

Doc issue is here.

We've added it to a troubleshooting doc here. Doc isn't linked yet because it's not finished, but wanted to give you an update.

@cooltions
Copy link

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
Copy link

cooltions commented Nov 17, 2019 via email

@IngenuityMicro
Copy link

@cooltions - you a jaffa? :D

@cooltions
Copy link

@cooltions - you a jaffa? :D
Wellingtonian my dude ;)

@IngenuityMicro
Copy link

I am - but escaped to Europe and now back in sunny Northland where the NETMF magic happens :)

@JoeCraig-BlueShapes
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants