msbuild: "compile" context menu item for Custom Build Action in Visual Studio 2010 (on C++ project) -
i've added new build target c++ visual studio project (vcxproj).
target runs custom tool when project built. tool processes specific files on solution according contenttype , itemtype specified. works project actions such "build" , "clean".
now support action equivalent "compile", i.e. right click on file in solution explorer , select process specific file custom tool (the same way "compile" runs "cl" "c/c++ code" file types).
i know add visual studio macro this. not solution me because it's harder deploy many users. better solution customize vcxproj (or files imported it).
wonder if it's possible add "compile" action in menu (or change "compile" behavior file types other "c/c++ code") through msbuild targets scripts or propertypageschema.
update: i've started a discussion on msdn forum. got answers microsoft moderator helped clearing things, problem still unsolved.
update (2016), vs2015
availableitemname
seems solve on vs2015. example, have custom target process excel files.
on targets file:
<itemgroup> <propertypageschema include="$(solutiondir)\exceloptions.xml" /> </itemgroup> <itemgroup> <availableitemname include="excel"> <targets>processexcel</targets> </availableitemname> </itemgroup>
on options file:
<fileextension name=".xls" contenttype="excel"/> <contenttype name="excel" displayname="excel file" itemtype="excel"/> <itemtype name="excel" displayname="excel file"/>
now compile accessible on solution explorer context menu after selecting excel file, , ctrl-f7 works (for files can edited on vs, not excel files)
Comments
Post a Comment