Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 856891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:18:38+00:00 2026-05-15T08:18:38+00:00

I have a project that currently compiles happily on my dev machine using VS

  • 0

I have a project that currently compiles happily on my dev machine using VS 2010 (presumably using MSBUILD v4.0), but it fails under MSBUILD v3.5 in Team City (running on a VM based on Win 2003 server w/ .NET 2, 3.5 and 4 installed). This project is newly upgraded to 2010, and is now failing on the CI build. I’ve Googled this and tried everything obvious (plus a few things that didn’t make sense) and nothing affects the outcome.

The project fails with a sequence of errors like this:

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

There are numerous other projects in the solution that use System.Core, System.Data.Linq and System.Xml.Linq and they all seem to compile with no problems. The project in question is a web application, and it has the following settings in its configuration/system.web/compilation/assemblies section:

    <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

Plus the following in the same file:

<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>

The project in question is, IIRC, the only project in my solution that is both a WebApplication and is getting post-processed by PostSharp (v1.5). PostSharp is configured in the .csproj like so:

<PropertyGroup>
  <DontImportPostSharp>True</DontImportPostSharp>
  <PostSharpUseCommandLine>True</PostSharpUseCommandLine>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(POSTSHARP15)\PostSharp-1.5.targets" />

I’m not sure how this could be related, but it’s there just in case.

Any ideas on what’s causing this error or on how to work around the issue?

TIA

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:18:39+00:00Added an answer on May 15, 2026 at 8:18 am

    Solved:

    Adding the references to the web.config file is pointless, because PostSharp enters the picture before ASP.NET has performed any compilation of its own, so an absence of a reference to System.Core reference causes the system to fail (I’m not sure why).

    The solution is to manually edit the csproj file for the failing project and manually add a reference to System.Core to the project. You cannot do this from the solution explorer because it disallows adding references that should be added automatically by MSBUILD.

    Still not sure why it failed in the first place, but at least it now compiles and passes tests again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 416k
  • Answers 416k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you are storing your sessions in a db then… May 15, 2026 at 9:28 am
  • Editorial Team
    Editorial Team added an answer Your code works: If you validates_presence_of :project, then as long… May 15, 2026 at 9:28 am
  • Editorial Team
    Editorial Team added an answer Pages fetched with POST are never cached, so the cache… May 15, 2026 at 9:28 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.