Skip to content

Commit d77e534

Browse files
committed
Switch to .netstandard2.0
1 parent 4340975 commit d77e534

File tree

9 files changed

+69
-69
lines changed

9 files changed

+69
-69
lines changed

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project>
22
<PropertyGroup>
3-
<ReleaseVersion>2.2.0.0</ReleaseVersion>
3+
<ReleaseVersion>2.3.0.0</ReleaseVersion>
44
<RepositoryUrl>https://github.com/mono/taglib-sharp</RepositoryUrl>
55
<RepositoryType>git</RepositoryType>
6-
<TaglibSharpTargetFramework>net45;netstandard2.0</TaglibSharpTargetFramework>
6+
<TaglibSharpTargetFramework>netstandard2.0</TaglibSharpTargetFramework>
77
<LangVersion>latest</LangVersion>
88
</PropertyGroup>
99
</Project>

examples/ReadFromUri/ReadFromUri.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PropertyGroup>
55
<OutputType>Exe</OutputType>
66
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
7-
<TargetFrameworks>$(TaglibSharpTargetFramework)</TargetFrameworks>
7+
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
88
</PropertyGroup>
99

1010
<ItemGroup>

examples/SetPictures/SetPictures.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PropertyGroup>
55
<OutputType>Exe</OutputType>
66
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
7-
<TargetFrameworks>$(TaglibSharpTargetFramework)</TargetFrameworks>
7+
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
88
</PropertyGroup>
99

1010
<ItemGroup>

src/Debug/Debug.csproj

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>$(TaglibSharpTargetFramework)</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
55
<OutputType>Exe</OutputType>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<None Remove="Makefile.am" />
1010
</ItemGroup>
1111

12-
<ItemGroup>
13-
<Folder Include="Properties\" />
14-
</ItemGroup>
15-
1612
<ItemGroup>
1713
<ProjectReference Include="..\TaglibSharp\TaglibSharp.csproj" />
1814
</ItemGroup>

src/TaglibSharp.Tests/FileFormats/StandardTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ public static void WriteStandardPictures (string sample_file, string tmp_file,
5353
if (System.IO.File.Exists (tmp_file))
5454
System.IO.File.Delete (tmp_file);
5555

56-
File file;
5756
System.IO.File.Copy (sample_file, tmp_file);
58-
file = File.Create (tmp_file, readStyle);
57+
var file = File.Create (tmp_file, readStyle);
5958
Assert.NotNull (file);
6059

6160
var pics = file.Tag.Pictures;

src/TaglibSharp.Tests/Images/Validators/ImageTest.cs

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
using Gdk;
2-
using NUnit.Framework;
31
using System;
2+
using System.Runtime.InteropServices;
3+
4+
using NUnit.Framework;
5+
6+
using SixLabors.ImageSharp;
7+
using SixLabors.ImageSharp.Advanced;
8+
49
using TagLib;
510

611
namespace TaglibSharp.Tests.Images.Validators
712
{
813
public class ImageTest
914
{
10-
static ImageTest ()
11-
{
12-
// Initialize GDK
13-
var args = Environment.GetCommandLineArgs ();
14-
Global.InitCheck (ref args);
15-
}
16-
1715
string pre_hash;
1816
string post_hash;
1917

@@ -142,11 +140,19 @@ string ReadImageData (TagLib.Image.File file)
142140

143141
file.Mode = File.AccessMode.Read;
144142
var v = file.ReadBlock ((int)file.Length);
145-
byte[] result = null;
146-
using (var buf = new Pixbuf (v.Data))
147-
result = buf.SaveToBuffer ("png");
143+
string md5Sum;
144+
145+
if (file.MimeType == "taglib/tiff") {
146+
// TODO, ImageSharp doesn't support tiff yet (4/25/2020): https://github.com/SixLabors/ImageSharp/issues/12
147+
md5Sum = "";// Utils.Md5Encode (v.Data);
148+
} else {
149+
using var image = Image.Load (v.Data);
150+
byte[] result = MemoryMarshal.AsBytes (image.GetPixelSpan ()).ToArray ();
151+
md5Sum = Utils.Md5Encode (result);
152+
}
153+
148154
file.Mode = File.AccessMode.Closed;
149-
return Utils.Md5Encode (result);
155+
return md5Sum;
150156
}
151157

152158
void ValidateImageData ()

src/TaglibSharp.Tests/MainWindow.cs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,41 @@
22

33
namespace TaglibSharp.Tests
44
{
5-
public class MainWindow : Window
6-
{
7-
static void Main (string[] args)
8-
{
9-
Application.Init ();
5+
//public class MainWindow : Window
6+
//{
7+
//static void Main (string[] args)
8+
//{
9+
// Application.Init ();
1010

11-
new MainWindow ();
11+
// new MainWindow ();
1212

13-
Application.Run ();
14-
}
13+
// Application.Run ();
14+
//}
1515

16-
public MainWindow () : base ("MainWindow")
17-
{
18-
// Setup ui
19-
var textview = new TextView ();
20-
Add (textview);
16+
//public MainWindow () : base ("MainWindow")
17+
//{
18+
// // Setup ui
19+
// var textview = new TextView ();
20+
// Add (textview);
2121

22-
// Setup tag
23-
var tag = new TextTag ("helloworld-tag") {
24-
Scale = Pango.Scale.XXLarge,
25-
Style = Pango.Style.Italic,
26-
Underline = Pango.Underline.Double,
27-
Foreground = "blue",
28-
Background = "pink",
29-
Justification = Justification.Center
30-
};
31-
var buffer = textview.Buffer;
32-
buffer.TagTable.Add (tag);
22+
// // Setup tag
23+
// var tag = new TextTag ("helloworld-tag") {
24+
// Scale = Pango.Scale.XXLarge,
25+
// Style = Pango.Style.Italic,
26+
// Underline = Pango.Underline.Double,
27+
// Foreground = "blue",
28+
// Background = "pink",
29+
// Justification = Justification.Center
30+
// };
31+
// var buffer = textview.Buffer;
32+
// buffer.TagTable.Add (tag);
3333

34-
// Insert "Hello world!" into textview buffer
35-
var insertIter = buffer.StartIter;
36-
buffer.InsertWithTagsByName (ref insertIter, "Hello World!\n", "helloworld-tag");
37-
buffer.Insert (ref insertIter, "Simple Hello World!");
34+
// // Insert "Hello world!" into textview buffer
35+
// var insertIter = buffer.StartIter;
36+
// buffer.InsertWithTagsByName (ref insertIter, "Hello World!\n", "helloworld-tag");
37+
// buffer.Insert (ref insertIter, "Simple Hello World!");
3838

39-
ShowAll ();
40-
}
41-
}
39+
// ShowAll ();
40+
//}
41+
//}
4242
}
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<Project Sdk="Microsoft.NET.Sdk">
32

43
<PropertyGroup>
5-
<TargetFrameworks>net461</TargetFrameworks>
4+
<TargetFrameworks>net461;netcoreapp3.1</TargetFrameworks>
65
<IsPackable>false</IsPackable>
76
<PlatformTarget>x86</PlatformTarget>
87
</PropertyGroup>
98

109
<ItemGroup>
11-
<ProjectReference Include="..\TaglibSharp\TaglibSharp.csproj">
12-
<Project>{6B143A39-C7B2-4743-9917-92262C60E9A6}</Project>
13-
<Name>taglib-sharp</Name>
14-
</ProjectReference>
10+
<ProjectReference Include="..\TaglibSharp\TaglibSharp.csproj" />
1511
</ItemGroup>
1612

1713
<ItemGroup>
1814
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
1915
</ItemGroup>
2016

2117
<ItemGroup>
22-
<PackageReference Include="GtkSharp" Version="3.1.2" />
23-
<PackageReference Include="GtkSharp.Win32" Version="3.1.2" />
24-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
18+
<PackageReference Include="GtkSharp" Version="3.22.25.74" />
19+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
2520
<PackageReference Include="NUnit" Version="3.12.0" />
26-
<PackageReference Include="NUnit.ConsoleRunner" Version="3.10.0" />
27-
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
21+
<PackageReference Include="NUnit.ConsoleRunner" Version="3.11.1" />
22+
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1">
23+
<PrivateAssets>all</PrivateAssets>
24+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
25+
</PackageReference>
26+
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-beta0007" />
2827
</ItemGroup>
2928

3029
</Project>

src/TaglibSharp/TaglibSharp.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>$(TaglibSharpTargetFramework)</TargetFrameworks>
@@ -19,7 +19,7 @@
1919
<PackageId>TagLibSharp</PackageId>
2020
<Product>TagLib#</Product>
2121
<Description>A library for for reading and writing metadata in media files, including video, audio, and photo formats.</Description>
22-
<Copyright>Copyright (c) 2006-2007 Brian Nickel. Copyright (c) 2009-2019 Other contributors</Copyright>
22+
<Copyright>Copyright (c) 2006-2007 Brian Nickel. Copyright (c) 2009-2020 Other contributors</Copyright>
2323
<Authors>Brian Nickel, Gabriel Burt, Stephen Shaw, etc</Authors>
2424
<PackageProjectUrl>https://github.com/mono/taglib-sharp</PackageProjectUrl>
2525
<PackageLicenseExpression>LGPL-2.1-only</PackageLicenseExpression>

0 commit comments

Comments
 (0)