Skip to content

Commit

Permalink
Merge pull request #768 from adamralph/multi-target
Browse files Browse the repository at this point in the history
add net6.0 target to MinVer package
  • Loading branch information
adamralph authored May 27, 2022
2 parents c2a5b61 + 3b326c1 commit b09d66e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions MinVer/MinVer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<RollForward>major</RollForward>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
<LangVersion>default</LangVersion>
</PropertyGroup>

Expand Down Expand Up @@ -48,7 +48,7 @@

<Target Name="AddMinVerOutput" BeforeTargets="_GetPackageFiles">
<ItemGroup>
<None Include="$(OutputPath)\**\*" Exclude="$(OutputPath)\**\*.dev.json" Pack="true" PackagePath="minver" />
<None Include="$(OutputPath)\**\*" Exclude="$(OutputPath)\**\*.dev.json;$(OutputPath)\**\*.nupkg" Pack="true" PackagePath="minver" />
</ItemGroup>
</Target>

Expand Down
4 changes: 3 additions & 1 deletion MinVer/build/MinVer.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<PropertyGroup>
<MinVerDetailed>low</MinVerDetailed>
<MinVerDetailed Condition="'$(MinVerVerbosity)' == 'detailed' Or '$(MinVerVerbosity)' == 'd' Or '$(MinVerVerbosity)' == 'diagnostic' Or '$(MinVerVerbosity)' == 'diag'">high</MinVerDetailed>
<MinVerTargetFramework>netcoreapp3.1</MinVerTargetFramework>
<MinVerTargetFramework Condition="'$(MSBuildAssemblyVersion)' &gt;= '17.0'">net6.0</MinVerTargetFramework>
<NoWarn>$(NoWarn);NU5105</NoWarn>
</PropertyGroup>

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

0 comments on commit b09d66e

Please sign in to comment.