Hello,
I am trying to migrate code that was once my macros to a VS package.
This is for VS 2015 Community on Win 10.
About three years ago, I had managed to convert the macros to an addin.
I've been using that ever since. (If Microsoft hadn't done away with
addins for VS 2015, I wouldn't be bothering with any of this.)
I believe that I have successfully managed to get an interface from
a VS Package (with commands) to the library for the addin. At least,
everything seems to work well enough within the experimental instance
of Visual Studio 2015.
Now I'm trying to figure out how to install the VS Package to the
active (working) instance of Visual Studio - to create an installation
package for distribution.
I have copied the generated .pkgdef file for the package to the
prescribed folder:
%vsinstalldir%\Common7\IDE\Extensions\
When I restarted Visual Studio, nothing worked for my bound keystrokes
within the addin library.
(Somehow, I had a feeling that it wasn't going to be that simple.)
My speculation is that I probably need to create a .pkgdef file for
the library (.dll) file for my addin. There is another library (.dll)
file that augments the addin, so I probably need to create a .pkgdef
file for that as well ... right?
I tried to apply the "CreatePkgDef" utility to the two library files:
https://msdn.microsoft.com/en-us/library/dd891105.aspx
I've got the following error for both libraries:
CreatePkgDef : error : ArgumentException: No Visual Studio registration attribute found in this assembly.
The assembly should contain an instance of the attribute 'Microsoft.VisualStudio.Shell.RegistrationAttribute'
defined in assembly 'Microsoft.VisualStudio.Shell.Immutable.10.0' version '10.0.0.0'
So it would seem that I need to apply an attribute to ... what?
... to each class within each of the libraries?
... or to something else?
Would the attribute be:
[PackageRegistration(UseManagedResourcesOnly = true)]
(I should mention that the libraries are written in Visual Basic,
as that was the only language that macros could be written in.)
Am I even on the right track?
Is there a simpler approach that I'm clueless about?
I would greatly appreciate it if an expert on this would clue me in.
Thanks!
Wally