Skip to content

Commit

Permalink
v3.3.8 - Cleanup more .net 7 leftovers
Browse files Browse the repository at this point in the history
bump required sdk to 8.0.303
  • Loading branch information
monoman committed Jul 31, 2024
1 parent 8ce6464 commit e2d03c8
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ A fork of the SvgNet & SvgGdi bridge (http://www.codeproject.com/KB/cs/svgnet.as

__SvgNet is now available as a Nuget:__ [SvgNet](https://www.nuget.org/packages/SvgNet/).

__Latest version 3.3.6 is .NET Standard 2.0 and 2.1 and also .NET 6.0/7.0/8.0 (base and Windows) compatible and works with .NET Core 2.x and 3.x and .NET 5.0/6.0/7.0/8.0, but now requires .NET Framework 4.6.2 or higher__
__Latest version 3.3.8 is .NET Standard 2.0 and 2.1 and also .NET 6.0/8.0 (base and Windows) compatible and works with .NET Core 2.x and 3.x and .NET 5.0/6.0/7.0/8.0, but now requires .NET Framework 4.6.2 or higher__

To build this version properly you need .NET 8.0.100+ SDK installed
To build this version properly you need .NET 8.0.303+ SDK installed

## License: BSD

Expand Down
58 changes: 52 additions & 6 deletions SvgNet/SvgNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net462;net6.0-windows;net8.0-windows</TargetFrameworks>
<UseWindowsForms Condition="'$(TargetFramework)' == 'net6.0-windows' or '$(TargetFramework)' == 'net7.0-windows' or '$(TargetFramework)' == 'net8.0-windows'">true</UseWindowsForms>
<UseWindowsForms Condition="'$(TargetFramework)' == 'net6.0-windows' or '$(TargetFramework)' == 'net8.0-windows'">true</UseWindowsForms>
<LangVersion>preview</LangVersion>
<AssemblyName>SVG</AssemblyName>
<PackageId>SvgNet</PackageId>
<Version>3.3.7</Version>
<Version>3.3.8</Version>
<RootNamespace>SvgNet</RootNamespace>
<DocumentationFile>svgnetdoc.xml</DocumentationFile>
<NoWarn>CS1591</NoWarn>
Expand All @@ -24,7 +24,7 @@
<RepositoryType>git</RepositoryType>
<PackageReleaseNotes>
- Drop support for net7.0 who reached EOL
- Upgrade System.Drawing.Common to 8.0.5 on needed target frameworks
- Upgrade System.Drawing.Common to 8.0.7 on needed target frameworks
</PackageReleaseNotes>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down Expand Up @@ -52,7 +52,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningsAsErrors>NU1605</WarningsAsErrors>
</PropertyGroup>

<Target Name="TagSources">
<Exec Command="git tag v$(Version)" ContinueOnError="true" StandardErrorImportance="low" StandardOutputImportance="low" IgnoreExitCode="true" />
<Message Importance="high" Text="Recent tags:" />
Expand All @@ -74,10 +74,55 @@
<Message Importance="high" Text="Didn't push $(LatestPackage) to Nuget - Already there" Condition="$(VersionAlreadyPushed)" />
</Target>

<ItemGroup Condition="'$(TargetFramework)' != 'net462' And '$(TargetFramework)' != 'net8.0-windows' And '$(TargetFramework)' != 'net7.0-windows' And '$(TargetFramework)' != 'net6.0-windows'">
<PackageReference Include="System.Drawing.Common" Version="8.0.5" />
<ItemGroup Condition="'$(TargetFramework)' != 'net462' And '$(TargetFramework)' != 'net8.0-windows' And '$(TargetFramework)' != 'net6.0-windows'">
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
</ItemGroup>

<Target Name="UpdateREADME" BeforeTargets="Build">
<ItemGroup>
<ReadMe Include="..\README.md" />
</ItemGroup>
<PropertyGroup>
<VersionPattern>Latest version \d+\.\d+\.\d+</VersionPattern>
<VersionResult>Latest version $(Version)</VersionResult>
</PropertyGroup>
<RegexTemplating InputFile="@(ReadMe)" Pattern="$(VersionPattern)" NewValue="$(VersionResult)"/>
</Target>

<UsingTask TaskName="RegexTemplating"
TaskFactory="RoslynCodeTaskFactory"
AssemblyFile="$(MSBuildBinPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<InputFile ParameterType="System.String" Required="true" />
<Pattern ParameterType="System.String" Required="true" />
<NewValue ParameterType="System.String" Required="true" />
<OutputFile ParameterType="System.String" />
<Verbose ParameterType="System.Boolean" />
</ParameterGroup>
<Task>
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Text" />
<Using Namespace="System.Text.RegularExpressions" />
<Code Type="Fragment" Language="C#">
<![CDATA[
if (File.Exists(InputFile)) {
if (string.IsNullOrWhiteSpace(OutputFile))
OutputFile = InputFile;
var contentBefore = File.ReadAllText(InputFile, Encoding.UTF8);
var contentAfter = Regex.Replace(contentBefore, Pattern, NewValue);
if (contentAfter != contentBefore || OutputFile != InputFile) {
File.WriteAllBytes(OutputFile, Encoding.UTF8.GetBytes(contentAfter));
if (Verbose)
Log.LogMessageFromText($"Replaced the pattern '{Pattern}' by the value '{NewValue}' on '{OutputFile}'!", MessageImportance.High);
}
} else
Log.LogMessageFromText($"InputFile '{InputFile}' not found!", MessageImportance.High);
]]>
</Code>
</Task>
</UsingTask>

<ItemGroup>
<None Remove="svgnetdoc.xml" />
<None Include="..\README.md">
Expand All @@ -94,4 +139,5 @@
</None>
</ItemGroup>


</Project>
4 changes: 2 additions & 2 deletions SvgNetUnitTests/SvgNetUnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.100",
"version": "8.0.303",
"allowPrerelease": false,
"rollForward": "latestMajor"
}
Expand Down

0 comments on commit e2d03c8

Please sign in to comment.