Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio project not being built when I build Solution from msbuild

I build whole Visual Studio solution using msbuild, it worked fine but there is one project not being built when I build whole solution

This is my msbuild script

    <MSBuild Condition="'$(debug)' ==''"
             Projects="$(MySolution)"
             Targets="build"
             Properties="Configuration=Release">
      <Output TaskParameter="TargetOutputs"       ItemName="BuildOutput" />
    </MSBuild>

Something I need to check on this specific project in my Visual Studio solution?

like image 422
icn Avatar asked Dec 13 '11 20:12

icn


People also ask

Why is Visual Studio not building?

Close and reopen Visual Studio Turn it on and off again – it might help. As a note – in my experience restarting your computer rarely helps. By all means try it but don't be surprised when the solution still stubbornly refuses to build.

What is the difference between MSBuild and Visual Studio build?

Visual Studio determines the build order and calls into MSBuild separately (as needed), all completely under Visual Studio's control. Another difference arises when MSBuild is invoked with a solution file, MSBuild parses the solution file, creates a standard XML input file, evaluates it, and executes it as a project.

How do I run MSBuild in Visual Studio?

To install MSBuild on a system that doesn't have Visual Studio, go to Build Tools for Visual Studio 2019, or install the . NET SDK. If you have Visual Studio, then you already have MSBuild installed. With Visual Studio 2022, it's installed under the Visual Studio installation folder.

What is the difference between build Solution and rebuild solution in Visual Studio?

Build Solution : compiles code files (dll and exe) that have changed. Rebuild Solution : Deletes all compiled files and Compiles them again regardless of whether or not the code has changed.


1 Answers

If this is a new project added to a solution and all other projects are building fine, my guess is that the new project has not been included in the solution configuration build list. In VS Solution Explorer right click on the solution node and open the configuration manager dialog and make sure your new project is checked for build in all relevant configuration (Debug, Release...), I am talking about this dialog:

enter image description here

like image 161
Davide Piras Avatar answered Sep 21 '22 20:09

Davide Piras