Integration Studio Compile Error Referencing System.Linq

Integration Studio Compile Error Referencing System.Linq

  
I am using Integration Studio to create a MS Word document using Miscrosoft's Open XML SDX

(Visual Studio 2008 / Windows 7.)

The code compiles fine in Visual Studio but fails to compile in integration studio. Here is the first line of code failing in Integration Studio:

if (p.Elements<ParagraphProperties>().Count() == 0)
{
   // Implementation
}

Integration Studio Error Message:

WorkbookContainer.cs(140,51): error CS0117: 'System.Collections.Generic.IEnumerable<DocumentFormat.OpenXml.Wordprocessing.ParagraphProperties>' does not contain a definition for 'Count'

If I comment out the following line in visual studio:

using System.Linq; // required by DocumentFormat.OpenXml code...

I get the same error compiling in visual studio:

'System.Collections.Generic.IEnumerable<DocumentFormat.OpenXml.Wordprocessing.ParagraphProperties>' does not contain a definition for 'Count' and no extension method 'Count' accepting a first argument of type 'System.Collections.Generic.IEnumerable<DocumentFormat.OpenXml.Wordprocessing.ParagraphProperties>' could be found (are you missing a using directive or an assembly reference?)

It seems that Integration Studio is failing to find the reference to System.Linq? How do I fix this?

Nick
Hi Nick,

Welcome to the forums - hope you stick around!

It sounds like you have your Integration Studio configured to use the wrong (an older) version of the .Net framework to build the Extension project. Have a look in the .Net tab inside the Edit -> Options dialog: the ".Net Compiler Tool" should point to the 3.5 path (e.g. "C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe"). If it points to 2.0 please change it (or press the Reset Defaults button).

Let me know if this helped!


Miguel
Acácio Porta Nova wrote:
Hi Nick

Check this post:
http://www.outsystems.com/NetworkForums/ViewTopic.aspx?TopicId=8501&Topic=Tip%3A-Extensions-using--NET-3-5-fail-compilation-in-Integration-Studio

It describes the problem that you are having.
 
 Hi Acácio -- Your post fixed the problem. Thanks!

I had no idea I was compiling with .Net 2.0 because my Service Studio Compile Tool Option specifies 3.5. I will know next time.