Skip to content

Commit e2d03c8

Browse files
committed
v3.3.8 - Cleanup more .net 7 leftovers
bump required sdk to 8.0.303
1 parent 8ce6464 commit e2d03c8

4 files changed

Lines changed: 57 additions & 11 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ A fork of the SvgNet & SvgGdi bridge (http://www.codeproject.com/KB/cs/svgnet.as
44

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

7-
__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__
7+
__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__
88

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

1111
## License: BSD
1212

SvgNet/SvgNet.csproj

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net8.0</TargetFrameworks>
55
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net462;net6.0-windows;net8.0-windows</TargetFrameworks>
6-
<UseWindowsForms Condition="'$(TargetFramework)' == 'net6.0-windows' or '$(TargetFramework)' == 'net7.0-windows' or '$(TargetFramework)' == 'net8.0-windows'">true</UseWindowsForms>
6+
<UseWindowsForms Condition="'$(TargetFramework)' == 'net6.0-windows' or '$(TargetFramework)' == 'net8.0-windows'">true</UseWindowsForms>
77
<LangVersion>preview</LangVersion>
88
<AssemblyName>SVG</AssemblyName>
99
<PackageId>SvgNet</PackageId>
10-
<Version>3.3.7</Version>
10+
<Version>3.3.8</Version>
1111
<RootNamespace>SvgNet</RootNamespace>
1212
<DocumentationFile>svgnetdoc.xml</DocumentationFile>
1313
<NoWarn>CS1591</NoWarn>
@@ -24,7 +24,7 @@
2424
<RepositoryType>git</RepositoryType>
2525
<PackageReleaseNotes>
2626
- Drop support for net7.0 who reached EOL
27-
- Upgrade System.Drawing.Common to 8.0.5 on needed target frameworks
27+
- Upgrade System.Drawing.Common to 8.0.7 on needed target frameworks
2828
</PackageReleaseNotes>
2929
<PackageLicenseFile>LICENSE</PackageLicenseFile>
3030
<PackageReadmeFile>README.md</PackageReadmeFile>
@@ -52,7 +52,7 @@
5252
<DefineConstants>DEBUG;TRACE</DefineConstants>
5353
<WarningsAsErrors>NU1605</WarningsAsErrors>
5454
</PropertyGroup>
55-
55+
5656
<Target Name="TagSources">
5757
<Exec Command="git tag v$(Version)" ContinueOnError="true" StandardErrorImportance="low" StandardOutputImportance="low" IgnoreExitCode="true" />
5858
<Message Importance="high" Text="Recent tags:" />
@@ -74,10 +74,55 @@
7474
<Message Importance="high" Text="Didn't push $(LatestPackage) to Nuget - Already there" Condition="$(VersionAlreadyPushed)" />
7575
</Target>
7676

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

81+
<Target Name="UpdateREADME" BeforeTargets="Build">
82+
<ItemGroup>
83+
<ReadMe Include="..\README.md" />
84+
</ItemGroup>
85+
<PropertyGroup>
86+
<VersionPattern>Latest version \d+\.\d+\.\d+</VersionPattern>
87+
<VersionResult>Latest version $(Version)</VersionResult>
88+
</PropertyGroup>
89+
<RegexTemplating InputFile="@(ReadMe)" Pattern="$(VersionPattern)" NewValue="$(VersionResult)"/>
90+
</Target>
91+
92+
<UsingTask TaskName="RegexTemplating"
93+
TaskFactory="RoslynCodeTaskFactory"
94+
AssemblyFile="$(MSBuildBinPath)\Microsoft.Build.Tasks.Core.dll">
95+
<ParameterGroup>
96+
<InputFile ParameterType="System.String" Required="true" />
97+
<Pattern ParameterType="System.String" Required="true" />
98+
<NewValue ParameterType="System.String" Required="true" />
99+
<OutputFile ParameterType="System.String" />
100+
<Verbose ParameterType="System.Boolean" />
101+
</ParameterGroup>
102+
<Task>
103+
<Using Namespace="System" />
104+
<Using Namespace="System.IO" />
105+
<Using Namespace="System.Text" />
106+
<Using Namespace="System.Text.RegularExpressions" />
107+
<Code Type="Fragment" Language="C#">
108+
<![CDATA[
109+
if (File.Exists(InputFile)) {
110+
if (string.IsNullOrWhiteSpace(OutputFile))
111+
OutputFile = InputFile;
112+
var contentBefore = File.ReadAllText(InputFile, Encoding.UTF8);
113+
var contentAfter = Regex.Replace(contentBefore, Pattern, NewValue);
114+
if (contentAfter != contentBefore || OutputFile != InputFile) {
115+
File.WriteAllBytes(OutputFile, Encoding.UTF8.GetBytes(contentAfter));
116+
if (Verbose)
117+
Log.LogMessageFromText($"Replaced the pattern '{Pattern}' by the value '{NewValue}' on '{OutputFile}'!", MessageImportance.High);
118+
}
119+
} else
120+
Log.LogMessageFromText($"InputFile '{InputFile}' not found!", MessageImportance.High);
121+
]]>
122+
</Code>
123+
</Task>
124+
</UsingTask>
125+
81126
<ItemGroup>
82127
<None Remove="svgnetdoc.xml" />
83128
<None Include="..\README.md">
@@ -94,4 +139,5 @@
94139
</None>
95140
</ItemGroup>
96141

142+
97143
</Project>

SvgNetUnitTests/SvgNetUnitTests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
1414
<PackageReference Include="NUnit.Analyzers" Version="4.2.0">
1515
<PrivateAssets>all</PrivateAssets>
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
</PackageReference>
18-
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
18+
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0">
1919
<PrivateAssets>all</PrivateAssets>
2020
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2121
</PackageReference>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "7.0.100",
3+
"version": "8.0.303",
44
"allowPrerelease": false,
55
"rollForward": "latestMajor"
66
}

0 commit comments

Comments
 (0)