Registry Capture Utility - Win 7 RC1 - by ZackSte

Status : 


Sign in
to vote
ID 466157 Comments
Status Active Workarounds
Type Bug Repros 22
Opened 6/10/2009 9:02:58 PM
Access Restriction Public


From my own experiments I have determined that there is a compatability issue with the regcap.exe utility in Visual Studio 9 Pro.  If someone is trying to create an installation project for a class library project that must be registered for COM interop and be COM visible, the regcap utility is run during the Build process for the Installaton project.  During the build of the installation project, the regcap.exe utility crashes.

To avoid this, Visual Studio must be run in compatability mode for Vista Service Pack 2 or below. 
Sign in to post a comment.
Posted by Samer Gad on 7/11/2011 at 5:17 AM

It's a shame for a bunch of Microsoft engineers to provide a workaround instead of a real fix for such serious problem.
Posted by Microsoft on 5/23/2011 at 10:26 AM

We have the project that you attached and was able to reproduce the issue. However, after apply the workaround suggested below, the issue was resolved. Can you please try this workaround (if not already) and let us know if it works for you?

1) Navigate under %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\Tools\Deployment    
2) Right-click on regcap.exe go to Properties
3) Select the Compatibility tab
4) Check the checkbox under Compatibility mode

Please let us know within the next 7 days whether this resolves the issue.

Thank you.
Posted by ZackSte on 5/17/2011 at 11:03 PM
I think I may have attached the repro a couple times. This is a very simple example solution. An important point might be that the example project should be built before the setup project to ensure it's in the registry.

Here is the output from a quick run with administrator priviliges on Windows 7 Ultimate RTM with Visual Studio 2008 Professional SP. The warning line is the bug.

------ Build started: Project: ExampleProject, Configuration: Debug Any CPU ------
C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\ExampleProject.dll /target:library Class1.cs Properties\AssemblyInfo.cs

Compile complete -- 0 errors, 0 warnings
ExampleProject -> C:\Users\Michael Stephens\Documents\Visual Studio 2008\Projects\VisualStudio2008RegCapBug\ExampleProject\bin\Debug\ExampleProject.dll
------ Starting pre-build validation for project 'VisualStudio2008RegCapBug' ------
------ Pre-build validation for project 'VisualStudio2008RegCapBug' completed ------
------ Build started: Project: VisualStudio2008RegCapBug, Configuration: Debug ------
Building file 'C:\Users\Michael Stephens\Documents\Visual Studio 2008\Projects\VisualStudio2008RegCapBug\VisualStudio2008RegCapBug\Debug\VisualStudio2008RegCapBug.msi'...
WARNING: Unable to create registration information for file named 'ExampleProject.tlb'
Packaging file 'ExampleProject.tlb'...
Packaging file 'ExampleProject.dll'...
========== Build: 2 succeeded or up-to-date, 0 failed, 0 skipped ==========
Posted by Microsoft on 5/17/2011 at 5:49 PM
Toby75Logica - We are unable to reproduce the issue on VS2008. After applying the workaround, the problem does not reproduce anymore. Please attach a sample project that exhibits this problem if you continue to hit this issue.

Rudi - Euricom - This issue is supposed to be fixed in VS2010 SP1. Can you please attach a sample project that exhibits this problem?

Thank you.
Posted by Rudi - Euricom on 5/17/2011 at 3:27 AM

I have a single class library with ComVisible(True), it used to build without any issues.
I added a Test project and needed the InternalsVisibleTo attribute, and had to comment the AssemblyDelaySign, AssemblyKeyFile and AssemblyKeyName attributes. I also uncommented [assembly: AssemblyVersion("1.0.*")] attribute. And since then I get this dreaded error and dialog with every build.

I'm totally not sure which event coused the problem to start. But it did.

So I used the workaround, but that only solved the problem partially.
Now each 'first' time I build, I get an error
'Cannot register assembly foo.dll - access denied. Please ....running as administrator'
Note: I am running as Administrator
The next time I build, all is well.
5o its still pretty annoying.

Win7 SP1 + VS2010 SP1
(with all updates)
Posted by Toby75Logica on 5/4/2011 at 11:33 AM
I have a solution containing 3 class library projects and a setup-project.
The library projects are all marked as "make assembly COM visible"
When building the setup-project I get this error "Visual studio registry capture utility has stopped working".
This message is displayed in messagebox where you can choose to debug or close the program. When closing the program the build continous and finishes, but can I trust the setup to work correctly ?

I am building the solution on a Win 7 Prof (64bit) with VS 2008
This problem did not occurred when building the solution on a Win XP machine
Posted by Microsoft on 5/3/2011 at 10:52 AM
What is the problem you are encountering? Crash or error? If error, what is the error message?

Thank you.
Posted by Toby75Logica on 5/3/2011 at 1:28 AM
This fix does not work for Win 7 Ultimate with VS 2008 (running as Administrator)
Posted by Microsoft on 4/21/2011 at 3:40 PM
This issue is fixed in VS2010 SP1. For VS2008, the workaround suggested below might work as well. Here is the workaround (pasted from below):
1) Navigate under %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\Tools\Deployment
2) Right-click on regcap.exe go to Properties
3) Select the Compatibility tab
4) Check the checkbox under Compatibility mode

Please give this a try and let us know if it works. Thanks.
Posted by ksharma_deepak on 4/20/2011 at 11:12 PM
is there any update on this issue? i am using vs2008 on windows 7 and i am unable to capture the registration entries through regcap.exe even after putting it in compatibility mode. please suggest a work arond
Posted by Microsoft on 2/28/2011 at 3:18 PM
This is fixed in VS2010 SP1.
Posted by ndrouin on 2/2/2011 at 10:00 PM
Is this fixed in Visual Studio SP1 Beta?

Note: I was not successful in using the workaround.

My workaround, if you can call it that, was to change from vsdrfCOM to vsdrfCOMSelfReg. This avoids calling RegCap.exe. As explained here:

Posted by Microsoft on 10/18/2010 at 11:45 AM

Thank you for reporting this issue. We have fixed this issue in the next release of Visual Studio.

Thank you.
Posted by Spencer Putt on 8/6/2010 at 12:18 PM
I am getting this crash on Windows XP SP3 with Visual Studio 2010. It is not just confined to Windows 7.
Posted by Porges on 8/2/2010 at 8:09 PM
This fix does not work for me. I have enabled compatibility mode (@ Vista SP2), and "Run as administrator", but neither have helped.

I'm running VS2010 as Administrator, if that helps.
Posted by DeathByVisualStudio on 6/1/2010 at 9:06 PM
I'm glad the workaround was posted but I have to say I'm very disappointed that this was not fixed. It is a daily struggle to use your tools to write software (bugs, crashes, rediculously bad designers, etc.) and when you overlook something that is handed to you gift wrapped like this you really do us all such a disservice. Oh well yet another workaround. Maybe for VS 2013 Microsoft can get past unit testing and do some end-to-end integration testing. How much does that cost to write that software using Microsoft tools? Hmmmm...
Posted by Microsoft on 3/5/2010 at 11:33 AM

It appears that this issue has not been fixed in Visual Studio 2010. Unfortunately since we're in the final milestone, we will not be fixing this for the upcoming release. To workaround this issue, you should set the regcap.exe to run in compatibility mode by doing the following:
1) Navigate under %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\Tools\Deployment
2) Right-click on regcap.exe go to Properties
3) Select the Compatibility tab
4) Check the checkbox under Compatibility mode

We apologize for the confusion that this bug was resolved as Fixed. We have internally marked this bug as appropriate to be considered for fix in the future release.

Posted by rseg on 2/24/2010 at 2:21 AM
There may be just this one other reason for the problem.

Had this one project that kept popping up the same problem, while the work-around had been put in place and other projects no longer suffered from it.

When I checked out the project from our source code repository directly underneath a root folder all of a sudden the problem was gone again. The project was originally (sparsely) checked out to the same path it has in the source code repository as well, which is quite lenghty (although well below 200 characters).

So, it seems a sort of "path too long" error may also be an additional reason for the registry capture utility giving up.

Posted by jp2code_wtf on 2/18/2010 at 7:57 AM
Thanks, you damnwombat! (that's fun to say) I thought I was having a 64-bit problem, when it turned out it was a Windows 7 problem!

See? Like Microsoft is advertising: Everyone is loving Windows 7!
Posted by Erik Beijer on 1/28/2010 at 6:46 AM
The tips kurtybauer gave did not resolve the issue.

After you've selected the compatiblity mode, select "Run as administrator" as well.
This fixed the problem for me.
Posted by Stephen Martindale on 12/9/2009 at 2:39 AM
Why is this marked as fixed?

If it has actually been fixed, please link the fix!
Posted by kurtybauer on 11/12/2009 at 10:09 AM
Thanks @RogerFraser for the tip as I was having the same problem
To solve.
1. Locate regcap.exe here: C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\Deployment
2. Right click and select properties.
3. Select Compatibility tab
4. Check box to Run this program in compatibility mode.
5. Select Windows Vista SP2 in the OS drop-down.
6. Click Ok and Recompile.
Posted by Frank van Bokhoven on 11/12/2009 at 1:40 AM
I use windows7 ultimate (the release that is in msdn) and during compilation i get the same error.

@RogerFrase, How do you run only regcap.exe in vista compatebility mode??
Posted by RogerFraser on 10/16/2009 at 4:16 AM
Hi been having the same issue .The resolution I used was to run just the regcap.exe utility in Vista compatibility mode and left VS 2008 run as normal (note I run VS as Administrator by default as well so not sure if this makes any difference overall) .
Posted by ZackSte on 8/14/2009 at 8:16 AM
There is. I kind of hinted that you run it in compatability mode for Vista SP2 or below. At least this way you can still use Win 7. Try the troubleshooter or open the properties and enable compatability mode in the Compatability tab. I run under Vista compatability.
Posted by Alexander Zeitler on 8/9/2009 at 6:01 AM
Are there any workarounds aside using Windows Vista or XP?
Posted by Microsoft on 7/31/2009 at 5:28 PM
We are working on a fix for the next release.
Posted by Microsoft on 6/11/2009 at 7:29 PM
Thanks for your feedback.

We were able to reproduce the issue you are seeing. We are escalating this issue to the appropriate group within the Visual Studio Product Team for triage and resolution.
These specialized experts will follow-up with your issue.