You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VS 2017 now has support for cross-targeting builds that can generate a NuGet package. This operates with an inner and outer loop. The inner loop builds each TFM and works with the current GitVersionTask package as-is. The outer-loop (where things like Pack/Publish) targets run needs one update to the packaging of the targets: a copy of the targets also needs to go into \buildCrossTargeting. This name may change as per dotnet/sdk#486 to \buildMultiTargeting, so for now, easiest just to put a copy of the targets in each.
Instead of being a copy, it can be a new set of targets that have this:
There may be some other updates too. Instead of/in addition to doing a CoreCompile hook for the inner loop, it would be good to use CoreGenerateAssemblyInfo since that task using the new SDK build system is what writes the assembly info.
Here's some more info: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting look there and you can see how you can distinguish between MSBuild running on CoreCLR and Desktop as to load the right version of a task...
In the outer loop, you'd want to inject the logic before the GenerateNuspec target
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.
VS 2017 now has support for cross-targeting builds that can generate a NuGet package. This operates with an inner and outer loop. The inner loop builds each TFM and works with the current
GitVersionTask
package as-is. The outer-loop (where things like Pack/Publish) targets run needs one update to the packaging of the targets: a copy of the targets also needs to go into\buildCrossTargeting
. This name may change as per dotnet/sdk#486 to\buildMultiTargeting
, so for now, easiest just to put a copy of the targets in each.Instead of being a copy, it can be a new set of targets that have this:
<Import Project="..\build\GitVersionTask.targets"/>
There may be some other updates too. Instead of/in addition to doing a
CoreCompile
hook for the inner loop, it would be good to useCoreGenerateAssemblyInfo
since that task using the new SDK build system is what writes the assembly info.Here's some more info:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting
look there and you can see how you can distinguish between MSBuild running on CoreCLR and Desktop as to load the right version of a task...In the outer loop, you'd want to inject the logic before the
GenerateNuspec
targetThe text was updated successfully, but these errors were encountered: