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

Exception after updated Plotly.NET to version 4.0.0 from version 3.0.1 due to dependency on a non-strong named assembly #371

Closed
kunjiangkun opened this issue Feb 27, 2023 · 6 comments

Comments

@kunjiangkun
Copy link

kunjiangkun commented Feb 27, 2023

Description

System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for '<StartupCode$Plotly-NET>.$Defaults' threw an exception.
Source=Plotly.NET
StackTrace:
at Plotly.NET.Defaults.set_DefaultTemplate(Template value)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Test.Program.

(String[] args)

This exception was originally thrown at this call stack:

Inner Exception 1:
FileLoadException: Could not load file or assembly 'Giraffe.ViewEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

Please provide a succinct description of your issue.

Repro steps

Please provide the steps required to reproduce the problem

There is only one line of test code:
Defaults.DefaultTemplate = ChartTemplates.lightMirrored;

Expected behavior

Please provide a description of the behavior you expect.

Actual behavior

Please provide a description of the actual behavior you observe.

Known workarounds

Please provide a description of any known workarounds.

Related information

using .Net Framework 4.8.

@kunjiangkun
Copy link
Author

Not sure if it's related but the Giraffe.ViewEngine 1.4.0 release has version 1.0.0 in the DLL.

@kunjiangkun kunjiangkun changed the title Exception after updated to version 4.0.0 from version 3.0.1 Exception after updated Plotly.NET to version 4.0.0 from version 3.0.1 Feb 27, 2023
@kMutagene
Copy link
Collaborator

Oh man, Giraffe.ViewEngine is not a strong named assembly 😢 This is the exact type of shit i hoped will not happen due to us adopting strong naming. Now i have to beg those maintainers to adopt strong naming too, or implement a view engine myself in this repo

@kMutagene
Copy link
Collaborator

kMutagene commented Feb 28, 2023

Thanks for reporting this though, i think there is not much you can do to make it work. I think there is something called binding redirects for netfx.

@kMutagene kMutagene changed the title Exception after updated Plotly.NET to version 4.0.0 from version 3.0.1 Exception after updated Plotly.NET to version 4.0.0 from version 3.0.1 due to dependency on a non-strong named assembly Feb 28, 2023
@kMutagene
Copy link
Collaborator

@kunjiangkun does adding https://github.com/dsplaisted/strongnamer to your solution resolve the issue?

@kunjiangkun
Copy link
Author

kunjiangkun commented Apr 10, 2023

@kunjiangkun does adding https://github.com/dsplaisted/strongnamer to your solution resolve the issue?

Adding strongnamer didn't solve the problem. Will stay on version 3.0.1 for now.

@kMutagene
Copy link
Collaborator

fixed via 5cc0143, will be in the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants