Page 1 of 1

Issues w/ .NET Framwork 3.5

Posted: Thu Jan 14, 2010 4:21 pm
by bradtm
My target framework is .NET 3.5 for the Web Site and I'm using the .DLL and Web.config from Install/Framework/NET35.

I'm wondering if these are known issues, or if I'm doing something wrong.

When I created a new user control I get errors with:

Code: Select all

using System.Linq;
using System.Xml.Linq;
I had to add the following to my web.config file:

Code: Select all

<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Then when I tried to do Automatic Properties, it threw the following error:

Code: Select all

'Download.ProductId.get' must declare a body because it is not marked abstract or extern
'Download.ProductId.set' must declare a body because it is not marked abstract or extern
I had to add the following to the web.config file to get it to work:

Code: Select all

  <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
        <providerOption name="CompilerVersion" value="v3.5" />
        <providerOption name="WarnAsError" value="false" />
      </compiler>
    </compilers>
  </system.codedom>
brad

Re: Issues w/ .NET Framwork 3.5

Posted: Fri Jan 15, 2010 4:23 am
by jmestep
That happens when I create a new class and since I'm not using them for code, I just remove the two lines
using System.Linq;
using System.Xml.Linq;

Re: Issues w/ .NET Framwork 3.5

Posted: Mon Jul 26, 2010 2:04 pm
by owain.jones@cmc.ca
Thanks Brad!

I was having problems using LINQ and followed your post and it works perfectly now.

Owain