Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a third party application that I am providing plugins for. The app provides some WPF DLLs that i can use to build my plugin GUI on, so my GUI depends on both WPF and these app DLLs. I also have a separate C++ DLL that does the processing and initializes the plugin /including the GUI). this creates dependent references like this:

MyGui.dll (C# / WPF)
- foreign exe WPF-DLLs
- some .NET DLLs
- system DLLs

MyPlugin.dll (C++ / CLR)
- MyGui.dll
- foreign exe WPF-DLLs
- some .NET DLLs

The deployment works on most machines, but on some the plugin causes undefined behaviour, up to and including crashing the application.

I did some analysis, mainly comparing to plugins that work, and found that another plugin specifically sets the CopyLocal flag to true. However, this isn't necessary on my machine, and I'm not sure what the effect of this setting is on my machine, or on deployed machines.

Here are my questions, all regarding deployment only (I am aware that you may come up with different answers when only looking at the dev machine):

C++ references:
1. When do I need to set the flag "Copy Local"?
2. When do I need to set the flag "Copy Local Satellite Assemblies"?
C# references:
3. When do I need to set the flag "Copy Local"?
4. When/how do I need to set the flag "Specific version"?

All with reference to the dependencies outlined above.

What I have tried:

I got some helpful information here .net - When should copy-local be set to true and when should it not? - Stack Overflow[^] But since I am only beginner level regarding .net, I have some trouble understanding the information provided there (e. g. what does GAC mean, and how can I find out what is in it)

Update:
I've found an explanation on GAC on Wikipedia and a few more insightful bits of information. I do understand the descriptions insofar as the flags are used on the devs machine. But that is not my question!

Setting these flags or not clearly have an effect on deployment! This is what makes my plugin fail or run on some machines it's deployed to! However, I still haven't found the slightest bit of information how these flags affect deployed assemblies.

Maybe this effect on deployment is a side effect not originally intended to be triggered by these flags. If so, it might be worth a bug report, although I have no idea what, exactly, is causing the problem, or how to reproduce the issue.
Posted
Updated 18-Jan-22 3:43am
v2

1 solution

"what does GAC mean"

Global Assembly Cache

"can I find out what is in it"

Google it - Global Assembly Cache - .NET Framework | Microsoft Docs[^]

The rest you can google as well.
 
Share this answer
 
Comments
Stefan_Lang 18-Jan-22 9:49am    
I have already found that Wiki entry after posting the question, but it doesn't solve the actual problem: I have explicitely set these flags in a reasonable manner for my devs machine. But doing this caused undefined behaviour of the plugin on some machines it was deployed to!

I could not find any info on what these flags do with respect to deployment. According to the descriptions, there doesn't seem to be any relation. But the effect is clearly there! I had hoped for a better description of what these flags really do, but the only info I find is on how to set it to improve my build times. But build times is not my problem at all!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900