T O P I C R E V I E W |
JakubH |
Posted - Feb 21 2023 : 03:08:53 AM 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.
|
2 L A T E S T R E P L I E S (Newest First) |
JakubH |
Posted - Feb 21 2023 : 08:06:53 AM Yes, that was it! The csproj had PlatformTarget x86 instead of AnyCPU (the depencency was OK already). Thank you! |
Dusan |
Posted - Feb 21 2023 : 07:57:06 AM Make sure all assemblies are compatible with 64 bit. If there is any x86 dependency, it will not work. |
|
|