.net - Automatically Reloading a Referenced COM Interop Assembly when it is Rebuilt -


I have a Visual Studio 2008 solution that has the following projects:

  • A C + + / ATL COM library
  • A C # library which uses a CD library
  • A C # unit test library (using MSTEst) that references the other two libraries

The C + + COM library project has a custom build phase that creates a .NET Interop library , Which looks like this:

  tlbimp /asmversion.1.1.0.0 "$ (TargetPath)" / out: "C: \ libraries \ MyProject.Interop.dll"  

Then c # library and C # unit test library reference c: \ libraries \ MyProject.Interop.dll .

My problem is that when I am modifying the IDL in the CD library, the library and interop library are rebuilt, but C # projects still have copies of the old interop libraries in which the output directory , And they do not get the update, I have manually removed those old libraries so that the new can be identified.

I can get almost to work on the falls by setting a local property copy for reference in C # projects. But then I'm having problems running the unit test because the Interop Library is not copied to the test diploma spot.

I can hack around it by adding more custom build steps for deleting and / or copying libraries, or futzing with unit-test deployment, but whenever there is Visual Studio only Is there some easy way to use updated interop library everywhere?


Comments

Popular posts from this blog

google indexing -

wpf - Custom Message Box Advice -

Eclipse CDT variable colors in editor -