1

I have a Win10 clean install with VS2015 installed. I have Office 2010 for Home and Student. My VB.NET app's msi file was built in 2011 on a machine with Office 2000 installed, and it still works now to install my app in Win10. The installed app exports data to Excel and that still works.

Now I want to update the app with VS2015, but I get build errors, e.g.: Type 'Excel.Workbook' is not defined. I found out that I should load the Office Interop Assemblies.

I downloaded and ran o2010pia.msi, but nothing showed up in "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Visual Studio Tools for Office" where I think they should live. Possibly the installation code is not yet recognizing VS2015 as Visual Studio 14.0?

In searching for answers, I found references to "PIAs in the GAC" and "reference a local copy of the PIAs in your source control tree". But I don't know what these mean!

How can I fix this?

MartinDuo
  • 663
  • 12
  • 25
  • I found the answer here: http://stackoverflow.com/questions/21986323/cannot-find-microsoft-office-interop-visual-studio – Huy Nguyen Oct 19 '16 at 23:19

3 Answers3

3

I also missing Microsoft.Office.Interop.Excel.dll after installing Win10.

I find it in

"C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Excel\15.0.0.0__71e9bce111e9429c".

Maybe you can search it in C:\Windows\assembly.

G.L.P
  • 7,119
  • 5
  • 25
  • 41
Bubu
  • 31
  • 2
1

I found a solution to my problem. I had spent days googling around for answers about missing PIAs and error messages about .NET 3.5 not found. I tried many suggested workarounds, but none worked for me. But...

Because I have ReSharper from JetBrains installed, I stumbled upon this from a left-click on my project folder which shows a context menu with this link: "Optimize References..."

So as an experiment, I clicked it. It ran and did whatever it does (besides reporting). I did nothing! Now my project builds, runs, and automates Office Excel just like it did before my Windows 10 and VS2015 upgrade.

Here's a reference: http://blog.jetbrains.com/dotnet/2012/01/03/optimizing-assembly-references-with-resharper-61/. Hope this helps somebody.

MartinDuo
  • 663
  • 12
  • 25
0

Just had the same issue after an upgrade from Windows 7 to 10. I resolved it by bringing up the references, writing down the path to the Microsoft.Office.Interopt.Excel.dll, removing the reference, re-adding it, then rebuilding the project.