Our group uses Windows 7 and Office 2010 to use an internally-developed InfoPath form. The development team has recently upgraded to Office 2013 and Visual Studio 2012.
The first form published cannot be run on two of our users' systems, but runs on all the others. The error is:
InfoPath cannot open the
selected form because of an error in the form's code.
Could not load file or assembly
'C:\Users\William_Clogher\AppData\Local\Microsoft\InfoPath\FormCache3\70D634A9.385\e024d33cab5dd6c6$f7d1d1b252f648c\
Final
SOW.dll' or one of its dependencies. This assembly is built by a runtime newer
than the currently loaded runtime and cannot be loaded.
Being an InfoPath 2010 project, after upgrading to InfoPath 2013, we did not change the target framework. It remains .NET 2.0.
When building the project under 2013 for the first time, we had to remove four references that could not be found:
No other attributes of the build were changed.
The two "bad" systems appear to have the same configuration as all the other ones that work. .NET 2, 3, 3.5 and 4 (full and client) are loaded on all per company policy.
So my question is, what part of the assembly of this form (Final_SOW.dll) is incompatible with these two users' systems? How shall I debug this? I've attached a list of all references, and the version information for each, in case that helps.
Paul
Name: Microsoft.MSHTML
Path: C:\Windows\assembly\GAC\Microsoft.MSHTML\7.0.3300.0__b03f5f7f11d50a3a\Microsoft.MSHTML.dll
Runtime Version: v1.0.3705
Version: 7.0.3300.0
Name: Microsoft.Office.Infopath
Path: C:\Program Files\Microsoft Office\Office15\InfoPathOM\InfoPathOMV14\Microsoft.Office.Infopath.dll
Runtime Version: v2.0.50727
Version: 14.0.0.0
Name: Microsoft.VisualStudio.Tools.Applications.Adapter
Path: C:\Program Files\Common Files\Microsoft Shared\VS7DEBUG\Program Files\Reference Assemblies\
Microsoft\VSTA30\v11.0\.NET2.0\Microsoft.VisualStudio.Tools.Applications.Adapter.dll
Runtime Version: v2.0.50727
Version: 8.0.0.0
Name: Microsoft.VisualStudio.Tools.Applications.Contract
Path: C:\Program Files\Common Files\Microsoft Shared\VS7DEBUG\Program Files\Reference Assemblies\
Microsoft\VSTA30\v11.0\.NET2.0\Microsoft.VisualStudio.Tools.Applications.Contract.dll
Runtime Version: v2.0.50727
Version: 8.0.0.0
Name: System
Path: C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll
Runtime Version: v2.0.50727
Version: 2.0.0.0
Name: System.AddIn.Contract
Path: C:\Program Files\Common Files\Microsoft Shared\VS7DEBUG\Program Files\Reference Assemblies\
Microsoft\VSTA30\v11.0\.NET2.0\System.AddIn.Contract.dll
Runtime Version: v2.0.50727
Version: 2.0.0.0
Name: System.Data
Path: C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll
Runtime Version: v2.0.50727
Version: 2.0.0.0
Name: System.Drawing
Path: C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll
Runtime Version: v2.0.50727
Version: 2.0.0.0
Name: System.Web
Path: C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll
Runtime Version: v2.0.50727
Version: 2.0.0.0
Name: System.Windows.Forms
Path: C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll
Runtime Version: v2.0.50727
Version: 2.0.0.0
Name: System.Xml
Path: C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll
Runtime Version: v2.0.50727
Version: 2.0.0.0