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

  • SEARCH
  • Home
  • 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 356495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T12:07:02+00:00 2026-05-12T12:07:02+00:00

When i build a A.sln which includes 2 projects B.csproj and C.csproj which has

  • 0

When i build a A.sln which includes 2 projects B.csproj and C.csproj which has internal project references it throws reference errors in MSBuild. But when i build B.csproj and C.csproj seperately in MSBuild it don’t throw errors. And also building A.sln in VS IDE also don’t throw errors.I’m using .NET 2.0 framework. Please find below the scripts used to build the sln and projs.

MSBuild "<path>/A.sln" /p:Configuration=Release /p:StartupObject="" /p:WarningLevel=4 /p:Optimize=true /t:rebuild /l:Filelogger,Microsoft.Build.Engine;logfile=F:\A.sln.log /verbosity:normal

MSBuild "<path>/B.csproj" /p:Configuration=Release /p:StartupObject="" /p:WarningLevel=4 /p:Optimize=true /t:rebuild /l:Filelogger,Microsoft.Build.Engine;logfile=F:\B.csproj.log /verbosity:normal 

MSBuild "<path>/C.csproj" /p:Configuration=Release /p:StartupObject="" /p:WarningLevel=4 /p:Optimize=true /t:rebuild /l:Filelogger,Microsoft.Build.Engine;logfile=F:\C.csproj.log /verbosity:normal 

Edit:

All the errors thrown are from code for missing refernces(all are project references). I get only three type of errors like given below.

error CS0012: The type ‘X’ is defined
in an assembly that is not referenced.
You must add a reference to assembly
‘Y, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=aad4cbe5d7c27078’.

error CS0234: The type or namespace
name ‘X’ does not exist in the
namespace ‘Y’ (are you missing an
assembly reference?)

error CS0246: The type or namespace
name ‘X’ could not be found (are you
missing a using directive or an
assembly reference?)

I cleared all previously built dlls from build paths before building from both IDE and MSBuild. But IDE just works fine and don’t show a reference missing indicator in “Refrences” section for the project.

No reference paths added manually in IDE.

Another Update:

I just noticed that when i open both the projects from the solution, references are correctly pointing in IDE. But when i open the projects seperately in IDE, the missing references i mentioned occuring in MSBuild creeps up. Very wierd.

So to summarize,

Buiilding .proj in MSBuild – Good

Buiilding .proj in IDE – Error

Buiilding .sln in MSBuild – Error

Buiilding .sln in IDE – Good

Looks very wierd for me. Help much much appreciated.

  • 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-12T12:07:02+00:00Added an answer on May 12, 2026 at 12:07 pm

    MSBuild and VS both use project references and project dependencies to choose the solution build order. Beyond that, it’s undefined – and typically different between the two. Check both of these are correct. Project dependencies are set in the properties of your solution.
    If that doesn’t work, double check the GUIDs in the project references in your projects match the ones in the solution. Sometimes recreating the solution can fix them.

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

Sidebar

Ask A Question

Stats

  • Questions 180k
  • Answers 180k
  • 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 Untested, since I don't use a Mac, tried with Ctrl-Return… May 12, 2026 at 3:59 pm
  • Editorial Team
    Editorial Team added an answer There's a GlassPanel in the Google Web Toolkit Incubator -… May 12, 2026 at 3:59 pm
  • Editorial Team
    Editorial Team added an answer It is safe to publish an SVN branch, but only… May 12, 2026 at 3:59 pm

Related Questions

I apologize in advance for the long post... I used to be able to
Recently I've changed our team build project file from: <SolutionToBuild Include=$(SolutionRoot)/OurSolution.sln> to <SolutionToBuild Include=$(SolutionRoot)/**/*.csproj>
I am attempting to a get a isolated build environment setup in my dev
Update: When I use the subprocess.call instead of subprocess.Popen , the problem is solved

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.