-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Lost xmlns #2052
Comments
By the way, how can I decompile .baml to a string/Stream/Document? |
Another ILSpy output: dnSpy is right:
Here, |
Currently there are no plans to add the BAML decompiler to tools other than ILSpy. How would such an API look like? |
@siegfriedpammer Minimum change: make Others, make more types/members as public, such as: |
Can you expose |
@siegfriedpammer Can you expose assemblyReferences? So when we export to project, we can know which assemblies should be referenced. |
I am not sure, what you are referring to. When exporting an assembly as project, ILSpy already generates a project file, which should contain all required references. Are you talking about single file XAML export? |
@siegfriedpammer, My plugin need it. What you do is: internal static XDocument LoadIntoDocument(PEFile module, IAssemblyResolver assemblyResolver,
Stream stream, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
var document = BamlReader.ReadDocument(stream, cancellationToken);
var xaml = new XamlDecompiler().Decompile(new BamlDecompilerTypeSystem(module, assemblyResolver), document, cancellationToken, new BamlDecompilerOptions(), null);
return xaml;
} => public static XDocument LoadIntoDocument(PEFile module, IAssemblyResolver assemblyResolver,
Stream stream, CancellationToken cancellationToken, List<string> assemblyReferences = null)
{
cancellationToken.ThrowIfCancellationRequested();
var document = BamlReader.ReadDocument(stream, cancellationToken);
var xaml = new XamlDecompiler().Decompile(new BamlDecompilerTypeSystem(module, assemblyResolver), document, cancellationToken, new BamlDecompilerOptions(), assemblyReferences);
return xaml;
} |
Original:
<Grid x:XmlAttributeProperties.XmlSpace="preserve"/>
ILSpy:
<Grid XmlAttributeProperties.XmlSpace="preserve"/>
VS can't build it without
x:
The text was updated successfully, but these errors were encountered: