This project is read-only.

Compilation Error - The type or namespace name 'Linq' does not exist in the namespace 'System'

Topics: Installing Orchard
Apr 18, 2012 at 2:33 PM
Edited Apr 18, 2012 at 2:38 PM

I'm trying to get Orchard running at so I copied the content of in the wwwroot folder but I'm getting this error:

Compiler Error Message: CS0234: The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)

Source Error:

Line 102:        <add namespace="System.Web.Mvc.Html" />
Line 103:        <add namespace="System.Web.Routing" />
Line 104:        <add namespace="System.Linq" />
Line 105:        <add namespace="System.Collections.Generic" />
Line 106:        <add namespace="Orchard.Mvc.Html" />

Before trying to install it by just copying the files to the server, I used WebMatrix and published from there but I was getting the same error. Orchard was working fine locally when I was using WebMatrix (SQL Compact).

Thanks for helping!

Apr 18, 2012 at 7:09 PM

Probably wrong version of .NET. Check your app pool settings.

Apr 18, 2012 at 7:19 PM

The setting in WebsitePanel is ASP.NET 4.0 Integrated Pipeline for this website.

Apr 18, 2012 at 7:28 PM

You probably didn't upload everything you needed then. It's common when using FTP. That's why I use WebDeploy whenever I can instead of ftp.

Apr 18, 2012 at 8:03 PM

I downloaded the files from FTP and made a binary comparison with the ones in They seem to be the same. However, a folder Dependencies was created under App_Data that contains 32 dll files (Orchard.*.dll etc.) and 2 xml (dependencies.compiled.xml and dependencies.xml). Also, the remote web.config now includes:

<directoryBrowse enabled="false" />
                <clear />
                <add value="index.php" />
                <add value="Default.htm" />
                <add value="Default.asp" />
                <add value="index.htm" />
                <add value="index.html" />
                <add value="iisstart.htm" />
                <add value="default.aspx" />


Apr 18, 2012 at 8:04 PM
Edited Apr 18, 2012 at 8:05 PM

IE9 error made the above post to display twice. Sorry.

Apr 18, 2012 at 9:38 PM

Maybe your hosting company has a weird trust level? Always prefer hosting companies that give you full trust.

Apr 18, 2012 at 9:40 PM
Edited Apr 18, 2012 at 9:53 PM

What can I do to find out more about the issue? What should I ask the hosting company? Full trust is not enabled for the hosting plan I contracted.

I installed Orchard on another website ( on the same host but through WebsitePanel - Microsoft Web App Gallery using a MSSQL database. I get the same error.

Apr 18, 2012 at 11:20 PM

Ask them what their trust level is. That's probably the problem.

Apr 19, 2012 at 11:26 AM
Edited Apr 19, 2012 at 4:47 PM

They say the trust level is set to medium. By default.

I asked them to grant full trust for a limited time, just to see if it works. They agreed and it works with full trust. However, I tried to install a new theme because I knew this could be problematic and I got this error even though from what I can tell there is write access to those folders:

"Package installation failed: There was an error installing the requested package. This can happen if the server does not have write access to the '~/Modules' or '~/Themes' folder of the web site. If the site is running in shared hosted environement, adding write access to these folders sometimes needs to be done manually through the Hoster control panel. Once Themes and Modules have been installed, it is recommended to remove write access to these folders."

Apr 19, 2012 at 7:49 PM

That's a different issue: you probably have the wrong feed configured. It should be

Medium trust should work, but it seems like somehow it fails on 1.4 with some hosting companies. I'm not sure why but in any case I would strongly advise looking for a hoster that offers full trust. There are so many quality affordable hosting plans with full trust nowadays that for a company to only offer medium is just not justifiable in my eyes. I would not give them my business.

Apr 19, 2012 at 8:00 PM

I thought I got a good deal with this hosting company.

Thanks for your help!