Strong name for Interop.Scripting – .NET Framework
Posted by jpluimers on 2012/06/20
So I won’t forget:
I was trying to generate from the interop.scripting.dll which I guess was the automatically generated dll without strong naming. A wrapperof a wrapper apperently doesnt work.
The following did work:tlbimp.exe C:\WINDOWS\system32\scrrun.dll /keyfile:..\nameHere.snk /out:Interop.Scripting.StrongNamed.dll
The suite of .NET projects I’m refactoring relies in part on scripting in the Microsoft Script Runtime because the original was build by people bringing their COM love from the VB6 world into the .NET world.
I don’t see COM as the first class citizen it was in the VB6 era. On the other hand, COM and ActiveX play an important role in the .NET world. Sometimes I regret that, as dealing with COM is hard.
Some consider COM a first class citizen in .NET as it was in VB6, especially after the dynamic keyword was added in C# 4.0. The variant type available since Delphi 2 since 1996 does more or less the same as dynamic keyword in C#. I know how Anders Heijlsberg disliked the Delphi Variant support of COM. But COM is what the market wanted in 1996, and that seems true until today.
But I digress.
At least parts of the .NET code needs to become strongly named, so I’m hesitating:
- kick out the COM stuff – and verify through unit tests that the encompassing code still works – or
- generate a strongly named COM Interop Wrapper as described above.
Not sure yet.
Opinions anyone?
Anyway, I’m expecting a few problems here and there, so I’ll be using the CLR Interop Tools like the P/Invoke Interop Assistant and Type Library Importer in Managed Code where needed.
–jeroen






Te Waka o Delphi · Using History to Make Sense of the Present said
[…] In a recent post on interop in .NET framework, Jeroen Pluimers wrote “I don’t see COM as the first class citizen it was in the VB6 era.” […]