We use csproj files with a custom build action. In a VS package we add new files with a certain extension and want to assign our custom build action to the ProjectItem. Currently we try the following:
Property prop = projItem.Properties.Item("BuildAction");
prop.Value = someIntegerValue;
There is an enum prjBuildAction providing the standard Build actions (None, Compile, Content, Embedded Resource). As far as I understand it, the custom build actions can be set using integer values > 3, the standard build actions using the values 0..3. But the values for custom build actions vary on differerent machines. They seem to be an index into a build actions list.
The question is: How can I achieve the proper value for a custom build action like "MyTaskCompiler"? How can I access the build actions list to determine the right index?
Thanks in advance for any idea.
Mirko
Property prop = projItem.Properties.Item("BuildAction");
prop.Value = someIntegerValue;
There is an enum prjBuildAction providing the standard Build actions (None, Compile, Content, Embedded Resource). As far as I understand it, the custom build actions can be set using integer values > 3, the standard build actions using the values 0..3. But the values for custom build actions vary on differerent machines. They seem to be an index into a build actions list.
The question is: How can I achieve the proper value for a custom build action like "MyTaskCompiler"? How can I access the build actions list to determine the right index?
Thanks in advance for any idea.
Mirko