Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Custom SourceLinks Plugin does not work in VS 2022
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

JakubH
Junior Member

10 Posts

Posted - Feb 21 2023 :  03:08:53 AM  Show Profile  Reply with Quote
Our custom Source Links plugin which works without problems in Visual Studio 2019 cannot be loaded in Visual Studio 2022. This appears in VA.log:
quote:
ERROR: [SourceLinks] Exception Caught:
An exception occurred during validation of plugin assembly: "C:\TOOLS\SourceLinksPlugin\SourceLinksFileMakerPlugin.slp"
Callstack:
at e6.i.d()
Inner Exception [1]:
Could not load file or assembly 'file:///C:\TOOLS\SourceLinksPlugin\SourceLinksFileMakerPlugin.slp' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Callstack:
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at e6.d.b(String assemblyPath)
(6250 t)


The SourceLinksExamplePlugin loads correctly even in VS 2022, so it must be some problem in our code or its dependencies, but I do not know how to find out what causes the issue. Can you give us a hint what can be wrong or how we get more detailed diagnostics?

Our plugin is quite simple modification of the example code, built under .NET Framework 4.6.1, with added dependency on our ODBC client which is built as DLL under .NET Standard 2.0.

Dusan
Whole Tomato Software

Slovakia
177 Posts

Posted - Feb 21 2023 :  07:57:06 AM  Show Profile  Reply with Quote
Make sure all assemblies are compatible with 64 bit.
If there is any x86 dependency, it will not work.
Go to Top of Page

JakubH
Junior Member

10 Posts

Posted - Feb 21 2023 :  08:06:53 AM  Show Profile  Reply with Quote
Yes, that was it! The csproj had PlatformTarget x86 instead of AnyCPU (the depencency was OK already). Thank you!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000