SparkleXrm icon indicating copy to clipboard operation
SparkleXrm copied to clipboard

Accept ÅÄÖ (etc) in plugin names

Open rappen opened this issue 2 years ago • 3 comments

I had a plugin with an ä in the assembly name, class name, steps names. Works just fine!

I used help from spkl instrument-plugin-code.bat to reverse it from the environment to the plugin code, to get the CrmPluginRegistration. Work great!

But when using this to push it back to the environment with deploy-plugins.bat, it crashes badly...

image

Changing all ä to a - and now it works again.

A common issue. In the 1980's.... It should be handled now, I hope 😊

rappen avatar Mar 27 '23 09:03 rappen

Hi @rappen - thanks for this. I agree it should work, and I can't think of why it wouldn't.

This seems to be something to do with the .NET reflection implementation. spkl uses System.Reflection with Assembly.LoadFrom() to load the assembly and search for the attributes (https://github.com/scottdurow/SparkleXrm/blob/master/spkl/SparkleXrm.Tasks/Reflection.cs)

There isn't any option to specify encoding etc.

Did you notice if it was specifically caused by the ä in the assembly name - or was it the class names?

Thanks!

scottdurow avatar Mar 31 '23 18:03 scottdurow

When it appeared, I had an ä in both assembly and the plugin class. I can try to check with either/or also.

rappen avatar Mar 31 '23 20:03 rappen

More details:

In a kosher assemblyname, it works with a plugin class JönäsPlugin. In a assemblyname called Jönäs.Plugin it exploded badly.

image

The instrument-plugin-code.bat works always.

rappen avatar Apr 01 '23 11:04 rappen