(I am re-posting my question here because this place appears to be the better one; the old post has been removed)
I am trying to create a simple tool which reads the contents of a given source file and creates an output file. But - so far - I failed miserably, even with the most simple version of such a tool (which does nothing yet but should be formally present as a selectable tool).
The attempt to compile the tool fails with
error MSB3212: The assembly "C:\UserData\Manfred\Projekte\VSTool1\bin\Debug\VSTool1.dll" could not be converted to a type library. Type library exporter encountered an error while processing 'VSTool1.MessagesCompiler, VSTool1'. Error: Element nicht gefunden.
This is the file I used for registration of the tool:
WindowsRegistryEditorVersion5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\CLSID\{C45581D1-8A4F-46D6-B560-A8FF878D4224}]@="My Custom Visual Studio Tool""InprocServer32"="C:\\WINDOWS\\system32\\mscoree.dll""ThreadingModel"="Both""Class"="Microsoft.VSDesigner.CodeGenerator.TypedDataSourceGenerator.DataSourceGeneratorWrapper""Assembly"="Microsoft.VSDesigner, Version=14.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\Generators\{164b10b9-b200-11d0-8c61-00a0c91e29d5}\VSTool1]@="Microsoft VB - My Custom Visual Studio Tool""CLSID"="{C45581D1-8A4F-46D6-B560-A8FF878D4224}""GeneratesDesignTimeSource"=dword:00000001[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\Generators\{fae04ec1-301f-11d3-bf4b-00c04f79efbc}\VSTool1]@="Microsoft C# - My Custom Visual Studio Tool""CLSID"="{C45581D1-8A4F-46D6-B560-A8FF878D4224}""GeneratesDesignTimeSource"=dword:00000001[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\Generators\{e6fdf8b0-f3d1-11d4-8576-0002a516ece8}\VSTool1]@="Microsoft J# - My Custom Visual Studio Tool""CLSID"="{C45581D1-8A4F-46D6-B560-A8FF878D4224}""GeneratesDesignTimeSource"=dword:00000001
And this is the source code of the tool:
usingSystem;usingMicrosoft.VisualStudio;usingMicrosoft.VisualStudio.Shell.Interop;usingSystem.Runtime.InteropServices;namespaceVSTool1{[Guid("C45581D1-8A4F-46D6-B560-A8FF878D4224")][ComVisible(true)]publicclassMessagesCompiler:IVsSingleFileGenerator{publicintDefaultExtension(outstringInputfileRqExtension){InputfileRqExtension=".txt";returnVSConstants.S_OK;}publicintGenerate(string wszInputFilePath,string bstrInputFileContents,string wszDefaultNamespace,IntPtr[] rgbOutputFileContents,outuint pcbOutput,IVsGeneratorProgress pGenerateProgress){thrownewNotImplementedException();}}}
As far as I understand the system the above should be a good skeleton for such a tool (except that it doesn't produce any output yet) Simple enough - or too simple? I cannot make it build without that error message.
The Guid in the source file has been generated with the CreateGUID tool of CS2015 (according to one of the several advices I found regarding similar problems).
I had found several posts regarding this message but none of them appeared to be matching my case. So I hope now that somebody can give me a hint how I can proceed - thank you in advance.