agoda-com / dotnet-build-metrics

Measure Compilation time of Dev local C# projects
Apache License 2.0
4 stars 4 forks source link

add release and remove publish from PR #11

Closed amitash-anand closed 3 years ago

dicko2 commented 3 years ago

image the original project didnt need this, i used a targets file in the content that imports to the project you install to.

This line is meant o put teh targets file into the build folder, so it should automatically get used by the project that installs it https://github.com/agoda-com/dotnet-build-metrics/blob/master/src/Agoda.Builds.Metrics/Agoda.Builds.Metrics.csproj#L23

Worst case you can actually include powershell scripts into the nuget package that will add xml to csproj files, but this case we shouldnt need it, because its a feature.

However, we dont need release in github to do this, i dont understand why we did the extra work here, we had a version number already

shane-agoda commented 3 years ago

The reference you have simply includes the targets file in the final NuGet package - it is still extracted to the packages directory and still needs to be referenced by version number. We could use a post installation script in the package (if that is supported) but it would just insert into the XML it would have to replace any existing reference that might be present.

Using post install scripts that modifies the XML is not portable as of V3.

Powershell script support was modified to no longer execute install and uninstall scripts, but init scripts are still executed.

and

Additionally, running NuGet outside of Visual Studio at the command-line or on other operating systems cannot execute these Powershell scripts as they relied on Visual Studio automation.

dicko2 commented 3 years ago

have added #13 for my comments above