Visual studio 2010 and CSLA 4.5

Visual studio 2010 and CSLA 4.5

Old forum URL: forums.lhotka.net/forums/t/11811.aspx


JCardina posted on Wednesday, January 30, 2013

I have visual studio 2010 and no budget to go to 2012 in the forseable future. I can''t open the CSLA 4.5 sample projects in vs2010 to even see how the 4.5 features should be used and there is apparently no documentation for the new 4.5 features but from what I can gather there are big changes that could break things.

I seem to be stuck between a rock and a hard place, should I stick with CSLA 4.3 or is 4.5 valid for vs 2010 users?

 

JonnyBee replied on Wednesday, January 30, 2013

I would stick with CSLA 4.3 if you are using VS2010.

JCardina replied on Wednesday, January 30, 2013

Hi Jonny, I upgraded to 4.5 through nuget for my project in vs2010 and aside from some minor changes to rules and to my unit tests as an exception had changed it all passes.

I have no UI level code yet though, it's all business objects and unit testing but I'm 90% complete on a very big project for the business objects so I would think the tests would have failed if there was a really big issue.

I will be doing an asp.net mvc UI and a WPF UI, no silverlight or phones etc.  So far aside from not being able to open the sample projects I'm not seeing a downside.

Will the UI level code be the problem using vs2010 with 4.5 or...?

I'm trying to save $747.00 for visual studio pro 2012 upgrade here, I really appreciate your help with this.

JonnyBee replied on Thursday, January 31, 2013

Hi,

We created the NET4 version of CSLA 4.5 primarily in order to create serverside code in .NET 4 (Azure did not support .NET 4.5 at the time nor is .NET 4.5 available on WS2003) and use CSLA 4.5 in SL5, WindowsPhone or .NET 4.5 clients with async/await.

I know Rocky had to backport som of the changes to the DataPortal (no async/await in the WCF calls) - but haven't really looked into it from a VS2010 perspective. Maybe others have experience with CSLA 4.5 in VS201 here on the forum and can jump in with answers?

I'd be happy to know if this works just fine!!

tiago replied on Thursday, January 31, 2013

Hi JCardina,

When CSLA 4.5 was in the pre release stage I ported some .NET CSLA samples so they ran under VS2010, targeting .NET 4.0 and CSLA 4.5. You need to reference Async Targeting Pack that you can install from NuGet. Later Jonny ported them to VS2012 and .NET 4.5.

On this post you can read more on How to install the Async Targeting Pack?.

PS - Porting Silverlight code to CSLA 4.5 is a very different story as you need extensive code refactoring.

RockfordLhotka replied on Saturday, February 02, 2013

The version of CSLA 4.5 in nuget should work fine in VS10 against .NET 4.0. It relies on the async targeting pack to make the async/await keywords available in .NET 4, and that should get pulled automatically by nuget because it is a dependency.

I don't know that there are any .NET 4 samples showing the async/await coding style, but you can look at the 4.5 samples in a text editor or online here:

http://www.lhotka.net/cslacvs/viewvc.cgi/core/trunk/Samples/

There are no coding differences between .NET 4 and 4.5 - CSLA 4.5 acts the same on both versions of .NET thanks (again) to the async targeting pack.

JCardina replied on Saturday, February 02, 2013

I held my nose and paid the criminally high non-U.S. premium for Visual studio 2012 for the privilege of continuing to support Microsoft's platform but I'm sure this info will help others in future.

I guess the big discount on windows 8 somewhat made up for it.

Thanks everyone for your help and taking the time.

 

mbblum replied on Wednesday, January 30, 2013

Visual Studio 2012 Express editions are no charge, and the other editions typially have limited-time trial versions.

Copyright (c) Marimer LLC