Click here to Skip to main content
13,668,546 members
Rate this:
Please Sign up or sign in to vote.
I'd like to be able to toggle the "Exclude from build" option for a file, without having to go through Right-Click|Properties.

Is there any way to assign this to a button?
Posted 20-May-13 13:00pm
AspDotNetDev 20-May-13 20:25pm
Do you mean "Exclude From Project"? I see that in my context menu when I right click an item.
Kyudos 20-May-13 23:02pm
No, that removes the file from the project, I want to remove it from the build. See (on a file) Right-click|Properties|General|Excluded from build

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I think he's saying setting the Build Action to "None".

I don't know that there is a way to do this without creating a VSIP. The only real way to do it is to edit the .csproj or .vbproj file and set the <buildaction> to none. You may want to look through the MSBuild documentation but I'm guessing that making a VSIP is more trouble than opening the properties window and setting the property.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web06-2016 | 2.8.180820.1 | Last Updated 20 May 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100