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

StaticResourceStart in BAML throws NotSupportedException #1503

Closed
weltkante opened this issue Apr 29, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@weltkante
Copy link
Contributor

commented Apr 29, 2019

When trying to look at themes/generic.xaml from the WPF assembly PresentationUI (in the GAC) I'm getting

System.NotSupportedException: StaticResourceStart
   bei ILSpy.BamlDecompiler.HandlerMap.LookupHandler(BamlRecordType type) in E:\_code\_dev\ilspy\ILSpy.BamlDecompiler\IHandlers.cs:Zeile 64.
   bei ILSpy.BamlDecompiler.HandlerMap.ProcessChildren(XamlContext ctx, BamlBlockNode node, BamlElement nodeElem) in E:\_code\_dev\ilspy\ILSpy.BamlDecompiler\IHandlers.cs:Zeile 75.
   bei ILSpy.BamlDecompiler.Handlers.ElementHandler.Translate(XamlContext ctx, BamlNode node, BamlElement parent) in E:\_code\_dev\ilspy\ILSpy.BamlDecompiler\Handlers\Blocks\ElementHandler.cs:Zeile 41.
   bei ILSpy.BamlDecompiler.HandlerMap.ProcessChildren(XamlContext ctx, BamlBlockNode node, BamlElement nodeElem) in E:\_code\_dev\ilspy\ILSpy.BamlDecompiler\IHandlers.cs:Zeile 80.
   bei ILSpy.BamlDecompiler.Handlers.DocumentHandler.Translate(XamlContext ctx, BamlNode node, BamlElement parent) in E:\_code\_dev\ilspy\ILSpy.BamlDecompiler\Handlers\Blocks\DocumentHandler.cs:Zeile 34.
   bei ILSpy.BamlDecompiler.XamlDecompiler.Decompile(IDecompilerTypeSystem typeSystem, BamlDocument document, CancellationToken token, BamlDecompilerOptions bamlDecompilerOptions, List`1 assemblyReferences) in E:\_code\_dev\ilspy\ILSpy.BamlDecompiler\XamlDecompiler.cs:Zeile 45.
   bei ILSpy.BamlDecompiler.BamlResourceEntryNode.LoadIntoDocument(PEFile module, IAssemblyResolver assemblyResolver, Stream stream, CancellationToken cancellationToken) in E:\_code\_dev\ilspy\ILSpy.BamlDecompiler\BamlResourceEntryNode.cs:Zeile 66.
   bei ILSpy.BamlDecompiler.BamlResourceEntryNode.LoadBaml(AvalonEditTextOutput output, CancellationToken cancellationToken) in E:\_code\_dev\ilspy\ILSpy.BamlDecompiler\BamlResourceEntryNode.cs:Zeile 56.
   bei ILSpy.BamlDecompiler.BamlResourceEntryNode.<>c__DisplayClass1_1.<View>b__2() in E:\_code\_dev\ilspy\ILSpy.BamlDecompiler\BamlResourceEntryNode.cs:Zeile 40.

Above is using a debug build; using a release build the above method doesn't throw but I get an exception later

System.Exception: Cannot find StaticResource @274841
   bei ILSpy.BamlDecompiler.Handlers.PropertyWithStaticResourceIdHandler.Translate(XamlContext ctx, BamlNode node, BamlElement parent)
   bei ILSpy.BamlDecompiler.HandlerMap.ProcessChildren(XamlContext ctx, BamlBlockNode node, BamlElement nodeElem)
   bei ILSpy.BamlDecompiler.Handlers.ElementHandler.Translate(XamlContext ctx, BamlNode node, BamlElement parent)
   bei ILSpy.BamlDecompiler.HandlerMap.ProcessChildren(XamlContext ctx, BamlBlockNode node, BamlElement nodeElem)
   bei ILSpy.BamlDecompiler.Handlers.ElementHandler.Translate(XamlContext ctx, BamlNode node, BamlElement parent)
   bei ILSpy.BamlDecompiler.HandlerMap.ProcessChildren(XamlContext ctx, BamlBlockNode node, BamlElement nodeElem)
   bei ILSpy.BamlDecompiler.Handlers.ElementHandler.Translate(XamlContext ctx, BamlNode node, BamlElement parent)
   bei ILSpy.BamlDecompiler.HandlerMap.ProcessChildren(XamlContext ctx, BamlBlockNode node, BamlElement nodeElem)
   bei ILSpy.BamlDecompiler.Handlers.ElementHandler.Translate(XamlContext ctx, BamlNode node, BamlElement parent)
   bei ILSpy.BamlDecompiler.HandlerMap.ProcessChildren(XamlContext ctx, BamlBlockNode node, BamlElement nodeElem)
   bei ILSpy.BamlDecompiler.Handlers.ElementHandler.Translate(XamlContext ctx, BamlNode node, BamlElement parent)
   bei ILSpy.BamlDecompiler.HandlerMap.ProcessChildren(XamlContext ctx, BamlBlockNode node, BamlElement nodeElem)
   bei ILSpy.BamlDecompiler.Handlers.PropertyComplexHandler.Translate(XamlContext ctx, BamlNode node, BamlElement parent)
   bei ILSpy.BamlDecompiler.HandlerMap.ProcessChildren(XamlContext ctx, BamlBlockNode node, BamlElement nodeElem)
   bei ILSpy.BamlDecompiler.Handlers.ElementHandler.Translate(XamlContext ctx, BamlNode node, BamlElement parent)
   bei ILSpy.BamlDecompiler.HandlerMap.ProcessChildren(XamlContext ctx, BamlBlockNode node, BamlElement nodeElem)
   bei ILSpy.BamlDecompiler.Handlers.ElementHandler.Translate(XamlContext ctx, BamlNode node, BamlElement parent)
   bei ILSpy.BamlDecompiler.HandlerMap.ProcessChildren(XamlContext ctx, BamlBlockNode node, BamlElement nodeElem)
   bei ILSpy.BamlDecompiler.Handlers.ElementHandler.Translate(XamlContext ctx, BamlNode node, BamlElement parent)
   bei ILSpy.BamlDecompiler.HandlerMap.ProcessChildren(XamlContext ctx, BamlBlockNode node, BamlElement nodeElem)
   bei ILSpy.BamlDecompiler.Handlers.DocumentHandler.Translate(XamlContext ctx, BamlNode node, BamlElement parent)
   bei ILSpy.BamlDecompiler.XamlDecompiler.Decompile(IDecompilerTypeSystem typeSystem, BamlDocument document, CancellationToken token, BamlDecompilerOptions bamlDecompilerOptions, List`1 assemblyReferences)
   bei ILSpy.BamlDecompiler.BamlResourceEntryNode.LoadIntoDocument(PEFile module, IAssemblyResolver assemblyResolver, Stream stream, CancellationToken cancellationToken)
   bei ILSpy.BamlDecompiler.BamlResourceEntryNode.LoadBaml(AvalonEditTextOutput output, CancellationToken cancellationToken)
   bei ILSpy.BamlDecompiler.BamlResourceEntryNode.<>c__DisplayClass1_1.<View>b__2()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.