summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Build.Tasks/XamlCTask.cs
diff options
context:
space:
mode:
authorStephane Delcroix <stephane@delcroix.org>2016-12-05 13:31:31 +0100
committerGitHub <noreply@github.com>2016-12-05 13:31:31 +0100
commit1a5bead2f2e24cc16da23753eaf0882d38d54ea1 (patch)
tree2fb4bf607ca11d9ed5163ed329796ca651054a6a /Xamarin.Forms.Build.Tasks/XamlCTask.cs
parent3692786c3a0f9ba01ffe9516caa624a018ac885a (diff)
downloadxamarin-forms-1a5bead2f2e24cc16da23753eaf0882d38d54ea1.tar.gz
xamarin-forms-1a5bead2f2e24cc16da23753eaf0882d38d54ea1.tar.bz2
xamarin-forms-1a5bead2f2e24cc16da23753eaf0882d38d54ea1.zip
[XamlC] drop ICSharpCode.Decompiler (#586)
* [XamlC] drop ICSharpCode.Decompiler * update nuspec * fix typo
Diffstat (limited to 'Xamarin.Forms.Build.Tasks/XamlCTask.cs')
-rw-r--r--Xamarin.Forms.Build.Tasks/XamlCTask.cs27
1 files changed, 9 insertions, 18 deletions
diff --git a/Xamarin.Forms.Build.Tasks/XamlCTask.cs b/Xamarin.Forms.Build.Tasks/XamlCTask.cs
index d8b80233..eda44a9a 100644
--- a/Xamarin.Forms.Build.Tasks/XamlCTask.cs
+++ b/Xamarin.Forms.Build.Tasks/XamlCTask.cs
@@ -2,8 +2,6 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using ICSharpCode.Decompiler;
-using ICSharpCode.Decompiler.Ast;
using Mono.Cecil;
using Mono.Cecil.Cil;
using Mono.Cecil.Rocks;
@@ -16,7 +14,13 @@ namespace Xamarin.Forms.Build.Tasks
bool hasCompiledXamlResources;
public bool KeepXamlResources { get; set; }
public bool OptimizeIL { get; set; }
- public bool OutputGeneratedILAsCode { get; set; }
+
+ bool outputGeneratedILAsCode;
+ [Obsolete("This option is no longer available")]
+ public bool OutputGeneratedILAsCode {
+ get { return outputGeneratedILAsCode; }
+ set { outputGeneratedILAsCode = value; }
+ }
internal string Type { get; set; }
@@ -185,22 +189,9 @@ namespace Xamarin.Forms.Build.Tasks
Logger.LogLine(2, "done");
}
- if (OutputGeneratedILAsCode)
- {
- var filepath = Path.Combine(Path.GetDirectoryName(Assembly), typeDef.FullName + ".decompiled.cs");
- Logger.LogString(2, " Decompiling {0} into {1}...", typeDef.FullName, filepath);
- var decompilerContext = new DecompilerContext(module);
- using (var writer = new StreamWriter(filepath))
- {
- var output = new PlainTextOutput(writer);
-
- var codeDomBuilder = new AstBuilder(decompilerContext);
- codeDomBuilder.AddType(typeDef);
- codeDomBuilder.GenerateCode(output);
- }
+ if (outputGeneratedILAsCode)
+ Logger.LogLine(2, " Decompiling option has been removed. Use a 3rd party decompiler to admire the beauty of the IL generated");
- Logger.LogLine(2, "done");
- }
resourcesToPrune.Add(resource);
}
if (!KeepXamlResources)