Browse Source

Merge pull request #604 from carbon/netcore21

Cross target NETCOREAPP2.1
af/merge-core
Anton Firsov 8 years ago
committed by GitHub
parent
commit
ae3ca2be4f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      appveyor.yml
  2. 5
      run-tests.ps1
  3. 29
      src/ImageSharp/Common/Extensions/StreamExtensions.cs
  4. 24
      src/ImageSharp/Common/Helpers/TestHelpers.cs
  5. 22
      src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs
  6. 7
      src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs
  7. 5
      src/ImageSharp/Formats/Bmp/BmpInfoHeader.cs
  8. 11
      src/ImageSharp/Formats/Gif/LzwDecoder.cs
  9. 9
      src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs
  10. 16
      src/ImageSharp/ImageSharp.csproj
  11. 21
      src/ImageSharp/MetaData/Profiles/Exif/ExifConstants.cs
  12. 25
      src/ImageSharp/MetaData/Profiles/Exif/ExifReader.cs
  13. 19
      src/ImageSharp/MetaData/Profiles/Exif/ExifWriter.cs
  14. 2
      src/ImageSharp/PixelFormats/Rgba1010102.cs
  15. 2
      src/ImageSharp/PixelFormats/Rgba32.cs
  16. 2
      src/ImageSharp/PixelFormats/Rgba64.cs
  17. 41
      src/ImageSharp/Primitives/DenseMatrix{T}.cs
  18. 19
      tests/ImageSharp.Tests/Drawing/Text/DrawTextOnImageTests.cs
  19. 1
      tests/ImageSharp.Tests/ImageSharp.Tests.csproj
  20. 21
      tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs
  21. 26
      tests/ImageSharp.Tests/TestUtilities/Tests/TestEnvironmentTests.cs

12
appveyor.yml

@ -1,18 +1,16 @@
version: 1.0.0.{build}
image: Visual Studio 2017 Preview
image: Visual Studio 2017
# prevent the double build when a branch has an active PR
skip_branch_with_pr: true
environment:
matrix:
### TODO: Enable the netcoreapp2.1 target when RC2 has been released!
#- target_framework: netcoreapp2.1
# is_32bit: False
- target_framework: netcoreapp2.1
is_32bit: False
#- target_framework: netcoreapp2.1
# is_32bit: True
- target_framework: netcoreapp2.1
is_32bit: True
- target_framework: netcoreapp2.0
is_32bit: False

5
run-tests.ps1

@ -75,6 +75,11 @@ else {
$xunitArgs += " --fx-version 2.0.0"
}
if ($targetFramework -eq "netcoreapp2.1") {
# There were issues matching the correct installed runtime if we do not specify it explicitly:
$xunitArgs += " --fx-version 2.1.0"
}
if ($is32Bit -eq "True") {
$xunitArgs += " -x86"
}

29
src/ImageSharp/Common/Extensions/StreamExtensions.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using System.Buffers;
using System;
using System.IO;
namespace SixLabors.ImageSharp
@ -11,6 +11,33 @@ namespace SixLabors.ImageSharp
/// </summary>
internal static class StreamExtensions
{
#if NETCOREAPP2_1
/// <summary>
/// Writes data from a stream into the provided buffer.
/// </summary>
/// <param name="stream">The stream.</param>
/// <param name="buffer">The buffer.</param>
/// <param name="offset">The offset within the buffer to begin writing.</param>
/// <param name="count">The number of bytes to write to the stream.</param>
public static void Write(this Stream stream, Span<byte> buffer, int offset, int count)
{
stream.Write(buffer.Slice(offset, count));
}
/// <summary>
/// Reads data from a stream into the provided buffer.
/// </summary>
/// <param name="stream">The stream.</param>
/// <param name="buffer">The buffer..</param>
/// <param name="offset">The offset within the buffer where the bytes are read into.</param>
/// <param name="count">The number of bytes, if available, to read.</param>
/// <returns>The actual number of bytes read.</returns>
public static int Read(this Stream stream, Span<byte> buffer, int offset, int count)
{
return stream.Read(buffer.Slice(offset, count));
}
#endif
/// <summary>
/// Skips the number of bytes in the given stream.
/// </summary>

24
src/ImageSharp/Common/Helpers/TestHelpers.cs

@ -0,0 +1,24 @@
// Copyright(c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Common.Helpers
{
/// <summary>
/// Internal utilities intended to be only used in tests.
/// </summary>
internal static class TestHelpers
{
/// <summary>
/// This constant is useful to verify the target framework ImageSharp has been built against.
/// Only intended to be used in tests!
/// </summary>
internal const string ImageSharpBuiltAgainst =
#if NETSTANDARD1_1
"netstandard1.1";
#elif NETCOREAPP2_1
"netcoreapp2.1";
#else
"netstandard2.0";
#endif
}
}

22
src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0.
using System;
using System.Buffers.Binary;
using System.IO;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.MetaData;
@ -251,7 +252,11 @@ namespace SixLabors.ImageSharp.Formats.Bmp
/// <param name="buffer">Buffer for uncompressed data.</param>
private void UncompressRle8(int w, Span<byte> buffer)
{
#if NETCOREAPP2_1
Span<byte> cmd = stackalloc byte[2];
#else
byte[] cmd = new byte[2];
#endif
int count = 0;
while (count < buffer.Length)
@ -475,12 +480,14 @@ namespace SixLabors.ImageSharp.Formats.Bmp
/// </summary>
private void ReadInfoHeader()
{
#if NETCOREAPP2_1
Span<byte> buffer = stackalloc byte[BmpInfoHeader.MaxHeaderSize];
#else
byte[] buffer = new byte[BmpInfoHeader.MaxHeaderSize];
#endif
this.stream.Read(buffer, 0, BmpInfoHeader.HeaderSizeSize); // read the header size
// read header size
this.stream.Read(buffer, 0, BmpInfoHeader.HeaderSizeSize);
int headerSize = BitConverter.ToInt32(buffer, 0);
int headerSize = BinaryPrimitives.ReadInt32LittleEndian(buffer);
if (headerSize < BmpInfoHeader.CoreSize)
{
throw new NotSupportedException($"ImageSharp does not support this BMP file. HeaderSize: {headerSize}.");
@ -504,7 +511,7 @@ namespace SixLabors.ImageSharp.Formats.Bmp
else if (headerSize >= BmpInfoHeader.Size)
{
// >= 40 bytes
this.infoHeader = BmpInfoHeader.Parse(buffer.AsSpan(0, 40));
this.infoHeader = BmpInfoHeader.Parse(buffer);
}
else
{
@ -520,8 +527,11 @@ namespace SixLabors.ImageSharp.Formats.Bmp
/// </summary>
private void ReadFileHeader()
{
#if NETCOREAPP2_1
Span<byte> buffer = stackalloc byte[BmpFileHeader.Size];
#else
byte[] buffer = new byte[BmpFileHeader.Size];
#endif
this.stream.Read(buffer, 0, BmpFileHeader.Size);
this.fileHeader = BmpFileHeader.Parse(buffer);

7
src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs

@ -66,8 +66,11 @@ namespace SixLabors.ImageSharp.Formats.Bmp
reserved: 0,
fileSize: 54 + infoHeader.ImageSize);
byte[] buffer = new byte[40]; // TODO: stackalloc
#if NETCOREAPP2_1
Span<byte> buffer = stackalloc byte[40];
#else
byte[] buffer = new byte[40];
#endif
fileHeader.WriteTo(buffer);
stream.Write(buffer, 0, BmpFileHeader.Size);

5
src/ImageSharp/Formats/Bmp/BmpInfoHeader.cs

@ -132,6 +132,11 @@ namespace SixLabors.ImageSharp.Formats.Bmp
/// <seealso href="https://msdn.microsoft.com/en-us/library/windows/desktop/dd183376.aspx"/>
public static BmpInfoHeader Parse(ReadOnlySpan<byte> data)
{
if (data.Length != Size)
{
throw new ArgumentException(nameof(data), $"Must be {Size} bytes. Was {data.Length} bytes.");
}
return MemoryMarshal.Cast<byte, BmpInfoHeader>(data)[0];
}

11
src/ImageSharp/Formats/Gif/LzwDecoder.cs

@ -112,7 +112,12 @@ namespace SixLabors.ImageSharp.Formats.Gif
Unsafe.Add(ref suffixRef, code) = (byte)code;
}
#if NETCOREAPP2_1
Span<byte> buffer = stackalloc byte[255];
#else
byte[] buffer = new byte[255];
#endif
while (xyz < length)
{
if (top == 0)
@ -221,15 +226,21 @@ namespace SixLabors.ImageSharp.Formats.Gif
/// The <see cref="int"/>.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#if NETCOREAPP2_1
private int ReadBlock(Span<byte> buffer)
#else
private int ReadBlock(byte[] buffer)
#endif
{
int bufferSize = this.stream.ReadByte();
if (bufferSize < 1)
{
return 0;
}
int count = this.stream.Read(buffer, 0, bufferSize);
return count != bufferSize ? 0 : bufferSize;
}

9
src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs

@ -1,6 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.IO;
using System.Runtime.CompilerServices;
@ -736,16 +737,16 @@ namespace SixLabors.ImageSharp.Formats.Jpeg
private void WriteStartOfFrame(int width, int height, int componentCount)
{
// "default" to 4:2:0
byte[] subsamples = { 0x22, 0x11, 0x11 };
byte[] chroma = { 0x00, 0x01, 0x01 };
Span<byte> subsamples = stackalloc byte[] { 0x22, 0x11, 0x11 };
Span<byte> chroma = stackalloc byte[] { 0x00, 0x01, 0x01 };
switch (this.subsample)
{
case JpegSubsample.Ratio444:
subsamples = new byte[] { 0x11, 0x11, 0x11 };
subsamples = stackalloc byte[] { 0x11, 0x11, 0x11 };
break;
case JpegSubsample.Ratio420:
subsamples = new byte[] { 0x22, 0x11, 0x11 };
subsamples = stackalloc byte[] { 0x22, 0x11, 0x11 };
break;
}

16
src/ImageSharp/ImageSharp.csproj

@ -5,7 +5,7 @@
<VersionPrefix Condition="$(packageversion) != ''">$(packageversion)</VersionPrefix>
<VersionPrefix Condition="$(packageversion) == ''">0.0.1</VersionPrefix>
<Authors>Six Labors and contributors</Authors>
<TargetFrameworks>netstandard1.1;netstandard1.3;netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard1.1;netstandard1.3;netstandard2.0;netcoreapp2.1</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>SixLabors.ImageSharp</AssemblyName>
@ -29,7 +29,7 @@
<DebugType Condition="$(codecov) == ''">portable</DebugType>
<DebugSymbols>True</DebugSymbols>
<Features>IOperation</Features>
<LangVersion>7.2</LangVersion>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Shared\*.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
@ -40,13 +40,21 @@
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta007">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' != 'netcoreapp2.1'">
<PackageReference Include="System.Buffers" Version="4.5.0" />
<PackageReference Include="System.Memory" Version="4.5.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.0" />
<PackageReference Include="System.Memory" Version="4.5.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<PackageReference Include="System.IO.UnmanagedMemoryStream" Version="4.3.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' OR '$(TargetFramework)' == 'netstandard1.3'">
<PackageReference Include="System.IO.Compression" Version="4.3.0" />
<PackageReference Include="System.Threading.Tasks.Parallel" Version="4.3.0" />

21
src/ImageSharp/MetaData/Profiles/Exif/ExifConstants.cs

@ -0,0 +1,21 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
{
internal static class ExifConstants
{
public static readonly byte[] Header = {
(byte)'E',
(byte)'x',
(byte)'i',
(byte)'f',
0x00,
0x00,
(byte)'I',
(byte)'I',
0x2A,
0x00,
};
}
}

25
src/ImageSharp/MetaData/Profiles/Exif/ExifReader.cs

@ -140,26 +140,25 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
private unsafe string ConvertToString(ReadOnlySpan<byte> buffer)
{
#if NETSTANDARD1_1
byte[] bytes = buffer.ToArray();
Span<byte> nullChar = stackalloc byte[1] { 0 };
string result = Encoding.UTF8.GetString(bytes, 0, buffer.Length);
int nullCharIndex = buffer.IndexOf(nullChar);
#else
string result;
if (nullCharIndex > -1)
{
buffer = buffer.Slice(0, nullCharIndex);
}
#if NETSTANDARD1_1
return Encoding.UTF8.GetString(buffer.ToArray(), 0, buffer.Length);
#elif NETCOREAPP2_1
return Encoding.UTF8.GetString(buffer);
#else
fixed (byte* pointer = &MemoryMarshal.GetReference(buffer))
{
result = Encoding.UTF8.GetString(pointer, buffer.Length);
return Encoding.UTF8.GetString(pointer, buffer.Length);
}
#endif
int nullCharIndex = result.IndexOf('\0');
if (nullCharIndex != -1)
{
result = result.Substring(0, nullCharIndex);
}
return result;
}
/// <summary>

19
src/ImageSharp/MetaData/Profiles/Exif/ExifWriter.cs

@ -90,16 +90,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
byte[] result = new byte[length];
result[0] = (byte)'E';
result[1] = (byte)'x';
result[2] = (byte)'i';
result[3] = (byte)'f';
result[4] = 0x00;
result[5] = 0x00;
result[6] = (byte)'I';
result[7] = (byte)'I';
result[8] = 0x2A;
result[9] = 0x00;
ExifConstants.Header.AsSpan().CopyTo(result); // 0-9
int i = 10;
uint ifdOffset = ((uint)i - StartIndex) + 4;
@ -250,7 +241,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
return length;
}
private int WriteArray(ExifValue value, byte[] destination, int offset)
private int WriteArray(ExifValue value, Span<byte> destination, int offset)
{
if (value.DataType == ExifDataType.Ascii)
{
@ -266,7 +257,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
return newOffset;
}
private int WriteData(List<int> indexes, byte[] destination, int offset)
private int WriteData(List<int> indexes, Span<byte> destination, int offset)
{
if (this.dataOffsets.Count == 0)
{
@ -289,7 +280,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
return newOffset;
}
private int WriteHeaders(List<int> indexes, byte[] destination, int offset)
private int WriteHeaders(List<int> indexes, Span<byte> destination, int offset)
{
this.dataOffsets = new List<int>();
@ -370,7 +361,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
}
}
private int WriteValue(ExifValue value, byte[] destination, int offset)
private int WriteValue(ExifValue value, Span<byte> destination, int offset)
{
if (value.IsArray && value.DataType != ExifDataType.Ascii)
{

2
src/ImageSharp/PixelFormats/Rgba1010102.cs

@ -188,7 +188,7 @@ namespace SixLabors.ImageSharp.PixelFormats
/// <inheritdoc />
public override bool Equals(object obj)
{
return (obj is Rgba1010102) && this.Equals((Rgba1010102)obj);
return obj is Rgba1010102 other && this.Equals(other);
}
/// <inheritdoc />

2
src/ImageSharp/PixelFormats/Rgba32.cs

@ -387,7 +387,7 @@ namespace SixLabors.ImageSharp.PixelFormats
/// <inheritdoc/>
public override bool Equals(object obj)
{
return (obj is Rgba32) && this.Equals((Rgba32)obj);
return obj is Rgba32 other && this.Equals(other);
}
/// <inheritdoc/>

2
src/ImageSharp/PixelFormats/Rgba64.cs

@ -187,7 +187,7 @@ namespace SixLabors.ImageSharp.PixelFormats
/// <inheritdoc />
public override bool Equals(object obj)
{
return (obj is Rgba64) && this.Equals((Rgba64)obj);
return obj is Rgba64 other && this.Equals(other);
}
/// <inheritdoc />

41
src/ImageSharp/Primitives/DenseMatrix{T}.cs

@ -89,6 +89,11 @@ namespace SixLabors.ImageSharp.Primitives
}
}
/// <summary>
/// Gets a Span wrapping the Data.
/// </summary>
internal Span<T> Span => new Span<T>(this.Data);
/// <summary>
/// Gets or sets the item at the specified position.
/// </summary>
@ -146,19 +151,13 @@ namespace SixLabors.ImageSharp.Primitives
/// </summary>
/// <param name="value">The value to fill each item with</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Fill(T value)
{
for (int i = 0; i < this.Data.Length; i++)
{
this.Data[i] = value;
}
}
public void Fill(T value) => this.Span.Fill(value);
/// <summary>
/// Clears the matrix setting each value to the default value for the element type
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Clear() => Array.Clear(this.Data, 0, this.Data.Length);
public void Clear() => this.Span.Clear();
/// <summary>
/// Checks the coordinates to ensure they are within bounds.
@ -183,28 +182,10 @@ namespace SixLabors.ImageSharp.Primitives
}
/// <inheritdoc/>
public bool Equals(DenseMatrix<T> other)
{
if (this.Columns != other.Columns)
{
return false;
}
if (this.Rows != other.Rows)
{
return false;
}
for (int i = 0; i < this.Data.Length; i++)
{
if (!this.Data[i].Equals(other.Data[i]))
{
return false;
}
}
return true;
}
public bool Equals(DenseMatrix<T> other) =>
this.Columns == other.Columns &&
this.Rows == other.Rows &&
this.Span.SequenceEqual(other.Span);
/// <inheritdoc/>
public override bool Equals(object obj) => obj is DenseMatrix<T> other && this.Equals(other);

19
tests/ImageSharp.Tests/Drawing/Text/DrawTextOnImageTests.cs

@ -1,29 +1,22 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using System.Numerics;
using System;
using System.Linq;
using System.Text;
using SixLabors.Fonts;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.Processing.Drawing;
using SixLabors.ImageSharp.Processing.Drawing.Pens;
using SixLabors.ImageSharp.Processing.Text;
using SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison;
using SixLabors.Primitives;
using Xunit;
// ReSharper disable InconsistentNaming
namespace SixLabors.ImageSharp.Tests.Drawing.Text
{
using System;
using System.Linq;
using System.Text;
using SixLabors.ImageSharp.Processing.Drawing.Brushes;
using SixLabors.ImageSharp.Processing.Drawing.Brushes.GradientBrushes;
using SixLabors.ImageSharp.Processing.Drawing.Pens;
using SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison;
using SixLabors.Primitives;
using SixLabors.Shapes;
[GroupOutput("Drawing/Text")]
public class DrawTextOnImageTests
{

1
tests/ImageSharp.Tests/ImageSharp.Tests.csproj

@ -25,6 +25,7 @@
<ItemGroup>
<None Include="PixelFormats\PixelOperationsTests.Blender.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
<PackageReference Include="System.Drawing.Common" Version="4.5.0" />

21
tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs

@ -30,6 +30,13 @@ namespace SixLabors.ImageSharp.Tests
return Boolean.TryParse(Environment.GetEnvironmentVariable("CI"), out isCi) && isCi;
});
private static readonly Lazy<string> NetCoreVersionLazy = new Lazy<string>(GetNetCoreVersion);
/// <summary>
/// Gets the .NET Core version, if running on .NET Core, otherwise returns an empty string.
/// </summary>
internal static string NetCoreVersion => NetCoreVersionLazy.Value;
// ReSharper disable once InconsistentNaming
/// <summary>
/// Gets a value indicating whether test execution runs on CI.
@ -123,5 +130,19 @@ namespace SixLabors.ImageSharp.Tests
return path;
}
/// <summary>
/// Solution borrowed from:
/// https://github.com/dotnet/BenchmarkDotNet/issues/448#issuecomment-308424100
/// </summary>
private static string GetNetCoreVersion()
{
Assembly assembly = typeof(System.Runtime.GCSettings).GetTypeInfo().Assembly;
string[] assemblyPath = assembly.CodeBase.Split(new[] { '/', '\\' }, StringSplitOptions.RemoveEmptyEntries);
int netCoreAppIndex = Array.IndexOf(assemblyPath, "Microsoft.NETCore.App");
if (netCoreAppIndex > 0 && netCoreAppIndex < assemblyPath.Length - 2)
return assemblyPath[netCoreAppIndex + 1];
return "";
}
}
}

26
tests/ImageSharp.Tests/TestUtilities/Tests/TestEnvironmentTests.cs

@ -4,6 +4,7 @@
using System;
using System.IO;
using SixLabors.ImageSharp.Common.Helpers;
using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.Formats.Bmp;
using SixLabors.ImageSharp.Formats.Gif;
@ -13,9 +14,11 @@ using SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs;
using Xunit;
using Xunit.Abstractions;
// ReSharper disable InconsistentNaming
namespace SixLabors.ImageSharp.Tests
{
public class TestEnvironmentTests
{
public TestEnvironmentTests(ITestOutputHelper output)
@ -31,6 +34,29 @@ namespace SixLabors.ImageSharp.Tests
Assert.True(Directory.Exists(path));
}
/// <summary>
/// We need this test to make sure that the netcoreapp2.1 test execution actually covers the netcoreapp2.1 build configuration of ImageSharp.
/// </summary>
[Fact]
public void ImageSharpAssemblyUnderTest_MatchesExpectedTargetFramework()
{
this.Output.WriteLine("NetCoreVersion: " + TestEnvironment.NetCoreVersion);
this.Output.WriteLine("ImageSharpBuiltAgainst: " + TestHelpers.ImageSharpBuiltAgainst);
if (string.IsNullOrEmpty(TestEnvironment.NetCoreVersion))
{
this.Output.WriteLine("Not running under .NET Core!");
}
else if (TestEnvironment.NetCoreVersion.StartsWith("2.1"))
{
Assert.Equal("netcoreapp2.1", TestHelpers.ImageSharpBuiltAgainst);
}
else
{
Assert.Equal("netstandard2.0", TestHelpers.ImageSharpBuiltAgainst);
}
}
[Fact]
public void SolutionDirectoryFullPath()
{

Loading…
Cancel
Save