Red Gate forums :: View topic - Unexpected character $ in generated C# file
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
.NET Reflector 7 EAP
.NET Reflector 7 EAP forum

Unexpected character $ in generated C# file

Search in .NET Reflector 7 EAP forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
evgeny



Joined: 20 Feb 2011
Posts: 5

PostPosted: Mon Feb 21, 2011 12:14 am    Post subject: Unexpected character $ in generated C# file Reply with quote

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


Code:
                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:

Quote:
WaIISHost\Parameters.cs(31,26): error CS1056: Unexpected character '$'


This did not happen in beta 3.
Back to top
View user's profile Send private message
evgeny



Joined: 20 Feb 2011
Posts: 5

PostPosted: Mon Feb 21, 2011 12:17 am    Post subject: Reply with quote

There is other invalid code as well:

Code:

ConsoleTraceListener <>g__initLocal0 = new ConsoleTraceListener(false) {


This also didn't happen in beta 3.
Back to top
View user's profile Send private message
alehandro



Joined: 16 Nov 2010
Posts: 35

PostPosted: Mon Feb 21, 2011 11:42 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group