DCSIMG
TIP: Have the 'SILVERLIGHT' processor directive appear in intellisense in the ASP.NET host project (VB.NET) - Shimmy on .NET

TIP: Have the 'SILVERLIGHT' processor directive appear in intellisense in the ASP.NET host project (VB.NET)

Nothing special anyway, but I thought let's write it down briefly. 

In Silverlight solutions, especially when RIA Services is enabled, it's pretty common to use the SILVERLIGHT processor directive in the shared code and other.

So the SILVERLIGHT directive is known in the Silverlight project, but in the ASP.NET there it doesn't appear in the intellisense, and since this is always valid, it's kinda error-prone when there is no intellisense support.

To enable the intellisense simply open the ASP.NET project settings/properties->Compile->Advanced Compile Options and at "Custom Constants" add Silverlight=0.

 NOTE: I only tested this in VB.NET projects, I barely use C#.

Published Thursday, March 31, 2011 4:26 AM by Shimmy

Comments

No Comments

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above:
Powered by Community Server (Commercial Edition), by Telligent Systems