Allows the execution of custom MSBuild project targets (defined in any type of Visual Studio project file) from within the Visual Studio IDE by right clicking on the Project item in Solution Explorer.
It supports custom MSBuild targets for all types of Visual Studio project files, including C# (.csproj), C/C++ (.vcxproj), NodeJs (.njsproj), etc. Custom MSBuild target examples for C# projects may include creating a Nuget package, publishing a site with custom actions, cleaning output folders or for NodeJs (.njsproj) projects calling arbitrary npm/yarn targets from within Visual Studio.
<Target Name="Package" DependsOnTargets="Build">
<Message Importance="High" Text="Package" />
<MakeDir Directories="bin\Nuget" />
<Exec Command="nuget.exe pack -NoPackageAnalysis -NonInteractive $(MSBuildProjectName).csproj" />
</Target>
<Target Name="CleanOutputs">
<Message Text="CleanOutputs" Importance="high" />
<RemoveDir Directories="$(OutputPath);obj" ContinueOnError="true">
<Output TaskParameter="RemovedDirectories" ItemName="removed" />
</RemoveDir>
<Message Text="Removed: %(removed.FullPath)" Importance="high" />
</Target>