-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
After I converting my package to use dependency injection, I get assembly load exceptions. I checked the public key of the libraries and all of them are correct. The files are physically in the same folder as the main assembly. I even tried signing my assemblies and all the open source assemblies and still have the same problem. Here is a log from ActivityLog.xml that shows that Community.VisualStudio.Toolkit.DependencyInjection.Core
assembly is not able to load the main Community.VisualStudio.Toolkit
assembly.
<entry>
<record>2026</record>
<time>2024/09/10 16:22:40.491</time>
<type>Error</type>
<source>VisualStudio</source>
<description>CreateInstance failed for package [XrmGenPackage]Source: 'mscorlib' Description: Could not load file or assembly 'Community.VisualStudio.Toolkit, Version=17.0.482.0, Culture=neutral, PublicKeyToken=79441d341a79572c' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'Community.VisualStudio.Toolkit, Version=17.0.482.0, Culture=neutral, PublicKeyToken=79441d341a79572c' or one of its dependencies. The system cannot find the file specified.
File name: 'Community.VisualStudio.Toolkit, Version=17.0.482.0, Culture=neutral, PublicKeyToken=79441d341a79572c'
 at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)
 at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
 at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)
 at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)

=== Pre-bind state information ===
LOG: DisplayName = Community.VisualStudio.Toolkit, Version=17.0.482.0, Culture=neutral, PublicKeyToken=79441d341a79572c
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/
LOG: Initial PrivatePath = NULL
Calling assembly : Community.VisualStudio.Toolkit.DependencyInjection.Core, Version=17.0.20.0, Culture=neutral, PublicKeyToken=79441d341a79572c.
===
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: Using application configuration file: C:\Users\G99202\AppData\Local\Microsoft\VisualStudio\17.0_353ed674Exp\devenv.exe.config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Community.VisualStudio.Toolkit, Version=17.0.482.0, Culture=neutral, PublicKeyToken=79441d341a79572c
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
</description>
<guid>{9D0B1940-11E7-41CC-A95A-AD5A6ED3C73B}</guid>
<hr>0x80004005 - E_FAIL</hr>
<errorinfo></errorinfo>
</entry>
Metadata
Metadata
Assignees
Labels
No labels