Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Microsoft.DiaSymReader.Native to write Windows PDBs #400

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
bin
obj
packages
*.suo
*.iml
*.user
Expand Down
13 changes: 1 addition & 12 deletions Mono.Cecil.Cil/PortablePdb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -311,23 +311,12 @@ public ImageDebugHeader GetDebugHeader ()
TimeDateStamp = (int) module.timestamp,
};

var buffer = new ByteBuffer ();
// RSDS
buffer.WriteUInt32 (0x53445352);
// Module ID
buffer.WriteBytes (module.Mvid.ToByteArray ());
// PDB Age
buffer.WriteUInt32 (1);
// PDB Path
var filename = writer.BaseStream.GetFileName ();
if (!string.IsNullOrEmpty (filename))
filename = Path.GetFileName (filename);

buffer.WriteBytes (System.Text.Encoding.UTF8.GetBytes (filename));
buffer.WriteByte (0);
var data = Mixin.GetCodeViewData (module.Mvid, filename, age: 1);

var data = new byte [buffer.length];
Buffer.BlockCopy (buffer.buffer, 0, data, 0, buffer.length);
directory.SizeOfData = data.Length;

return new ImageDebugHeader (new ImageDebugHeaderEntry (directory, data));
Expand Down
22 changes: 22 additions & 0 deletions Mono.Cecil.Cil/Symbols.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

using Mono.Collections.Generic;
using Mono.Cecil.Cil;
using Mono.Cecil.PE;

namespace Mono.Cecil.Cil {

Expand Down Expand Up @@ -939,6 +940,27 @@ public static ImageDebugHeaderEntry GetCodeViewEntry (this ImageDebugHeader head
return GetEntry (header, ImageDebugType.CodeView);
}

#if !READ_ONLY

public static byte[] GetCodeViewData (Guid pdb_id, string pdb_path, int age)
{
var buffer = new ByteBuffer ();
// RSDS
buffer.WriteUInt32 (0x53445352);
// Module ID
buffer.WriteBytes (pdb_id.ToByteArray ());
// PDB Age
buffer.WriteInt32 (age);
// PDB Path
buffer.WriteBytes (System.Text.Encoding.UTF8.GetBytes (pdb_path));
buffer.WriteByte (0);

var data = new byte[buffer.length];
Buffer.BlockCopy (buffer.buffer, 0, data, 0, buffer.length);
return data;
}
#endif

public static ImageDebugHeaderEntry GetDeterministicEntry (this ImageDebugHeader header)
{
return GetEntry (header, ImageDebugType.Deterministic);
Expand Down
8 changes: 7 additions & 1 deletion Mono.Cecil.Tests.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildDirectory>$(MSBuildProjectDirectory)</BuildDirectory>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<Import Project="Mono.Cecil.props" />
<ItemGroup>
<ItemGroup Condition="'$(NetStandard)' == 'true'">
<PackageReference Include="NUnit">
<Version>3.7.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(NetStandard)' != 'true'">
<Reference Include="nunit.core">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(MSBuildThisFileDirectory)\Test\libs\nunit-2.6.2\nunit.core.dll</HintPath>
Expand Down
37 changes: 37 additions & 0 deletions Mono.Cecil.Windows.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0"?>
<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<id>Mono.Cecil.Windows</id>
<version>0.10.0.0-beta6</version>
<title>Mono.Cecil.Windows</title>
<authors>Jb Evain, Microsoft</authors>
<owners>Jb Evain</owners>
<licenseUrl>http://opensource.org/licenses/mit-license.php</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<projectUrl>http://github.com/jbevain/cecil/</projectUrl>
<summary>Adds full Windows PDB support to Mono.Cecil</summary>
<description>Cecil is a library written by Jb Evain to generate and inspect programs and libraries in the ECMA CIL format. It has full support for generics, and support some debugging symbol format. In simple English, with Cecil, you can load existing managed assemblies, browse all the contained types, modify them on the fly and save back to the disk the modified assembly.</description>
<language>en-US</language>
<tags>assembly assemblies module modules il cil msil bytecode reflection injection cecil mono aop</tags>
<dependencies>
<dependency id="Mono.Cecil" version="0.10.0.0-beta6" />
<group targetFramework=".NETFramework3.5">
<dependency id="Microsoft.DiaSymReader" version="1.2.0-beta1-61723-01" />
<dependency id="Microsoft.DiaSymReader.Native" version="1.6.0-beta2-25219" />
</group>
<group targetFramework=".NETFramework4.0">
<dependency id="Microsoft.DiaSymReader" version="1.2.0-beta1-61723-01" />
<dependency id="Microsoft.DiaSymReader.Native" version="1.6.0-beta2-25219" />
</group>
<group targetFramework=".NETStandard1.3">
<dependency id="Microsoft.DiaSymReader" version="1.2.0-beta1-61723-01" />
<dependency id="Microsoft.DiaSymReader.Native" version="1.6.0-beta2-25219" />
</group>
</dependencies>
</metadata>
<files>
<file src="bin\net_3_5_Release\*.dll" target="lib/net35" />
<file src="bin\net_4_0_Release\*.dll" target="lib/net40" />
<file src="bin\netstandard_Release\netstandard1.3\*.dll" target="lib/netstandard1.3" />
</files>
</package>
19 changes: 13 additions & 6 deletions Mono.Cecil.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<OutputPath>$(BuildDirectory)\bin\$(Configuration)\</OutputPath>
<MSBuildCSharpTargets>$(MSBuildToolsPath)\Microsoft.CSharp.targets</MSBuildCSharpTargets>
<NetStandard Condition=" $(Configuration.StartsWith('netstandard')) Or '$(NuGetRestoreTargets)' != '' ">true</NetStandard>
<NetStandard Condition=" '$(NetStandard)' == '' ">false</NetStandard>
<NetStandard Condition=" '$(NetStandard)' == '' ">false</NetStandard>
</PropertyGroup>
<PropertyGroup Condition=" $(Configuration.Contains('Debug')) ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -36,18 +36,25 @@
</PropertyGroup>
<PropertyGroup Condition=" $(Configuration.StartsWith('net_3_5')) ">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<DefineConstants>$(DefineConstants);</DefineConstants>
<DefineConstants>$(DefineConstants);NET_3_5;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" $(Configuration.StartsWith('net_4_0')) ">
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<DefineConstants>$(DefineConstants);NET_4_0;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" $(NetStandard) ">
<TargetFramework>netstandard1.3</TargetFramework>
<PropertyGroup Condition="'$(NetStandard)' == 'true'">
<TargetFrameworks Condition="'$(IsTestProject)' == 'true'">net462;netcoreapp1.1</TargetFrameworks>
<TargetFramework Condition="'$(IsTestProject)' != 'true'">netstandard1.3</TargetFramework>
<!-- Common NuGet package settings -->
<PackageVersion>0.10.0.0-beta6</PackageVersion>
<Language>en-US</Language>
<LicenseUrl>http://opensource.org/licenses/mit-license.php</LicenseUrl>
<RequireLicenseAcceptance>false</RequireLicenseAcceptance>
<ProjectUrl>http://github.com/jbevain/cecil/</ProjectUrl>
</PropertyGroup>
<Import Project="NetStandard.props" Condition=" $(NetStandard) " />
<Import Project="NetStandard.props" Condition="'$(NetStandard)' == 'true'" />
<!-- Shared References -->
<ItemGroup Condition=" ! $(NetStandard) ">
<ItemGroup Condition="'$(NetStandard)' != 'true'">
<Reference Include="System.Core" />
<Reference Include="System" />
</ItemGroup>
Expand Down
54 changes: 44 additions & 10 deletions Mono.Cecil.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.26612.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{74E5ECE0-06B4-401C-AEBA-E8DD53E17943}"
EndProject
Expand All @@ -22,6 +22,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.Rocks.Tests", "r
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.Rocks", "rocks\Mono.Cecil.Rocks.csproj", "{FBC6DD59-D09D-499C-B03C-99C1C78FF2AC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.WindowsPdb", "symbols\pdb.windows\Mono.Cecil.WindowsPdb.csproj", "{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.WindowsPdb.Tests", "symbols\pdb.windows\Test\Mono.Cecil.WindowsPdb.Tests.csproj", "{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
net_3_5_Debug_ReadOnly|Any CPU = net_3_5_Debug_ReadOnly|Any CPU
Expand Down Expand Up @@ -79,10 +83,9 @@ Global
{A47B1F49-A81A-43E8-BE6B-DD28AF2C4055}.net_4_0_Release|Any CPU.ActiveCfg = net_4_0_Release|Any CPU
{A47B1F49-A81A-43E8-BE6B-DD28AF2C4055}.net_4_0_Release|Any CPU.Build.0 = net_4_0_Release|Any CPU
{A47B1F49-A81A-43E8-BE6B-DD28AF2C4055}.netstandard_Debug_ReadOnly|Any CPU.ActiveCfg = netstandard_Debug_ReadOnly|Any CPU
{A47B1F49-A81A-43E8-BE6B-DD28AF2C4055}.netstandard_Debug_ReadOnly|Any CPU.Build.0 = netstandard_Debug_ReadOnly|Any CPU
{A47B1F49-A81A-43E8-BE6B-DD28AF2C4055}.netstandard_Debug|Any CPU.ActiveCfg = netstandard_Debug|Any CPU
{A47B1F49-A81A-43E8-BE6B-DD28AF2C4055}.netstandard_Debug|Any CPU.Build.0 = netstandard_Debug|Any CPU
{A47B1F49-A81A-43E8-BE6B-DD28AF2C4055}.netstandard_Release_ReadOnly|Any CPU.ActiveCfg = netstandard_Release_ReadOnly|Any CPU
{A47B1F49-A81A-43E8-BE6B-DD28AF2C4055}.netstandard_Release_ReadOnly|Any CPU.Build.0 = netstandard_Release_ReadOnly|Any CPU
{A47B1F49-A81A-43E8-BE6B-DD28AF2C4055}.netstandard_Release|Any CPU.ActiveCfg = netstandard_Release|Any CPU
{8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_3_5_Debug_ReadOnly|Any CPU.ActiveCfg = net_3_5_Debug_ReadOnly|Any CPU
{8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_3_5_Debug_ReadOnly|Any CPU.Build.0 = net_3_5_Debug_ReadOnly|Any CPU
Expand Down Expand Up @@ -125,10 +128,8 @@ Global
{AC71DF9C-99FA-4A63-990A-66C8010355A6}.net_4_0_Release|Any CPU.ActiveCfg = net_4_0_Release|Any CPU
{AC71DF9C-99FA-4A63-990A-66C8010355A6}.net_4_0_Release|Any CPU.Build.0 = net_4_0_Release|Any CPU
{AC71DF9C-99FA-4A63-990A-66C8010355A6}.netstandard_Debug_ReadOnly|Any CPU.ActiveCfg = netstandard_Debug_ReadOnly|Any CPU
{AC71DF9C-99FA-4A63-990A-66C8010355A6}.netstandard_Debug_ReadOnly|Any CPU.Build.0 = netstandard_Debug_ReadOnly|Any CPU
{AC71DF9C-99FA-4A63-990A-66C8010355A6}.netstandard_Debug|Any CPU.ActiveCfg = netstandard_Debug|Any CPU
{AC71DF9C-99FA-4A63-990A-66C8010355A6}.netstandard_Release_ReadOnly|Any CPU.ActiveCfg = netstandard_Release_ReadOnly|Any CPU
{AC71DF9C-99FA-4A63-990A-66C8010355A6}.netstandard_Release_ReadOnly|Any CPU.Build.0 = netstandard_Release_ReadOnly|Any CPU
{AC71DF9C-99FA-4A63-990A-66C8010355A6}.netstandard_Release|Any CPU.ActiveCfg = netstandard_Release|Any CPU
{63E6915C-7EA4-4D76-AB28-0D7191EEA626}.net_3_5_Debug_ReadOnly|Any CPU.ActiveCfg = net_3_5_Debug_ReadOnly|Any CPU
{63E6915C-7EA4-4D76-AB28-0D7191EEA626}.net_3_5_Debug_ReadOnly|Any CPU.Build.0 = net_3_5_Debug_ReadOnly|Any CPU
Expand Down Expand Up @@ -171,10 +172,8 @@ Global
{29300103-CB76-4A1D-B6FD-FFD91C1EC8AA}.net_4_0_Release|Any CPU.ActiveCfg = net_4_0_Release|Any CPU
{29300103-CB76-4A1D-B6FD-FFD91C1EC8AA}.net_4_0_Release|Any CPU.Build.0 = net_4_0_Release|Any CPU
{29300103-CB76-4A1D-B6FD-FFD91C1EC8AA}.netstandard_Debug_ReadOnly|Any CPU.ActiveCfg = netstandard_Debug_ReadOnly|Any CPU
{29300103-CB76-4A1D-B6FD-FFD91C1EC8AA}.netstandard_Debug_ReadOnly|Any CPU.Build.0 = netstandard_Debug_ReadOnly|Any CPU
{29300103-CB76-4A1D-B6FD-FFD91C1EC8AA}.netstandard_Debug|Any CPU.ActiveCfg = netstandard_Debug|Any CPU
{29300103-CB76-4A1D-B6FD-FFD91C1EC8AA}.netstandard_Release_ReadOnly|Any CPU.ActiveCfg = netstandard_Release_ReadOnly|Any CPU
{29300103-CB76-4A1D-B6FD-FFD91C1EC8AA}.netstandard_Release_ReadOnly|Any CPU.Build.0 = netstandard_Release_ReadOnly|Any CPU
{29300103-CB76-4A1D-B6FD-FFD91C1EC8AA}.netstandard_Release|Any CPU.ActiveCfg = netstandard_Release|Any CPU
{C6CFD7E1-B855-44DC-B4CE-9CD72984AF52}.net_3_5_Debug_ReadOnly|Any CPU.ActiveCfg = net_3_5_Debug_ReadOnly|Any CPU
{C6CFD7E1-B855-44DC-B4CE-9CD72984AF52}.net_3_5_Debug_ReadOnly|Any CPU.Build.0 = net_3_5_Debug_ReadOnly|Any CPU
Expand All @@ -193,10 +192,8 @@ Global
{C6CFD7E1-B855-44DC-B4CE-9CD72984AF52}.net_4_0_Release|Any CPU.ActiveCfg = net_4_0_Release|Any CPU
{C6CFD7E1-B855-44DC-B4CE-9CD72984AF52}.net_4_0_Release|Any CPU.Build.0 = net_4_0_Release|Any CPU
{C6CFD7E1-B855-44DC-B4CE-9CD72984AF52}.netstandard_Debug_ReadOnly|Any CPU.ActiveCfg = netstandard_Debug_ReadOnly|Any CPU
{C6CFD7E1-B855-44DC-B4CE-9CD72984AF52}.netstandard_Debug_ReadOnly|Any CPU.Build.0 = netstandard_Debug_ReadOnly|Any CPU
{C6CFD7E1-B855-44DC-B4CE-9CD72984AF52}.netstandard_Debug|Any CPU.ActiveCfg = netstandard_Debug|Any CPU
{C6CFD7E1-B855-44DC-B4CE-9CD72984AF52}.netstandard_Release_ReadOnly|Any CPU.ActiveCfg = netstandard_Release_ReadOnly|Any CPU
{C6CFD7E1-B855-44DC-B4CE-9CD72984AF52}.netstandard_Release_ReadOnly|Any CPU.Build.0 = netstandard_Release_ReadOnly|Any CPU
{C6CFD7E1-B855-44DC-B4CE-9CD72984AF52}.netstandard_Release|Any CPU.ActiveCfg = netstandard_Release|Any CPU
{FBC6DD59-D09D-499C-B03C-99C1C78FF2AC}.net_3_5_Debug_ReadOnly|Any CPU.ActiveCfg = net_3_5_Debug_ReadOnly|Any CPU
{FBC6DD59-D09D-499C-B03C-99C1C78FF2AC}.net_3_5_Debug_ReadOnly|Any CPU.Build.0 = net_3_5_Debug_ReadOnly|Any CPU
Expand All @@ -222,6 +219,38 @@ Global
{FBC6DD59-D09D-499C-B03C-99C1C78FF2AC}.netstandard_Release_ReadOnly|Any CPU.Build.0 = netstandard_Release_ReadOnly|Any CPU
{FBC6DD59-D09D-499C-B03C-99C1C78FF2AC}.netstandard_Release|Any CPU.ActiveCfg = netstandard_Release|Any CPU
{FBC6DD59-D09D-499C-B03C-99C1C78FF2AC}.netstandard_Release|Any CPU.Build.0 = netstandard_Release|Any CPU
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}.net_3_5_Debug_ReadOnly|Any CPU.ActiveCfg = net_3_5_Debug_ReadOnly|Any CPU
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}.net_3_5_Debug|Any CPU.ActiveCfg = net_3_5_Debug|Any CPU
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}.net_3_5_Release_ReadOnly|Any CPU.ActiveCfg = net_3_5_Release_ReadOnly|Any CPU
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}.net_3_5_Release|Any CPU.ActiveCfg = net_3_5_Release|Any CPU
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}.net_4_0_Debug_ReadOnly|Any CPU.ActiveCfg = net_4_0_Debug_ReadOnly|Any CPU
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}.net_4_0_Debug|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}.net_4_0_Release_ReadOnly|Any CPU.ActiveCfg = net_4_0_Release_ReadOnly|Any CPU
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}.net_4_0_Release|Any CPU.ActiveCfg = net_4_0_Release|Any CPU
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}.netstandard_Debug_ReadOnly|Any CPU.ActiveCfg = netstandard_Debug_ReadOnly|Any CPU
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}.netstandard_Debug_ReadOnly|Any CPU.Build.0 = netstandard_Debug_ReadOnly|Any CPU
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}.netstandard_Debug|Any CPU.ActiveCfg = netstandard_Debug|Any CPU
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}.netstandard_Debug|Any CPU.Build.0 = netstandard_Debug|Any CPU
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}.netstandard_Release_ReadOnly|Any CPU.ActiveCfg = netstandard_Release_ReadOnly|Any CPU
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}.netstandard_Release_ReadOnly|Any CPU.Build.0 = netstandard_Release_ReadOnly|Any CPU
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}.netstandard_Release|Any CPU.ActiveCfg = netstandard_Release|Any CPU
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE}.netstandard_Release|Any CPU.Build.0 = netstandard_Release|Any CPU
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}.net_3_5_Debug_ReadOnly|Any CPU.ActiveCfg = net_3_5_Debug_ReadOnly|Any CPU
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}.net_3_5_Debug|Any CPU.ActiveCfg = net_3_5_Debug|Any CPU
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}.net_3_5_Release_ReadOnly|Any CPU.ActiveCfg = net_3_5_Release_ReadOnly|Any CPU
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}.net_3_5_Release|Any CPU.ActiveCfg = net_3_5_Release|Any CPU
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}.net_4_0_Debug_ReadOnly|Any CPU.ActiveCfg = net_4_0_Debug_ReadOnly|Any CPU
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}.net_4_0_Debug|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}.net_4_0_Release_ReadOnly|Any CPU.ActiveCfg = net_4_0_Release_ReadOnly|Any CPU
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}.net_4_0_Release|Any CPU.ActiveCfg = net_4_0_Release|Any CPU
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}.netstandard_Debug_ReadOnly|Any CPU.ActiveCfg = netstandard_Debug_ReadOnly|Any CPU
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}.netstandard_Debug_ReadOnly|Any CPU.Build.0 = netstandard_Debug_ReadOnly|Any CPU
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}.netstandard_Debug|Any CPU.ActiveCfg = netstandard_Debug|Any CPU
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}.netstandard_Debug|Any CPU.Build.0 = netstandard_Debug|Any CPU
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}.netstandard_Release_ReadOnly|Any CPU.ActiveCfg = netstandard_Release_ReadOnly|Any CPU
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}.netstandard_Release_ReadOnly|Any CPU.Build.0 = netstandard_Release_ReadOnly|Any CPU
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}.netstandard_Release|Any CPU.ActiveCfg = netstandard_Release|Any CPU
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397}.netstandard_Release|Any CPU.Build.0 = netstandard_Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -233,5 +262,10 @@ Global
{63E6915C-7EA4-4D76-AB28-0D7191EEA626} = {929D5B3B-E29A-40CC-93D8-0FF43A6F9FA1}
{29300103-CB76-4A1D-B6FD-FFD91C1EC8AA} = {74E5ECE0-06B4-401C-AEBA-E8DD53E17943}
{C6CFD7E1-B855-44DC-B4CE-9CD72984AF52} = {74E5ECE0-06B4-401C-AEBA-E8DD53E17943}
{1A7F5B01-F15F-4943-8AF5-CB736C60B1BE} = {929D5B3B-E29A-40CC-93D8-0FF43A6F9FA1}
{77E8A7D2-4DC4-43E1-94FF-002B33FF2397} = {74E5ECE0-06B4-401C-AEBA-E8DD53E17943}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9F99F5B5-3BEF-4AC3-8E6A-94BA9CFA9381}
EndGlobalSection
EndGlobal
1 change: 1 addition & 0 deletions Mono.Cecil/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
[assembly: Guid ("fd225bb4-fa53-44b2-a6db-85f5e48dcb54")]
#endif

[assembly: InternalsVisibleTo ("Mono.Cecil.WindowsPdb, PublicKey=" + Consts.PublicKey)]
[assembly: InternalsVisibleTo ("Mono.Cecil.Pdb, PublicKey=" + Consts.PublicKey)]
[assembly: InternalsVisibleTo ("Mono.Cecil.Mdb, PublicKey=" + Consts.PublicKey)]
[assembly: InternalsVisibleTo ("Mono.Cecil.Rocks, PublicKey=" + Consts.PublicKey)]
Expand Down
10 changes: 6 additions & 4 deletions Mono.Cecil/BaseAssemblyResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ public AssemblyResolutionException (AssemblyNameReference reference, Exception i
#endif
}

#if !NET_CORE
public abstract class BaseAssemblyResolver : IAssemblyResolver {

static readonly bool on_mono = Type.GetType ("Mono.Runtime") != null;

readonly Collection<string> directories;

#if !NET_CORE
Collection<string> gac_paths;

#endif
public void AddSearchDirectory (string directory)
{
directories.Add (directory);
Expand Down Expand Up @@ -120,6 +120,7 @@ public virtual AssemblyDefinition Resolve (AssemblyNameReference name, ReaderPar
if (assembly != null)
return assembly;

#if !NET_CORE
if (name.IsRetargetable) {
// if the reference is retargetable, zero it
name = new AssemblyNameReference (name.Name, Mixin.ZeroVersion) {
Expand Down Expand Up @@ -151,6 +152,7 @@ public virtual AssemblyDefinition Resolve (AssemblyNameReference name, ReaderPar
assembly = SearchDirectory (name, framework_dirs, parameters);
if (assembly != null)
return assembly;
#endif

if (ResolveFailure != null) {
assembly = ResolveFailure (this, name);
Expand Down Expand Up @@ -185,6 +187,7 @@ static bool IsZero (Version version)
return version.Major == 0 && version.Minor == 0 && version.Build == 0 && version.Revision == 0;
}

#if !NET_CORE
AssemblyDefinition GetCorlib (AssemblyNameReference reference, ReaderParameters parameters)
{
var version = reference.Version;
Expand Down Expand Up @@ -325,7 +328,7 @@ AssemblyDefinition GetAssemblyInNetGac (AssemblyNameReference reference, ReaderP

return null;
}

#endif
static string GetAssemblyFile (AssemblyNameReference reference, string prefix, string gac)
{
var gac_folder = new StringBuilder ()
Expand All @@ -352,5 +355,4 @@ protected virtual void Dispose (bool disposing)
{
}
}
#endif
}
4 changes: 0 additions & 4 deletions Mono.Cecil/DefaultAssemblyResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// Licensed under the MIT/X11 license.
//

#if !NET_CORE

using System;
using System.Collections.Generic;

Expand Down Expand Up @@ -61,5 +59,3 @@ protected override void Dispose (bool disposing)
}
}
}

#endif
Loading