DSL tools: how to create a DLL as weak

I have a DSL Tools solution.

I need to add a link to weak names for this project. Since the DLL tools project is strongly identified, I cannot use a weakly named DLL.

I cannot do the DLL syntax because I cannot recompile it.

I tried to make my DLL project dll projects a weak name by going to the Dsl and DslPackage project properties and not clearing the Sign Assembly checkbox in the Sigining tab.

Then we compile it. The error list displays the following error:

"gacutil.exe" exited with code 1

      

Looking at the VS2005 output window I can see that gacutil is being called

C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin\gacutil.exe -nologo -i "C:\Academy\ResearchAndDevelopment\FrontendGenerator\DslPackage\bin\Debug\vantyx.FEGenerator.DslPackage.dll"

      

After that, I used the command line and the gacutil.exe error shows up like this:

Z:\>"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin\gacutil.exe" -nologo -i "C:\Academy\ResearchAndDevelopment\FrontendGenerator\DslPackage\bin\Debug\vantyx.FEGenerator.DslPackage.dll"
Failure adding assembly to the cache: Attempt to install an assembly without a strong name

      

I don't know why or how gacutil.exe is called. I have looked at project and solution properties and there is no option configured to call gacutil.exe. I even looked into every file for "gacutil.exe" but couldn't find anything.

What I really want is to be able to use a weakly named DLL, which I cannot call strong. As a result of this, I tried to make my DLL tools DLL weak, but I can't.

Any help on how I can solve this?

Thanks a lot in advance, Luis Filipe

0


source to share


2 answers


Using runtime binding with reflection is a good solution and works. The other solution I have implemented besides this is to launch a separate AppDomain application and an AppDomain application to load the assembly and run any methods you want. The disadvantage of this approach is the added complexity and performance. Indeed, you need to know what it does, as in practice it launches a separate .net application in the Visual Studio process space. The upside is that with some care, you can get type safety all the way through.



+1


source


Except for the answer posted above, All Visual Studio add-ins should be strong.

Some problems can be solved by loading the assembly at runtime and using reflection to call the methods.



Regards, Luis

+1


source







All Articles