In a VS 2008 solution, I have several projects. I run the build on the entire solution with msbuild. Based on the existence of a file on the disk, I want to skip the build for one of the projects. How can I achieve this? Is there a way to use a prebuild action to skip the project build?
Visual Studio pre-build action to skip project build based on condition
1k Views Asked by kjv At
1
There are 1 best solutions below
Related Questions in VISUAL-STUDIO
- NuGet - Given a type name or a DLL, how can I find the NuGet package?
- Exception thrown at 0x0131EB06 Visual Studio
- Visual Studio 2015 Cordova Plugin Add Fail
- Cannot find InvalidCastException in C# Application
- generating C# code file during Visual Studio build
- Can I deploy multiple instances of my application on the same windows phone?
- Close the Solution Explorer window
- How to generate entity framework code-first migrations without using the package manager console?
- Implementing callback function for dialog-based application
- VB.net: How to make original variable value fulfill 2 statements?
- DLL being marked as DELETEPENDING
- String tokenizing in Visual Studio C++
- How to use "Multicharts Studies" in Visual Studio 2013?
- Programs Will Not Run In Visual Studio
- VB.Net: Display total when check boxes are checked
Related Questions in VISUAL-STUDIO-2008
- Automatically Compile .Net UserControls
- Error code 31 returned from mt.exe when building C++ projects in Visual Studio 2013
- Issue with Referenced DLL's on compiled EXE in Visual Studio 2008
- How can I prevent picture boxes from intersecting, while they are in constant movement?
- Microsoft TFS and Visual Studio 2008 - project hierarchy changing on server
- Disable clock edit on windows 6.5
- How to static link EDK II library into application in Visual Studio 2008 tool chain
- MFC Feature Pack 2008 CPaneDialog as CDialogBar
- Can we highlight single word of from Text Property (have multiple words)of Label Control
- Getting exception while compiling in 64bit visual studio 9.0 sp1
- Error LNK2019 LNK2001
- Desktop Shortcut Icon is different than Application Icon
- Trying to reduce size of memory allocations in debug compilations for C++
- c++ wofstream issue in unicode program
- How to set parameters as optional while adding crystal reports in central management consol
Related Questions in MSBUILD
- How to define WIX agent requirement in TeamCity?
- Reading msbuild syntax
- Release Management for Visual Studio 2013 - Release Exception
- Exception in SonarQube.Msbuild.Runner
- How to build rptproj using C#
- Can't build a project with Postsharp 4.1.14
- Migrate ClickOnce certificate from Sha1 to SHA256 and run on .NET 4.0 client machines
- Run MSBuild from powershell without specifying .Net version
- hosted build visual studio online
- WebDeploy from TFS using Build Definitions to IIS site containing files changed by users
- How to use Clang compiler with MSBuild?
- How to include js files in a Visual Studio project on build
- TFS 2015 RC Build.Preview Execute xUnit Tests
- Visual Studio Code, C# support on Windows
- Does Task Runner Explorer support CI build servers?
Related Questions in PREBUILD
- Visual Studio pre-build action to skip project build based on condition
- How to add pre-build step in qmake/qtcreator?
- Visual Studio 2010 precompile or prebuild actions
- Cruisecontrol task with can execute even if Soursecontrol is not accessible
- Indirect way to reference "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\datasvcutil.exe" in a prebuild event
- How to make a C macro pre-build pre-processor?
- How to create Path variable in Android.bp file to link libraries in prebuilt directory AOSP source code
- Why are native node modules always recompiled on npm install?
- How can I add an existing file to a project in Visual Studio in the pre-build event?
- How to set the local cpp source path in Android studio for prebuild library
- Using Boost Pre-build package
- Pre-build step in makefile
- Heroku msnodesqlv8 problem - Error while deploying
- Writing more than one command in the Visual Studio 2010 pre-build events field when the commands are not batch files and contain macros
- Pre build error cannot solve in my react native app
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
PreBuildEvent is used to call custom script in OutDir. There is no special flags to skip building. I know several ways to hack build system and get needed behaviour, but it's not cosher.
1) First of all you can create two solutions (with and without that project). On top of that you can easily create a script which will check existence of the file and call MSBuild to build one or another.
2) You can remove the project from sln, add new simple project (let's say dll) and check existence of the file in BeforeBuild action and call MSBuild to build your custom project. Or you can add this behaviour to the one of the projects in that sln.