Nima Dilmaghani’s Technology Blog

Getting Linq to Work in Orcas Beta1 Web Site

Posted in Uncategorized by nimad on June 29, 2007

When creating an ASP.NET website, you can create a ‘Web Application Project’ or a ‘Web Site’. In Orcas Beta 1, if you chose the ‘Web Application Project’ option, and add the required references to your project (System.Core, and System.Data.Linq), you are ready to go and your project works great. However if you chose ‘Web Site’ and add the same references, you will get a bunch of compiler errors. If you compare the web.config files of these two, you will see that the ‘Web Site’ is missing the following:

compiler language=c#;cs;csharp
System, Version=,
providerOption name=CompilerVersion

Adding it right after the </system.web>
fixes the compiler errors.

Since Linq uses code generation behind the scenes, it needs to know what compiler to use and this markup defines that.  For more info you can see


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: