Netduino home hardware projects downloads community

Jump to content


Photo

Odd compilation and deployment problems in VS2015

visual-studio-2015 compilation deployment errors

  • Please log in to reply
7 replies to this topic

#1 NameOfTheDragon

NameOfTheDragon

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationCanterbury, Kent, UK

Posted 10 September 2015 - 05:21 PM

Hey everyone, has anyone been successful with Visual Studio 2015?

 

I've recently upgraded and I'm having some issues. I've installed the project system for VS2015 and when I compile my code, I've started getting this error:

 

CS1579 foreach statement cannot operate on variables of type 'string' because 'string' does not contain a public definition for 'GetEnumerator'

 

Well, the error message seems to be accurate, but this code used to compile and run correctly under VS2013. Did something change? I have quite a few projects that use this idiom to iterate through the characters in a string. I can change them, no big deal, but I'd rather not have to, really.

 

But the real showstopper is a problem I'm having during deployment (after I fix CS1579):

 

resolving

Resolve: unknown type: System.Diagnostics.DebuggerBrowsableState

Error: ff000000

 

Any clues, anyone?

 



#2 Juzzer

Juzzer

    Advanced Member

  • Members
  • PipPipPip
  • 135 posts
  • LocationHertfordshire, UK

Posted 11 September 2015 - 03:19 AM

https://www.ghielect...d=19617&page=1?



#3 NameOfTheDragon

NameOfTheDragon

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationCanterbury, Kent, UK

Posted 11 September 2015 - 03:28 AM

Thanks for responding, but the link doesn't seem to work: "No such page exists"



#4 NameOfTheDragon

NameOfTheDragon

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationCanterbury, Kent, UK

Posted 11 September 2015 - 03:46 AM

Oh wait, I found it... I'm supposed to add the following to my code:

namespace System.Diagnostics
{
    public enum DebuggerBrowsableState
    {
        Never,
        Collapsed,
        RootHidden
    }
}

Thanks!



#5 Tom

Tom

    New Member

  • Members
  • Pip
  • 7 posts

Posted 11 September 2015 - 07:11 AM

Yep, have also ran into that annoying problem. Adding that enum in manually seems to be the only fix available. 

 

I'm assuming it's a new(-ish) compiler added attribute that's not in the base netmf core lib.



#6 NameOfTheDragon

NameOfTheDragon

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationCanterbury, Kent, UK

Posted 11 September 2015 - 02:45 PM

Well, it's not a total fix. I added it to a library project and the library project then worked. However the next project I tried, which consumes that library and so should have visibility of the attribute, which is public, suffered from the same problem.

 

Now, even if I add the enum directly into my application, I still get the 'resolving' error on deployment. It is broke, broke, broke. Showstopper! I've had to switch back to VS2013, which luckily I hadn't uninstalled, and everything is fine again.

 

I think SecretLabs should raise this directly with the NetMF team at Microsoft... you have a lot more clout than we as individual developers.



#7 Juzzer

Juzzer

    Advanced Member

  • Members
  • PipPipPip
  • 135 posts
  • LocationHertfordshire, UK

Posted 11 September 2015 - 10:57 PM

It's already been raised with the NETMF team.



#8 HiredMind

HiredMind

    Member

  • Members
  • PipPip
  • 25 posts

Posted 19 June 2016 - 08:39 PM

FYI: Adding that enum code to each assembly (both the main executable, and every library) seems to work.







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.