Out of nowhere after running this application in debug mode I get the following exception.
Could not load file or assembly 'Infragistics2.Win.v11.1, Version=11.1.20111.2111, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' or one of its dependencies. The system cannot find the file specified.
In the references I am only referencing 'Version=11.1.20111.1003'. I do have this version (Version=11.1.20111.2111), as well as the Version=11.1.20111.1003, on the computer, but I don't know why the application is failing when I try to load a form. The statement I use to load the form is Application.Run(New frmMain). I can't even step into the load event. It simply crashes right there with the exception above.
I have cleared the licenses.licx file, cleaned the solution and rebuilt it several times. I have checked for any reference to the Version=11.1.20111.2111 and can find none anywhere.
I have checked the forum. I have googled the exception. I simply can't find a solution. Please help with any troubleshooting tips and / or tools that I can use to fix this.
Hello,
There is a reference to 11.1.20111.2111 somewhere in your application. These are the places that are possible to find the reference:
Is it possible to get the call stack for the crash? This might give some hints as to what is causing the issue. This should be in the exception details.
Note that by default when doing .NET development and debugging Visual Studio is set to skip over code that you don't have debug symbols for so that will cause it to skip over the Application.Run method when you step through the code. You can uncheck the Enable Just My Code option in the debugger options and enable Framework Source Stepping to change this behavior.
Let me know if you have any questions with this matter.
Alan,
I took your suggestion - You can uncheck the Enable Just My Code option in the debugger options and enable Framework Source Stepping to change this behavior. I still can't step into the form.
Here is the Stack Trace. I don't see much help there.
at QualCorp.QueryPlus.UI.frmMain..ctor() at QualCorp.QueryPlus.UI.QueryPlus.Startup.Main() in C:\Users\dsmith.QCI.000\Documents\Visual Studio 2010\Projects\QueryPlus 5.0\QueryPlusCopyright\QueryPlus\QueryPlus5\UI\Module1.vb:line 42 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
Here is the exception.
{"Could not load file or assembly 'Infragistics2.Win.v11.1, Version=11.1.20111.2111, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' or one of its dependencies. The system cannot find the file specified.":"Infragistics2.Win.v11.1, Version=11.1.20111.2111, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"}
Here is the inner exception.
{"Could not load file or assembly 'Infragistics2.Win.v11.1, Version=11.1.20111.1003, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' or one of its dependencies. The system cannot find the file specified.":"Infragistics2.Win.v11.1, Version=11.1.20111.1003, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"}
The exception is happening in the constructor of the form so you might be able to put a break point there. It is possible that even with these settings if the debug symbols aren't available that the code is still skipped over.
The exception details are showing that it can't load either version of the assembly. In your initial post, you mention that you have both versions on the system so I assume that these aren't in the GAC on the machine or in the bin directory of your application.
What are the contents of the bin directory when the applications is compiled are the Infragistics references there? If yes, is the Infragistics2.Win.v11.1 assembly there? If no, do you expect them to be (or are you loading them from the GAC)?
If they are missing and you expect them to be in the bin directory, changing "Copy Local" to true on the references will put them there when you compile the application.
If they aren't in the GAC, what version is there? If any?
Sincerely,Alan HalamaSupport Architect
Thank you for posting the resolution, I am glad to hear that it is now working.
Thanks for all your help. Although nothing actually worked to step into the code, it led me to the answer. I started looking back in to TFS. Somehow the references were changed in the vbproj file. The application actually needs to reference the 11.1.201111.2111 version not the 11.1.20111.1003 version. I changed the reference and now I am up and running.