GUID Conflict by creating a new version of a grasshopper custom component

Hello,

I copied my old component and replaced the guid’s in the following files:

  • …Component.cs
  • …Info.cs
  • Properties/AssemblyInfo.cs

Now I have my old component in special folder/… and the path of the new component is pasted to GrasshopperDeveloperSettings.
But when I build the new version of this component I get a guid conflict. Why does it happens? Is there another code part, which should be changed?

Best,

Dimitrij

So you have two GHA files and they both only contain a single Plugin GUID and a single GH_Component?

Does Grasshopper tell you the value of the conflicting GUID?

Hello David,

yes I have two GHA files and they both contain a single plugin guid and a single GH_Component.

I get this error:

Loaded Component:
Name: MyCustom
Type: My_Custom.MyCustomComponent
Assembly: [path to gha file]
Version: [date and time] {1.0.0.0}

Conflicting Component:
Name: MyCustom
Type: My_Custom.MyCustomComponent
Assembly: [path to gha file]
Version: [date and time] {1.0.0.0} <- I can’t understand because I changed the version in Properties/AssemblyInfo.cs

After pressing the skip button I get this message:

grafik

If I remove the old component from the special folder then it works properly.

Best,

Dimitrij

So either that Guid (c296f5d7-f20a-4408-bcd3-e0c2dd61111a) is still in both projects, or (and this sounds more likely given your details so far), Windows thinks that both these GHA files are in fact different versions of the same assembly, and therefore only loads one of them. It’s being smart and resolving a versioning issue.

I think if you really want to be able to run both versions of your plugin at the same time, then you must also make sure that the assembly identifiers are different. I’m not 100% sure what goes into assembly conflict detection, but the FullName or StrongName is probably going to be important.

Ok. I think the easiest way to solve the issue is, to create a new component and to to copy and paste the code.

Best,
Dimitrij