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

  • Home
  • SEARCH
  • 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 3720512
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:14:27+00:00 2026-05-19T05:14:27+00:00

My C# program uses a COM component via an interop assembly. The COM component

  • 0

My C# program uses a COM component via an interop assembly. The COM component sometimes changes (methods are added at the end of interface). I need to build this program in an automated build and have the interop assembly incrementing its version number – this can be achieved by using tlbimp as a pre-build step.

The problem is that the reference in the project file is set to some specific version (say 4.0.0.34) – the one which the interop assembly had when the reference was added. Once the number is incremented by an automated build and the pre-build step is done the version number store in the project file no longer matches the number in the assembly properties and I get

warning MSB3245: Could not resolve this reference. Could not locate the assembly “Interop.MyCOMComponent, Culture=neutral, Version=4.0.0.34, processorArchitecture=MSIL”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

and then

The type or namespace name ‘MyCOMComponent’ could not be found (are you missing a using directive or an assembly reference?)

Can I somehow tell Visual Studio that I don’t want to store the exact assembly version inside the project file and it should use whatever version it sees at compile time?

  • 1 1 Answer
  • 0 Views
  • 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-19T05:14:28+00:00Added an answer on May 19, 2026 at 5:14 am

    The thing that worked for me was to remove the “COM” reference and add the reference to the interop assembly as if it was a normal “.NET” reference. Since the latter doesn’t store a version number the problem got solved once and for all.

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

Sidebar

Related Questions

I have a program that uses JAMA and need to test is a matrix
I have a program that uses GLUT for its OpenGL rendering. Now I need
I'm using VS2008 SP1 under Vista SP1. My .Net-program uses a COM reference to
I have an application that uses COM interop to create a spreadsheet which is
I have a C# program that uses a native C++ COM object. Visual Studio
One of classes in my program uses some third-party library. Library object is a
I have a program that uses the mt19937 random number generator from boost::random. I
Consider this Python program which uses PyGtk and Hippo Canvas to display a clickable
I'm writing a program that uses SetWindowRgn to make transparent holes in a window
I have a Python program that uses the threading module. Once every second, my

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.