Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

How to perform action on custom nuget install/uninstall?

$
0
0

I have built a nuget which installs .editorconfig file in project on build and it works fine with the following in the props file:

<ItemGroup><EditorConfigFilesToCopy Include="$(MSBuildThisFileDirectory)../content/.editorconfig" /></ItemGroup><Target Name="CopyEditorConfig" BeforeTargets="BeforeBuild"><Message Text="Copying files from '@(EditorConfigFilesToCopy)' to '$(MSBuildProjectDirectory)'" /><Copy      SourceFiles="@(EditorConfigFilesToCopy)"      DestinationFolder="$(MSBuildProjectDirectory)"      SkipUnchangedFiles="true"      UseHardlinksIfPossible="false" /></Target>

Now I would like to remove that file on nuget uninstall, and to install it too on nuget install.Is there any way to do that? I can't find any replacement for (un)install.ps1 scripts which are deprecated.

Thanks


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>