Open NinoFloris opened 5 years ago
Which defaults do you need to change? If they are for building and not directly related to publishing, then it is this difficult.
If you used publish profiles, you could change some property groups or add targets (e.g. before build targets) in the publish profile..
So I was looking around to see if I could redefine some defaults to always be true iff we run a Publish action.
I could only seem to get there by chaining msbuild gotchas, essentially having a project like:
The pain here is mainly that you cannot get any custom evalution in before
/t: Publish
— without doing crazy stuff — there's only the indifferent InitialTargets.Problem there obviously is if you really need a Target to only run before Publish, not always.
Is there anything we can do better here?
It looks I'm not the first either https://github.com/dotnet/sdk/issues/1039, although there it seems BeforePublish was still a thing.