1

This is a weird problem. I am trying to build a .NET 3.5 solution with msbuild. I generally write custom build scripts for this, and when I tried this time to build a simple .NET assembly which internally uses CSLA, it started giving me Linq errors.

However, if I build the proj file via msbuild (command line), it seems to build just fine. No issues at all.

Anyone else encounter this issue...and if yes, how do i fix this?

Thanks,

Sashidhar Kokku

bdukes
  • 152,002
  • 23
  • 148
  • 175
Sash
  • 3,525
  • 3
  • 19
  • 17

2 Answers2

2

For C# (possibly other languages, not tested):

You have to add this line using a text editor to the <ItemGroup> section of your .csproj file

<Reference Include="System.Core" />

Visual Studio will not let you add this using the IDE because it makes an implicit reference to it already. MSBuild does not.

After adding this line, save and retry your MSBuild compile.

GunnerGuyven
  • 541
  • 6
  • 8
0

Check you assembly references, also if you have com interoperability enabled and you are using VS2010. You will need to add the CSLA assembly to the bin folder or GAC otherwise build errors will occur inside of the IDE.

Thanks -Blake Niemyjski (Author of the CodeSmith CSLA Templates)

Blake Niemyjski
  • 3,432
  • 3
  • 25
  • 41