scottdurow / SparkleXrm

An open-source library for building Dynamics CRM XRM solutions using Script#, jQuery & Knockoutjs.
MIT License
264 stars 194 forks source link

Accept ÅÄÖ (etc) in plugin names #471

Open rappen opened 1 year ago

rappen commented 1 year ago

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 😊

scottdurow commented 1 year ago

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!

rappen commented 1 year ago

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

rappen commented 1 year ago

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.