Permalink
Browse files

Go to .3447 Nuget (found .deps.json parsing error on release tests). …

…That also hid a throw on assembly resolution.
  • Loading branch information...
christophwille committed Dec 18, 2017
1 parent 151fa73 commit 8bb5551396276ea5498c1e30354c225bb105ebd9
@@ -6,7 +6,7 @@ platforms:
- DotNetCore
packages:
- id: ICSharpCode.Decompiler
version: 3.0.0.3443
version: 3.0.0.3447
---
Setup: load the references required to work with the decompiler
@@ -14,7 +14,7 @@
<ItemGroup>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="2.0.1" />
<PackageReference Include="ICSharpCode.Decompiler" Version="3.0.0.3443" />
<PackageReference Include="ICSharpCode.Decompiler" Version="3.0.0.3447" />
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageReference Include="System.Runtime.Handles" Version="4.3.0" />
@@ -75,9 +75,14 @@ static int Main(string[] args)
return app.Execute(args);
}
static CSharpDecompiler GetDecompiler(string assemblyFileName)
{
return new CSharpDecompiler(assemblyFileName, new DecompilerSettings() { ThrowOnAssemblyResolveErrors = false });
}
static void ListContent(string assemblyFileName, TextWriter output, ISet<TypeKind> kinds)
{
CSharpDecompiler decompiler = new CSharpDecompiler(assemblyFileName, new DecompilerSettings());
CSharpDecompiler decompiler = GetDecompiler(assemblyFileName);
foreach (var type in decompiler.TypeSystem.Compilation.MainAssembly.GetAllTypeDefinitions()) {
if (!kinds.Contains(type.Kind))
@@ -95,7 +100,7 @@ static void DecompileAsProject(string assemblyFileName, string outputDirectory)
static void Decompile(string assemblyFileName, TextWriter output, string typeName = null)
{
CSharpDecompiler decompiler = new CSharpDecompiler(assemblyFileName, new DecompilerSettings());
CSharpDecompiler decompiler = GetDecompiler(assemblyFileName);
if (typeName == null) {
output.Write(decompiler.DecompileWholeModuleAsString());
@@ -10,7 +10,11 @@ Import-Module $modulePath
$version = Get-DecompilerVersion
Write-Output $version
$decompiler = Get-Decompiler $modulePath
# different test assemblies - it makes a difference wrt .deps.json so there are two netstandard tests here
$asm_netstdWithDepsJson = $basePath + '\bin\Debug\netstandard2.0\ICSharpCode.Decompiler.Powershell.dll'
$asm_netstd = $basePath + '\bin\Debug\netstandard2.0\ICSharpCode.Decompiler.dll'
$decompiler = Get-Decompiler $asm_netstdWithDepsJson
$classes = Get-DecompiledTypes $decompiler -Types class
$classes.Count
@@ -20,7 +20,9 @@ protected override void ProcessRecord()
string path = GetUnresolvedProviderPathFromPSPath(LiteralPath);
try {
var decompiler = new CSharpDecompiler(path, new DecompilerSettings());
var decompiler = new CSharpDecompiler(path, new DecompilerSettings() {
ThrowOnAssemblyResolveErrors = false
});
WriteObject(decompiler);
} catch (Exception e) {
@@ -8,7 +8,7 @@
<ItemGroup>
<PackageReference Include="PowerShellStandard.Library" Version="3.0.0-preview-01" />
<PackageReference Include="ICSharpCode.Decompiler" Version="3.0.0.3443" />
<PackageReference Include="ICSharpCode.Decompiler" Version="3.0.0.3447" />
</ItemGroup>
</Project>

0 comments on commit 8bb5551

Please sign in to comment.