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

NuGet update error #350

Closed
cvdevol opened this issue Jan 29, 2023 · 4 comments · Fixed by #351
Closed

NuGet update error #350

cvdevol opened this issue Jan 29, 2023 · 4 comments · Fixed by #351
Assignees
Labels

Comments

@cvdevol
Copy link

cvdevol commented Jan 29, 2023

VS2019 NuGet package manager gives following error when trying to update from 0.12 to 0.13

"Unable to resolve dependency 'WpfMath.Shared'. Source(s) used: 'nuget.org', 'Microsoft Visual Studio Offline Packages'.

@ForNeVeR ForNeVeR self-assigned this Jan 29, 2023
@ForNeVeR
Copy link
Owner

Ugh. Turns out my magical tricks to make it put a dependency DLL into the main package aren't completely working.

@ForNeVeR
Copy link
Owner

Sorry! Should be fixed in the just published package 0.13.1.

(It may take up to an hour for it to become available on nuget.org.)

@cvdevol
Copy link
Author

cvdevol commented Jan 29, 2023

0.13.1 broke my app.
"Private ReadOnly Parser As New TexFormulaParser" no longer works. Throws a "Overload resolution failed because no accessible 'New' accepts this number of arguments." error
Also "Dim renderer = formula.GetRenderer(TexStyle.Display, FC.Scale, "Consolas")" throws a "'GetRenderer' is not a member of 'TexFormula' error

These statements worked fine in version 0.12

@ForNeVeR
Copy link
Owner

0.13.0 has several breaking changes, please take a look at the changelog.

"Private ReadOnly Parser As New TexFormulaParser" no longer works.

Try using WpfMath.Parsers.WpfTeXFormulaParser.Instance instead.

Also "Dim renderer = formula.GetRenderer(TexStyle.Display, FC.Scale, "Consolas")" throws a "'GetRenderer' is not a member of 'TexFormula' error

There are several migration ways, depending on your usage of the resulting renderer.

In the most common case, you'll need the following:

// Dim formula as TexFormula
Dim environment = WpfTexEnvironment.Create(TexStyle.Display, FC.Scale, "Consolas")
Dim result = formula.RenderToBitmap(environment, FC.Scale)

where RenderToBitmap is an extension method of WpfMath.Rendering.WpfTeXFormulaExtensions.

(I'm sorry, my VB.NET skills may not be up to date, but I did my best)

Let me know if you have any further questions.

Also, I should note that you are free to skip this 0.13 upgrade for now: it only contains breaking changes (and was released specifically to isolate the scope for further library development). Newer versions will still build on top of 0.13 API, though, so it's good if you'll let me know if any APIs of features are missing for your use cases.

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

Successfully merging a pull request may close this issue.

2 participants