why is there so many errors in the csla.net 3.5 build?

why is there so many errors in the csla.net 3.5 build?

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


AKaplan posted on Tuesday, March 25, 2008

I am seeing alot of errors where variables are not defined in the VB version of csla.net 3.5 build. In the C# version the same variables are being defined as var, which doesn't mean anything. How can this be fixed?

webjedi replied on Tuesday, March 25, 2008

In C# var is used for an anonymous type...which definately has meaning and is on purpose.

Make sure you are trying to build with VS2008 and don't change the targeted framework from .Net 3.5 to anything else.

Ryan

RockfordLhotka replied on Tuesday, March 25, 2008

Yes, CSLA .NET 3.5 requires .NET 3.5.

If you are using .NET 2.0 or 3.0 then you should be using CSLA .NET 3.0.x.

AKaplan replied on Wednesday, March 26, 2008

I am using .net 3.5

 

RockfordLhotka replied on Wednesday, March 26, 2008

The feature is called type inference. In C# it is like

var x = 10;

and in VB it is like

Dim x = 10

In both cases 'x' ends up being of type int/Integer.

In VB you can turn this feature on/off using an Option statement at the top of each file, or at the project level. The Csla project should have inference turned on - but perhaps somehow it is not turned on for you?

AKaplan replied on Wednesday, March 26, 2008

thanks rockford. i know this was a simple thing to explain, but it was something i needed to understand, and it wasn't being done in the previous versions of csla

AKaplan replied on Wednesday, March 26, 2008

my Option statements are turned on at the project level. I'm not sure which Option you are referring to, but Option Explicit = On, Option Strict = On, Option Compare = binary

JoeFallon1 replied on Wednesday, March 26, 2008

In VS 2008 check

Tools

Options

Projects And Solutions

VB Defaults

Option Infer - set it to On.

Joe

 

AKaplan replied on Wednesday, March 26, 2008

I'm not working with VS2008. I have VS2005 which does not have Option Infer.

ajj3085 replied on Wednesday, March 26, 2008

Well Csla 3.5 requires Vs2008 / .Net 3.5... so you should look at 3.0.3.

RockfordLhotka replied on Wednesday, March 26, 2008

To reiterate:

 

CSLA .NET 3.5 requires Microsoft .NET 3.5 and Visual Studio 2008.

 

Rocky

AKaplan replied on Wednesday, March 26, 2008

AAAAAAAAHHHHHHHH crap!!!... well at least i dont have to worry about upgrading any time soon... thats a headache off my mind... =)

Copyright (c) Marimer LLC