Skip to content

Commit b09d66e

Browse files
authored
Merge pull request #768 from adamralph/multi-target
add net6.0 target to MinVer package
2 parents c2a5b61 + 3b326c1 commit b09d66e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

MinVer/MinVer.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<PublishRepositoryUrl>true</PublishRepositoryUrl>
1919
<RollForward>major</RollForward>
2020
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
21-
<TargetFramework>netcoreapp3.1</TargetFramework>
21+
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
2222
<LangVersion>default</LangVersion>
2323
</PropertyGroup>
2424

@@ -48,7 +48,7 @@
4848

4949
<Target Name="AddMinVerOutput" BeforeTargets="_GetPackageFiles">
5050
<ItemGroup>
51-
<None Include="$(OutputPath)\**\*" Exclude="$(OutputPath)\**\*.dev.json" Pack="true" PackagePath="minver" />
51+
<None Include="$(OutputPath)\**\*" Exclude="$(OutputPath)\**\*.dev.json;$(OutputPath)\**\*.nupkg" Pack="true" PackagePath="minver" />
5252
</ItemGroup>
5353
</Target>
5454

MinVer/build/MinVer.targets

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<PropertyGroup>
1010
<MinVerDetailed>low</MinVerDetailed>
1111
<MinVerDetailed Condition="'$(MinVerVerbosity)' == 'detailed' Or '$(MinVerVerbosity)' == 'd' Or '$(MinVerVerbosity)' == 'diagnostic' Or '$(MinVerVerbosity)' == 'diag'">high</MinVerDetailed>
12+
<MinVerTargetFramework>netcoreapp3.1</MinVerTargetFramework>
13+
<MinVerTargetFramework Condition="'$(MSBuildAssemblyVersion)' &gt;= '17.0'">net6.0</MinVerTargetFramework>
1214
<NoWarn>$(NoWarn);NU5105</NoWarn>
1315
</PropertyGroup>
1416

@@ -41,7 +43,7 @@
4143
<MinVerInputs Include="--verbosity &quot;$(MinVerVerbosity)&quot;" />
4244
<MinVerInputs Include="--version-override &quot;$(MinVerVersionOverride)&quot;" />
4345
</ItemGroup>
44-
<Exec Command="dotnet &quot;$(MSBuildThisFileDirectory)../minver/MinVer.dll&quot; @(MinVerInputs->'%(Identity)', ' ')" ConsoleToMSBuild="true" StandardOutputImportance="Low" >
46+
<Exec Command="dotnet &quot;$(MSBuildThisFileDirectory)../minver/$(MinVerTargetFramework)/MinVer.dll&quot; @(MinVerInputs->'%(Identity)', ' ')" ConsoleToMSBuild="true" StandardOutputImportance="Low" >
4547
<Output TaskParameter="ConsoleOutput" ItemName="MinVerConsoleOutput" />
4648
</Exec>
4749
<ItemGroup>

0 commit comments

Comments
 (0)