Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 403801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:14:59+00:00 2026-05-12T17:14:59+00:00

Scenario: I have a project containgin two C# projects, which for historical reasons must

  • 0

Scenario: I have a project containgin two C# projects, which for historical reasons must communicate with each other using COM (via COM Interop). The COM Server is an in-process automation object (call this the “Server”) and the COM Client is a simple C# Console application that loads the server like this:

        var objTypee = Type.GetTypeFromProgID("ProgID.Interop3264");
        var objLateBound = Activator.CreateInstance(objType);

Visual studio automatically registers assemblies for COM Interop if that option is enabled in the project settings, so that’s what I use to register the Server (I’m only interested in the developer experience here, installation is a seperate issue) and everything works fine as long as the projects are set to generate 32-bit code or the COM Client is 32-bit.

The problem comes when developing on a 64-bit system and both projects are set to generate code for ‘Any CPU’ which results in them running in 64-bit mode. This yields the following error:

"Retrieving the COM class factory for component with CLSID {6F597EDF-9CC8-4D81-B42E-1EA9B983AB02} failed due to the following error: 80040154."

After some investigation, it seems that the MSBuild scripts only perform 32-bit registration. It does put the ProgID into the 64-bit registry section, along with its subkey CLSID, and the proper classID. But the CLSID{clsid} stuff is not there. It’s only in the WOW6432 subtree, for 32-bit. So the activator cannot retrieve the class factory because it can’t find the thing.

I’ll be really impressed with the SO community if I get an answer to this one, but here goes:

Has anyone else run accross this problem? How did you solve it? What’s the easiest way to ensure that COM Interop assemblies get correctly registered on 64-bit development machines?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T17:15:00+00:00Added an answer on May 12, 2026 at 5:15 pm

    We’ve encountered this problem and solved it by setting projects up to generate assemblies for x86. This is suboptimal, of course, but we also have several native 32-bit libs, so we had to do that anyway.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider this scenario: I have a project with two modules and one common module
Is there a naming convention for the following scenario: I have a project which
I have the following scenario: I have 2 projects: Proj1 Proj2 Each of these
here's my scenario: I have three projects: two DLLs and one console application, let's
Here is my scenario: I have an Eclipse project in my desktop in a
The Scenario I have an ASP.NET web project. I want to be able to
I have a scenario where customers are asking to develop a new project on
My scenario is such that I have a VB.NET project in SVN and I
We've got into a very tricky scenario in a project. We have used lot
I have the following scenario: a table of projects and a table of persons,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.