Build tasks project targeting multiple MSBuild releases #8652
-
Hi, what's the best practise for a project with build tasks which should target multiple MSBuild releases - 15, 16 and 17. We have a project which compiles build tasks using .NET Framework 4.6 and targets MSBuild 15 only. <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net46</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" Version="15.1.1012" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.1.1012" />
</ItemGroup>
</Project> Is is possible to do it in a single project, or should we use shared project for source code and create individual projects for each MSBuild release? Can this be packed into a single nuget package? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Do you need/want to use new features in the newer MSBuild versions? In general, it's easiest to build tasks targeting the lowest MSBuild version you care to support and rely on MSBuild to keep them compatible on newer engines. |
Beta Was this translation helpful? Give feedback.
Do you need/want to use new features in the newer MSBuild versions? In general, it's easiest to build tasks targeting the lowest MSBuild version you care to support and rely on MSBuild to keep them compatible on newer engines.