Use custom signed build of Markdown.Wpf

StrongNameSigner is not doing enough when signing unsigned assemblies to allow xaml to properly reference signed assemblies, and things fail at runtime.

Markdig has a signed version of their package, so we're reverting to a custom build of Markdig.Wpf - https://github.com/editor-tools/markdig-wpf/releases/tag/v0.2.1 - that references the Markdig.Signed package and is also signed.

Also add ProvideCodeBase to ensure that these DLLs are found at runtime.
This commit is contained in:
Andreia Gaita 2017-08-03 23:59:40 +02:00
Родитель 2acec7c441
Коммит b8b803ff16
9 изменённых файлов: 20 добавлений и 28 удалений

Двоичные данные
lib/Markdig.Wpf.Signed.0.2.1.nupkg Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -213,12 +213,12 @@
<HintPath>..\..\packages\LibGit2Sharp.0.22.0\lib\net40\LibGit2Sharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Markdig, Version=0.12.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Markdig.0.12.3\lib\net40\Markdig.dll</HintPath>
<Reference Include="Markdig, Version=0.13.0.0, Culture=neutral, PublicKeyToken=870da25a133885f8, processorArchitecture=MSIL">
<HintPath>..\..\packages\Markdig.Signed.0.13.0\lib\net40\Markdig.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Markdig.Wpf, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Markdig.Wpf.0.2.0\lib\net45\Markdig.Wpf.dll</HintPath>
<Reference Include="Markdig.Wpf, Version=0.2.1.0, Culture=neutral, PublicKeyToken=a0d0cdbebd8d164b, processorArchitecture=MSIL">
<HintPath>..\..\packages\Markdig.Wpf.Signed.0.2.1\lib\net452\Markdig.Wpf.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build.Framework" />
@ -426,7 +426,6 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != '' And '$(NCrunch)' != '1'" />
<Import Project="..\common\StrongNameSign.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<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>

Просмотреть файл

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Brutal.Dev.StrongNameSigner" version="2.1.3" targetFramework="net461" />
<package id="LibGit2Sharp" version="0.22.0" targetFramework="net461" />
<package id="LibGit2Sharp.NativeBinaries" version="1.0.129" targetFramework="net461" />
<package id="Markdig" version="0.12.3" targetFramework="net461" />
<package id="Markdig.Wpf" version="0.2.0" targetFramework="net461" />
<package id="Markdig.Signed" version="0.13.0" targetFramework="net461" />
<package id="Markdig.Wpf.Signed" version="0.2.1" targetFramework="net461" />
<package id="Microsoft.VisualStudio.CoreUtility" version="14.3.25407" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Editor" version="14.3.25407" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Imaging" version="14.3.25407" targetFramework="net452" />

Просмотреть файл

@ -35,12 +35,12 @@
</PropertyGroup>
<Import Project="$(SolutionDir)\src\common\signing.props" />
<ItemGroup>
<Reference Include="Markdig, Version=0.12.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Markdig.0.12.3\lib\net40\Markdig.dll</HintPath>
<Reference Include="Markdig, Version=0.13.0.0, Culture=neutral, PublicKeyToken=870da25a133885f8, processorArchitecture=MSIL">
<HintPath>..\..\packages\Markdig.Signed.0.13.0\lib\net40\Markdig.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Markdig.Wpf, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Markdig.Wpf.0.2.0\lib\net45\Markdig.Wpf.dll</HintPath>
<Reference Include="Markdig.Wpf, Version=0.2.1.0, Culture=neutral, PublicKeyToken=a0d0cdbebd8d164b, processorArchitecture=MSIL">
<HintPath>..\..\packages\Markdig.Wpf.Signed.0.2.1\lib\net452\Markdig.Wpf.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.14.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
@ -220,7 +220,6 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\common\StrongNameSign.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<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>

Просмотреть файл

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Brutal.Dev.StrongNameSigner" version="2.1.3" targetFramework="net461" />
<package id="Markdig" version="0.12.3" targetFramework="net461" />
<package id="Markdig.Wpf" version="0.2.0" targetFramework="net461" />
<package id="Markdig.Signed" version="0.13.0" targetFramework="net461" />
<package id="Markdig.Wpf.Signed" version="0.2.1" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Shell.14.0" version="14.3.25407" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Shell.Immutable.11.0" version="11.0.50727" targetFramework="net461" />
</packages>

Просмотреть файл

@ -2,7 +2,6 @@
using System.IO;
using System.Linq;
using System.Reflection;
using System.Diagnostics;
using System.Globalization;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio;
@ -12,10 +11,8 @@ namespace GitHub.VisualStudio
{
// This is the Git service GUID, which fires early and is used by GitHubService.
//[ProvideAutoLoad(Guids.GitSccProviderId)]
// This fires before ShellInitialized and SolutionExists.
//[ProvideAutoLoad(VSConstants.UICONTEXT.NoSolution_string)]
[Guid(GuidList.guidAssemblyResolverPkgString)]
public class AssemblyResolverPackage : Package
{
@ -71,7 +68,6 @@ namespace GitHub.VisualStudio
{
return null;
}
}
return Assembly.LoadFrom(filename);

Просмотреть файл

@ -94,12 +94,12 @@
<HintPath>..\..\packages\LibGit2Sharp.0.22.0\lib\net40\LibGit2Sharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Markdig, Version=0.12.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Markdig.0.12.3\lib\net40\Markdig.dll</HintPath>
<Reference Include="Markdig, Version=0.13.0.0, Culture=neutral, PublicKeyToken=870da25a133885f8, processorArchitecture=MSIL">
<HintPath>..\..\packages\Markdig.Signed.0.13.0\lib\net40\Markdig.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Markdig.Wpf, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Markdig.Wpf.0.2.0\lib\net45\Markdig.Wpf.dll</HintPath>
<Reference Include="Markdig.Wpf, Version=0.2.1.0, Culture=neutral, PublicKeyToken=a0d0cdbebd8d164b, processorArchitecture=MSIL">
<HintPath>..\..\packages\Markdig.Wpf.Signed.0.2.1\lib\net452\Markdig.Wpf.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
@ -702,7 +702,6 @@
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != '' And '$(NCrunch)' != '1'" />
<Import Project="packaging.targets" />
<Import Project="..\common\StrongNameSign.targets" />
<!-- For regenerating templates on build -->
<Import Project="$(SolutionDir)\src\common\t4.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

Просмотреть файл

@ -20,3 +20,5 @@ using Microsoft.VisualStudio.Shell;
[assembly: ProvideCodeBase(AssemblyName = "LibGit2Sharp", CodeBase = @"$PackageFolder$\LibGit2Sharp.dll")]
[assembly: ProvideCodeBase(AssemblyName = "Splat", CodeBase = @"$PackageFolder$\Splat.dll")]
[assembly: ProvideCodeBase(AssemblyName = "Rothko", CodeBase = @"$PackageFolder$\Rothko.dll")]
[assembly: ProvideCodeBase(AssemblyName = "Markdig", CodeBase = @"$PackageFolder$\Markdig.dll")]
[assembly: ProvideCodeBase(AssemblyName = "Markdig.Wpf", CodeBase = @"$PackageFolder$\Markdig.Wpf.dll")]

Просмотреть файл

@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Brutal.Dev.StrongNameSigner" version="2.1.3" targetFramework="net461" />
<package id="EditorUtils2013" version="1.4.1.1" targetFramework="net45" />
<package id="Expression.Blend.Sdk.WPF" version="1.0.1" targetFramework="net461" />
<package id="LibGit2Sharp" version="0.22.0" targetFramework="net461" />
<package id="LibGit2Sharp.NativeBinaries" version="1.0.129" targetFramework="net461" />
<package id="Markdig" version="0.12.3" targetFramework="net461" />
<package id="Markdig.Wpf" version="0.2.0" targetFramework="net461" />
<package id="Markdig.Signed" version="0.13.0" targetFramework="net461" />
<package id="Markdig.Wpf.Signed" version="0.2.1" targetFramework="net461" />
<package id="Microsoft.VisualStudio.CoreUtility" version="14.3.25407" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Editor" version="14.3.25407" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime" version="14.3.25407" targetFramework="net461" />