Hi,
I’ve created a custom project using MPF in VS 2008 in c#. In my custom proj file, I’ve defined a custom BuildAction which I’m handling in my custom Targets file. I’ve also implemented the IWizard interface to handle setting my custom BuildAction for newly added items. All files added to my project will have this custom BuildAction specified. However, I’ve discovered that the BuildAction in the ProjectItem (passed in to ProjectItemFinishedGenerating method in my IWizard implementation) is not a string value, but a Microsoft.VisualStudio.Project.BuildAction. My question is, is there any way to extend BuildAction, or am I just stuck with the default values of Compile, Content, EmbeddedResource, & None? I’ve looked inside both the IronPython and the WiX Votive solutions and it looks like both of them get around this by overriding CoreCompile in the targets file. Any guidance on this is very appreciated. Maybe this is the way I should go? Here’s how I’m setting the BuildAction, which results in an ArgumentException.
projectItem.Properties.Item("BuildAction").Value = "MyCompile"