I have a nuget package that adds an executable that I need to run after building the project every time.
I can add this manually by adding a section to each project file like this:
<Target Name="AfterBuild">
<PropertyGroup>
<PathToOutputExe>..\bin\Executable.exe</PathToOutputExe>
<PathToOutputJs>"$(MSBuildProjectDirectory)\Scripts\Output.js"</PathToOutputJs>
<DirectoryOfAssemblies>"$(MSBuildProjectDirectory)\bin\"</DirectoryOfAssemblies>
</PropertyGroup>
<AspNetCompiler Condition="'$(MvcBuildViews)'=='true'" VirtualPath="temp" PhysicalPath="$(ProjectDir)" />
<Exec Command="$(PathToOutputExe) $(PathToOutputJs) $(DirectoryOfAssemblies)" />
</Target>
How can I add this to a project when installing the nuget package? (i.e. using the DTE $ project object in the Install.ps1 file)
I would really appreciate any help on this.
thank
Richard
source
share