Extension with LINQ or XPath won't compile in Integration Studio

Extension with LINQ or XPath won't compile in Integration Studio

  
I am trying to use LINQ (or even XPath) to query an XML Web Service Response with in an Extension.
My C# code compiles fine in Visual Studio 10.
But when I compile Integration Studio I get errors.
I am using OutSystems 5.1 .NET 3.5
I do see some warning in the VS Compiler stating :
Warning 2 The predefined type 'System.Action' is defined in multiple assemblies in the global alias; using definition from 'c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' BOI_JH_InqSvc
Is it loading mscorlib 4.0 instead of 3.5?
If so, is this causing my compiling error in Integration Studio.
How can I get this fixed?

Thanks,
Jeff
Hi Jeff.

Have you defined the correct framework under Integration Studio options?
Hi Jeff

Agile Platform uses CLR 2.0, which means that you either compile your C# cod ein .NET 2.0 or 3.5. The error you're getting suggests that your project may be in 4.0, which isn't supported yet.

Make sure you have your Visual Studio target framework set to 2.0 or 3.5 on Visual Studio.

Cheers

Miguel Simões João
I get the same "mscorlib.dll" warnings with Visual Studio 2010, but my extensions still work fine, so the problem is somewhere else.
Check in the project configuration what is the target framework.

What are the compilation errors that you are getting?
I've seen this in the past, you need to check the project options in Integration Studio and verify that it's using the right compiler and the right switches to compile against 3.5, not 2.0. Extensions created initially in older versions will not be using 3.5.

J.Ja
Hi Jeff,

I think there are 2 problems here.


1- Compiling from Integration Studio problem
First like other replies, check the version of the MSBuild that is on the integration studio settings. Since you are using visual studio 2010 it needs to be 3.5
C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe

Also make sure inside Visual Studio the project target framework is set as 3.5.
If it still gives errors, click on the error text and copy paste it here so we can help on that.

2- Compiling from Visual Studio problem
That warning you get is inside visual studio, right?
If that is the case the second problem is caused by Visual Studio 2010 that has a bug upgrading csproj's from Visual Studio 2008 with ToolsVersion="2.0"
Note that that error is REALLY BAD..and a worker process won't be able to load the dll if it is compiled from Visual Studio with that bug!

You can manually edit the .csproj and change it to ToolsVersion="4.0" and will work just fine. Just make sure the target framework is still set as 3.5.


Regards,
João Rosado