Re: Compilation error in .NET 3.5 or C# 3.0
|
Seleimon Kolonja |
|
5/7/2008 3:54:49 AM |
You might consider at least getting the VWD 2008 Express. It will provide you with a web.config that contains the default settings for ASP.NET 3.5. This is a snippet from the default web.config of a VWD 2008 project: <system.codedom> <compilers> <compiler language="c#;cs;csharp"
extension=".cs"
warningLevel="4"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/> </compiler> </compliers> </system.codedom> As for the Linq error, the correct namespace is Sy stem.Xml.Linq. Up to now, the .NET Framework 3.5 documentation has been rolled in with the Windows Server 2008 SDK. The RC version that contains the Beta 2 documentation for .NET 3.5 is currently available. Post Comments |
|
That set me in the right direction. Thanks. There is a System.Linq namespace; it is located in the System.Core.dll assembly.
I added the following to my web.config: <system.web> <compilation> <assemblies> <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"/> </assemblies> </compilation> </system.web> <system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > <providerOption name="CompilerVersion" value="v3.5"/> <providerOption name="WarnAsError" value="false"/> </compiler> </compilers> </system.codedom> Post Comments |
|
Seleimon, It worked with me. Post Comments |
|