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

Cannot get localized strings because ConfigureServices is overridden #103

Open
brinkdinges opened this issue Jul 4, 2020 · 6 comments
Open

Comments

@brinkdinges
Copy link
Contributor

I have just updated SolidDna in a project from 1.0.1.9 to 1.0.1.13, the latest version. Now I get an exception early when starting up the add-in. I narrowed it down to the fact that no LocalizationManager is ever set up, so getting a localized string in a SolidDna wrapper fails.

ConfigureServices in my add-in is being called and it's been empty for three years. I now see that on May 13th, this method went from abstract to virtual. Setting the LocalizationManager happens in the virtual base method ConfigureServices within SolidDna.

Should we keep setting up the LocalizationManager in this method? What if another user overrides this method and then has no LocalizationManager?

@dhozen
Copy link

dhozen commented Nov 5, 2021

I've been trying to update to the latest version of SolidDna (1.01.13) because the earlier versions (1.01.10 and earlier) don't accept the 2020 interop files and regasm fails. However, 1.01.13 registers OK with the 2020 interops, but crashes on opening swx. This happens, so far as I can tell, in the ConnectedToSolidworks method.

The method successfully creates the taskpane object and gains access to the mswApp, but crashes before any windows show in SolidWorks.

Could this be related to the issue you describe above?

2021-11-05 06_34_39-Helmtool Utilities (Debugging) - Microsoft Visual Studio

@brinkdinges
Copy link
Contributor Author

You should use the same DLL version as SolidDna uses so your project compiles and can be registered. It has no influence on how your app runs. See my explanation here.

If you have a ConfigureServices method in your add-in, delete it so it is not overridden with an empty method.

Have you tried a try-catch around your code in ConnectedToSolidWorks? That should give us a hint and hopefully, an exception message.

@dhozen
Copy link

dhozen commented Nov 5, 2021

Thanks Brink! Commenting out the whole "ConfigureServices" method fixed it.

And thanks for the DLL version explanation...

-Jason S.

@dhozen
Copy link

dhozen commented Nov 5, 2021

Rather thanks Peter :^) Komt u uit Nederland?

@brinkdinges
Copy link
Contributor Author

Awesome, you're welcome. And yes, that's where I'm from ;)

@dhozen
Copy link

dhozen commented Nov 7, 2021

Ik heb in Zaandam een jaar gewoond (1968). Spreek een beetje, maar heb veel vergeten. Danke nog een keer...

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

No branches or pull requests

2 participants