How can we help you today? How can we help you today?

Unexpected character $ in generated C# file

When decompiling WaIISHost.exe from Windows Azure SDK 1.3 Reflector 7 beta 4 generates code like this:

string CS$0$0001;
                this.RoleInstanceID = CS$0$0001 = Environment.GetEnvironmentVariable("RdRoleId");
                if (CS$0$0001 == null)

The C# compiler in VS 2010 errors on this:
WaIISHost\Parameters.cs(31,26): error CS1056: Unexpected character '$'

This did not happen in beta 3.
evgeny
0

Comments

2 comments

  • evgeny
    There is other invalid code as well:
    ConsoleTraceListener <>g__initLocal0 = new ConsoleTraceListener(false) {
    

    This also didn't happen in beta 3.
    evgeny
    0
  • alehandro
    from my experience,
    string CS$0$0001; - that is a valid compiler generated string!
    but when you try to do compile it as a user code -bang, then $ is forbidden, yes

    the only way is to do manual replace of $ into X for example :)
    alehandro
    0

Add comment

Please sign in to leave a comment.