I found this question and this answer on how to set the BuildAction (using Powershell) of a file in a C# Project.
Basically, get the specified item, then set the Value of the "BuildAction":
$item = $project.ProjectItems | where-object {$_.Name -eq "ReleaseNotes.txt"} $item.Properties.Item("BuildAction").Value = [int]3
I'm just wondering if there is a way to utilize the prjBuildAction Enumeration values (it doesn't seem to work for me).
I've attempted to modify the second statement but it doesn't change the BuildAction:
$item.Properties.Item("BuildAction").Value = prjBuildActionContent
So, is there any way to use an enumeration value instead of [int]3?