I am running Visual Studio 2010, .NET 4.5, and Office 2010. I get a warning on some legacy code that I am trying to run that I am missing an assembly reference for Microsoft.Office.Interop.Excel==12.0.0.0
and Microsoft.Office.Interop.Access==12.0.0.0
.
After searching, I was able to find this post
I installed the Primary Interop Assemblies, they show up in my control panel when I go to Add/remove programs. However, I still do not have a selectable reference to the interop assemblies from the add reference dropdown for COM or .NET addins in Visual Studio. I also do not have the interop assemblies when I navigate to C: > Windows > assembly > GAC
, as was suggested in the previous post.
Searching my system for anything labeled '.Interop' does not yield the Office.Interop files. Really frustrating, because it says that the assemblies are installed.
Adding a simple reference to Microsoft.Excel and Microsoft.Access COM addins does not remove the warnings.
UPDATE: I was able to get this working. Version 12.0 of the Interop Assemblies is native to Office 2007. I was running Office 2010 which has version 14.0 of the assemblies. The assemblies are backwards compatible, but I was unable to 'see' them in the browser because I had to select my project to build on 'Any CPU' instead of just 'x86'.
Yes, you are right. You need Excel to be installed to use the Excel Manipulation feature with Microsoft. Office.
I was able to get this working. Version 12.0 of the Interop Assemblies is native to Office 2007. I was running Office 2010 which has version 14.0 of the assemblies. The assemblies are backwards compatible, but I was unable to 'see' them in the browser because I had to select my project to build on 'Any CPU' instead of just 'x86'.
You need to select 'Microsoft Office Developers Tools' when installing visual studio. See http://msdn.microsoft.com/en-us/library/54ds2za4%28v=vs.100%29.aspx
Btw, if you get 'A selected drive is no longer valid' message when changing vs setup, uninstall sp1 first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With