Create a custom powershell script for nuget that adds a custom target to the csproj BeforeBuild step
问题 I want to create a nuget package that adds a BeforeBuild step to my csproj using a custom MSBuild task I have created. Ideally, I want to: Add a new Target into the csproj file (MyCustomBeforeBuildTarget) Add the BeforeBuild target if it is not already there Edit the BeforeBuild DependsOnTargets attribute to include my custom target So after install my csproj should have the following in: <Target Name="MyCustomBeforeBuildTarget" Condition="SomeCondition"> <MyCustomTask /> </Target> <Target