Skip to content

Commit

Permalink
Bumped System.Numerics.Vectors and ImageSharp
Browse files Browse the repository at this point in the history
Fixes #241

Due to some complicated diamond dependency problems I do not really understand, there was a conflict with the version of System.Numerics.Vectors. ImageSharp required a version shipped only in .NET Standard, which we did not have access to.

The only solution I could find was to move to the larest dev build of ImageSharp, which changed this dependency.

This change includes app binding redirects, ImageSharp API updates, and a few tweaks to the reflection type load exception formatter so that it now outputs fusion logs.

Still need to check that tests pass.
  • Loading branch information
atruskie committed Jul 4, 2019
1 parent 429177e commit fdea07e
Show file tree
Hide file tree
Showing 21 changed files with 309 additions and 238 deletions.
21 changes: 19 additions & 2 deletions src/Acoustics.Shared/Acoustics.Shared.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\Microsoft.Net.Compilers.Toolset.3.1.0\build\Microsoft.Net.Compilers.Toolset.props" Condition="Exists('..\..\packages\Microsoft.Net.Compilers.Toolset.3.1.0\build\Microsoft.Net.Compilers.Toolset.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand Down Expand Up @@ -140,6 +141,21 @@
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="SixLabors.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\SixLabors.Core.1.0.0-dev000101\lib\netstandard2.0\SixLabors.Core.dll</HintPath>
</Reference>
<Reference Include="SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\SixLabors.Fonts.1.0.0-beta0008\lib\netstandard2.0\SixLabors.Fonts.dll</HintPath>
</Reference>
<Reference Include="SixLabors.ImageSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\SixLabors.ImageSharp.1.0.0-dev002762\lib\netstandard2.0\SixLabors.ImageSharp.dll</HintPath>
</Reference>
<Reference Include="SixLabors.ImageSharp.Drawing, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\SixLabors.ImageSharp.Drawing.1.0.0-dev002762\lib\netstandard2.0\SixLabors.ImageSharp.Drawing.dll</HintPath>
</Reference>
<Reference Include="SixLabors.Shapes, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\SixLabors.Shapes.1.0.0-beta0008\lib\netstandard2.0\SixLabors.Shapes.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
Expand All @@ -154,8 +170,8 @@
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.1\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
Expand Down Expand Up @@ -294,6 +310,7 @@
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.Net.Compilers.Toolset.3.1.0\build\Microsoft.Net.Compilers.Toolset.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Net.Compilers.Toolset.3.1.0\build\Microsoft.Net.Compilers.Toolset.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
224 changes: 114 additions & 110 deletions src/Acoustics.Shared/app.config

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/Acoustics.Shared/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@
<package id="Microsoft.Extensions.FileProviders.Physical" version="2.2.0-preview3-35497" targetFramework="net462" />
<package id="Microsoft.Extensions.FileSystemGlobbing" version="2.2.0-preview3-35497" targetFramework="net462" />
<package id="Microsoft.Extensions.Primitives" version="2.2.0-preview3-35497" targetFramework="net462" />
<package id="Microsoft.Net.Compilers.Toolset" version="3.1.0" targetFramework="net462" developmentDependency="true" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net462" />
<package id="SixLabors.Core" version="1.0.0-dev000101" targetFramework="net462" />
<package id="SixLabors.Fonts" version="1.0.0-beta0008" targetFramework="net462" />
<package id="SixLabors.ImageSharp" version="1.0.0-dev002762" targetFramework="net462" />
<package id="SixLabors.ImageSharp.Drawing" version="1.0.0-dev002762" targetFramework="net462" />
<package id="SixLabors.Shapes" version="1.0.0-beta0008" targetFramework="net462" />
<package id="StyleCop.Analyzers" version="1.1.1-beta.61" targetFramework="net462" developmentDependency="true" />
<package id="StyleCop.Analyzers.Unstable" version="1.1.1.61" targetFramework="net462" developmentDependency="true" />
<package id="System.Buffers" version="4.4.0" targetFramework="net462" />
<package id="System.Memory" version="4.5.1" targetFramework="net462" />
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net462" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net462" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.1" targetFramework="net462" />
<package id="System.ValueTuple" version="4.4.0-preview2-25405-01" targetFramework="net462" />
<package id="YamlDotNet" version="5.3.0" targetFramework="net462" />
Expand Down
36 changes: 20 additions & 16 deletions src/Acoustics.Tools/app.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!--
Note: Add entries to the App.config file for configuration settings
that apply only to the Test project.
Expand All @@ -11,33 +11,37 @@
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Ninject" publicKeyToken="c7192dc5380945e7" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
<assemblyIdentity name="Ninject" publicKeyToken="c7192dc5380945e7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="AForge" publicKeyToken="c1db6ff4eaa06aeb" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.2.4.0" newVersion="2.2.4.0"/>
<assemblyIdentity name="AForge" publicKeyToken="c1db6ff4eaa06aeb" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.4.0" newVersion="2.2.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="AForge.Math" publicKeyToken="abba2e25397ee8c9" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.2.4.0" newVersion="2.2.4.0"/>
<assemblyIdentity name="AForge.Math" publicKeyToken="abba2e25397ee8c9" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.4.0" newVersion="2.2.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.4.0.0" newVersion="4.4.0.0"/>
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.4.0.0" newVersion="4.4.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="log4net" publicKeyToken="1b44e1d426115821" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.2.10.0" newVersion="1.2.11.0"/>
<assemblyIdentity name="log4net" publicKeyToken="1b44e1d426115821" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.10.0" newVersion="1.2.11.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration>
1 change: 1 addition & 0 deletions src/Acoustics.Unsafe/Acoustics.Unsafe.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
Expand Down
11 changes: 11 additions & 0 deletions src/Acoustics.Unsafe/app.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
20 changes: 12 additions & 8 deletions src/AnalysisBase/app.config
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="YamlDotNet" publicKeyToken="2b53052c5884d7a1" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.0.1.21004" newVersion="2.0.1.21004"/>
<assemblyIdentity name="YamlDotNet" publicKeyToken="2b53052c5884d7a1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.1.21004" newVersion="2.0.1.21004" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0"/>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0"/>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration>
8 changes: 5 additions & 3 deletions src/AnalysisPrograms/AnalysisPrograms.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\Microsoft.Net.Compilers.Toolset.3.1.0\build\Microsoft.Net.Compilers.Toolset.props" Condition="Exists('..\..\packages\Microsoft.Net.Compilers.Toolset.3.1.0\build\Microsoft.Net.Compilers.Toolset.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand Down Expand Up @@ -120,16 +121,16 @@
<HintPath>..\..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
</Reference>
<Reference Include="SixLabors.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\SixLabors.Core.1.0.0-beta0007\lib\netstandard2.0\SixLabors.Core.dll</HintPath>
<HintPath>..\..\packages\SixLabors.Core.1.0.0-dev000101\lib\netstandard2.0\SixLabors.Core.dll</HintPath>
</Reference>
<Reference Include="SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\SixLabors.Fonts.1.0.0-beta0008\lib\netstandard2.0\SixLabors.Fonts.dll</HintPath>
</Reference>
<Reference Include="SixLabors.ImageSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\SixLabors.ImageSharp.1.0.0-beta0006\lib\netstandard2.0\SixLabors.ImageSharp.dll</HintPath>
<HintPath>..\..\packages\SixLabors.ImageSharp.1.0.0-dev002762\lib\netstandard2.0\SixLabors.ImageSharp.dll</HintPath>
</Reference>
<Reference Include="SixLabors.ImageSharp.Drawing, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\SixLabors.ImageSharp.Drawing.1.0.0-beta0006\lib\netstandard2.0\SixLabors.ImageSharp.Drawing.dll</HintPath>
<HintPath>..\..\packages\SixLabors.ImageSharp.Drawing.1.0.0-dev002762\lib\netstandard2.0\SixLabors.ImageSharp.Drawing.dll</HintPath>
</Reference>
<Reference Include="SixLabors.Shapes, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\SixLabors.Shapes.1.0.0-beta0008\lib\netstandard2.0\SixLabors.Shapes.dll</HintPath>
Expand Down Expand Up @@ -527,6 +528,7 @@
<Error Condition="!Exists('..\..\packages\SQLitePCLRaw.lib.e_sqlite3.osx.1.1.9\build\net35\SQLitePCLRaw.lib.e_sqlite3.osx.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\SQLitePCLRaw.lib.e_sqlite3.osx.1.1.9\build\net35\SQLitePCLRaw.lib.e_sqlite3.osx.targets'))" />
<Error Condition="!Exists('..\..\packages\SQLitePCLRaw.lib.e_sqlite3.v110_xp.1.1.9\build\net35\SQLitePCLRaw.lib.e_sqlite3.v110_xp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\SQLitePCLRaw.lib.e_sqlite3.v110_xp.1.1.9\build\net35\SQLitePCLRaw.lib.e_sqlite3.v110_xp.targets'))" />
<Error Condition="!Exists('..\..\packages\Accord.3.8.0\build\Accord.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Accord.3.8.0\build\Accord.targets'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.Net.Compilers.Toolset.3.1.0\build\Microsoft.Net.Compilers.Toolset.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Net.Compilers.Toolset.3.1.0\build\Microsoft.Net.Compilers.Toolset.props'))" />
</Target>
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
<Import Project="..\..\packages\MSBuildTasks.1.5.0.235\build\MSBuildTasks.targets" Condition="Exists('..\..\packages\MSBuildTasks.1.5.0.235\build\MSBuildTasks.targets')" />
Expand Down
2 changes: 1 addition & 1 deletion src/AnalysisPrograms/CheckEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private int Execute(Arguments arguments)
}
catch (ReflectionTypeLoadException rtlex)
{
errors.Add(ExceptionLookup.FormatReflectionTypeLoadException(rtlex));
errors.Add(ExceptionLookup.FormatReflectionTypeLoadException(rtlex, true));
}

// master audio utility checks for available executables
Expand Down
10 changes: 5 additions & 5 deletions src/AnalysisPrograms/Draw/RibbonPlots/RibbonPlot.Entry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ private static Image<Rgb24> CreateRibbonPlot(
var finalWidth = ribbonLeft + estimatedWidth + HorizontalPadding;

// create a new image!
var image = new Image<Rgb24>(Configuration.Default, finalWidth, finalHeight, NamedColors<Rgb24>.White);
var image = new Image<Rgb24>(Configuration.Default, finalWidth, finalHeight, Color.White);

// draw labels and voids
Log.Debug("Rendering labels and backgrounds");
Expand All @@ -206,16 +206,16 @@ private static Image<Rgb24> CreateRibbonPlot(
var bottom = Padding + ((Padding + ribbonHeight) * stats.Buckets);
context.DrawLines(
new GraphicsOptions(false),
Pens.Solid(NamedColors<Rgb24>.Red, 1),
Pens.Solid(Color.Red, 1),
new PointF(left, top),
new PointF(left, bottom));
});

var bucketDate = stats.Start;
var textGraphics = new TextGraphicsOptions(true)
{ HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Center };
var textColor = NamedColors<Rgb24>.Black;
var voidColor = NamedColors<Rgb24>.Gray;
var textColor = Color.Black;
var voidColor = Color.Gray;
for (var b = 0; b < stats.Buckets; b++)
{
if (Log.IsVerboseEnabled())
Expand All @@ -228,7 +228,7 @@ private static Image<Rgb24> CreateRibbonPlot(

image.Mutate(Operation);

void Operation(IImageProcessingContext<Rgb24> context)
void Operation(IImageProcessingContext context)
{
var y = Padding + ((Padding + ribbonHeight) * b);

Expand Down
2 changes: 1 addition & 1 deletion src/AnalysisPrograms/MainEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static partial class MainEntry

public static async Task<int> Main(string[] args)
{
ParseEnvirionemnt();
ParseEnvironment();

// Uses an env var to attach debugger before argument parsing
AttachDebugger(ApAutoAttach ? DebugOptions.YesSilent : DebugOptions.No);
Expand Down
Loading

0 comments on commit fdea07e

Please sign in to comment.