Primary Interop Assemblies not installing - visual-studio-2010

I have a c# application where I’m trying to access a word document. I added the Microsoft Office 12.0 Object Library to references and I’m able to use
using Microsoft.Office.Core
but not
using Microsoft.Office.Interop.Word
After searching online I was lead to believe downloading the Primary Interop Assemblies would resolve the issue but after downloading and extracting the files and running the o2007pia.msi it begins to run by stating something along the lines of ‘Please wait while the system configures..’, but nothing happens. I’ve ran it several times and tried in VS to add the reference, but I’m only able to add Microsoft.office.core. Is there something I’m missing or there some bug?

Related

Visual Studio Could not load assembly

I have a C# project using MySql.Data and EntityFramework, and have used the Data Entity Model Wizard to create code based on an existing database. I created the project on a machine running MySql Server 8.0.25 (where I cannot control the installed version), so all my references for MySql packages are also version 8.0.25.
When I moved the project onto my own machine, running MySql Server version 8.0.31, the project successfully builds but has an error message, which Visual Studio says comes from a .edmx file:
Error 4: Could not load file or assembly 'MySql.Data, Version=8.0.31.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ... ScheduleModel.edmx 7
The file in question only contains the text "MySql.Data" in one place, and that's an un-versioned reference to "MySql.Data.MySqlClient", on line 7.
Since the project builds and appears to run correctly, I don't know if this error affects anything. Regardless, I would like to understand it and why it happens and ideally make it go away.
Here's what I've learned form searching for an answer and trying to investigate/fix the error:
There are no references to version 8.0.31 anywhere in my project, as using Visual Studio to search the entire project for "8.0.31" found no results.
Answers to others' questions tell me the version number in the error message specifies the version of a file that Visual Studio DID find. (Whereas I would have thought the given version number is the one that it is LOOKING for.)
Several places said that the found version is probably in the GAC. Originally, the error message said MySql.Data.EntityFramework (not just MySql.Data), and I did find MySql.Data.EntityFramework in the GAC. (No idea how it got there.) After removing it, the error message changed to just MySql.Data. However, MySql.Data is not in the GAC, and no MySql.Data.* are still there either.
There's a tool called fuslogvw.exe that supposedly can help with this issue, but I could not get it to work. When I run it, there is nothing in the log. When I click on options, all options are grayed out. The one person's recommended registry edit did not work either. (I tried closing and re-opening Visual Studio after said edit, then re-building.)
Process Monitor tells me that, during the build process, no processes accessed any files that include "MySql.Data" in the name except those under packages/MySql.Data.8.0.25 and the project's output directory; all files are version 8.0.25. This appears to conflict with #1, because how can Visual Studio have found version 8.0.31 if it never accessed any such file?
I tried using bindingRedirect in App.config to redirect from 8.0.31 to 8.0.25, which had no apparent effect.
Cleaning the solution and re-building ends up putting MySql.Data version 8.0.25 back into the output directory, so Visual Studio clearly is finding the correct version.
Deleting the packages folder results in everything being replaced (with the right version, again) but the error message persists. (The rebuild was strangely fast; I'd have thought everything would have to be re-downloaded, but it was too fast to have done that.)
How would I diagnose this issue? What might be causing Visual Studio to look for or to find a version that I cannot find any reference to, or any .dll file for?
I'm using Visual Studio Community 2019, Version 16.11.2.

Can not reference System.data Error when creating project

I am using Visual Studio 2015 Enterprise to generate Coded UI Tests. Things have been working well until this morning. When I attempt to create a new Solution/Project, I am given the following error:
I am then able finish loading the project. However, I see another issue in solution explorer:
Note that there is no path given for the selected reference. If I try to remove it/add it back as a reference manually, I still do not see a path or version. I have tried the following:
Selected different .Net framework versions when creating the solution/project
Tried different project types: Window Forms, Class Library
Repaired visual studio
Repaired .Net Framework 4.6.1
So far I have been unable to make the error go away. Any other suggestions?
I was not able to resolve this issue. I ended up performing a reinstall of the OS/Visual Studio to get things working again.

vb6 project fpSpr60.ocx missing

I got an old vb6 project which I am trying to get going.
I have installed visual studio 6, installed vb6 service pack 6 and the update for service pack 6.
However when I open the project I keep getting the error:
fpSpr60.ocx could not be loaded
I figured out with google this has todo with fpspread but I also find this should be included inside vb6.
Does anyone have an idea where to look for?
This is a third-party OCX which is not shipped with VB6. You must obtain it and install it separately.
(I have no association with the company.)

VS 2010 Problems Referencing COM Objects

I'm trying to create a SSIS project with a Script Task that uses Visual Basic Code.
In it, I'm trying to use the Microsoft Scripting Runtime COM object. My VS 2010 has installed the .NET 4.5 Framework but whenever I try to add the Reference it comes with this problem:
*Edit #2: Visual Studio actually pops up an error:
After checking the References Properties of the Project, the Path says: "The System cannot find the reference path". Even then you can manually reach it yourself.
Upon further investigation I found that ALL COM objects encounter the same issue:
I have seen a number of solutions pointing to a re-install of Visual Studio and the like. Which I have done with no success.
Does anyone have an idea of what could be causing the problem?
*Edit: I think it bears to point, i have tried some funny business with the Interop (setting it to true and to false does nothing). I saw some answers online but this made no difference.

Why is my xml doc file always getting locked?

When building an F# project through Visual Studio 2010 (either Build or Rebuild, or Clean -> Build) where I've checked "XML Documentation file" and specified a location in the Build tab of the properties page, I frequently but sporadically run into build failures:
FSC: error FS0193: Access to the path 'xxx.XML' is denied.
I've experience this with several F# projects / solutions. Most of the time I then just turn it off, but I recently noticed then documentation isn't built into the compiled assemblies (I apparently falsely assumed that the XML doc was only for possible external processing and that the doc comments would always get built in).
Any help appreciated.
I know we fixed this bug in VS2010 for F#. I seem to recall that C# and VB had the bug as well (dunno if they fixed it, I can investigate). Do you have a C# or VB project referencing the F# project? (Are you building the solution, or a specific project?)

Resources