CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

WinRT compiler directive?

rated by 0 users
Answered (Verified) This post has 1 verified answer | 2 Replies | 2 Followers

Top 50 Contributor
178 Posts
Tim posted on Wed, Jul 4 2012 2:31 PM

I read a previous post where Rocky referred to a WINRT directive.  However, in my first WinRT project that I've created, it doesn't seem to be recognized.

I have two projects, one for the .NET side, the other for the WinRT side...similar to what I've done many times for SL projects.  In my WinRT project, I've defined a region that is encapsulated with #if WINRT. However, the code inside this block becomes greyed out, even though it is on the WinRT side.

Am I missing something?  Thanks.

Tim

Answered (Verified) Verified Answer

Top 10 Contributor
9,270 Posts
Verified by Tim

In the consumer preview Microsoft didn't define a symbol, so I made one called WINRT.

In the release preview Microsoft defined NETFX_CORE, and I'm switching to that.

I recommend using NETFX_CORE, because that is now the official symbol.

Rocky

All Replies

Top 50 Contributor
178 Posts
Tim replied on Wed, Jul 4 2012 2:39 PM

I think I posted too quickly.  It looks like under the build tab, I see a conditional compilation symbol for NETFX_CORE.  (I never realized until now that that is where the SILVERLIGHT symbol was also defined.)  So I think I'm good at this point, unless someone else tells me I still need to do something different.

Tim

Top 10 Contributor
9,270 Posts
Verified by Tim

In the consumer preview Microsoft didn't define a symbol, so I made one called WINRT.

In the release preview Microsoft defined NETFX_CORE, and I'm switching to that.

I recommend using NETFX_CORE, because that is now the official symbol.

Rocky

Page 1 of 1 (3 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems