You receive a build error message when you use the Assembly Registration tool (Regasm.exe) in Visual C# (908268)
The information in this article applies to:
- Microsoft Visual Studio 2005 Standard Edition
- Microsoft Visual Studio 2005 Professional Edition
- Microsoft Visual Studio 2005 Express Edition
- Microsoft Visual Studio .NET (2003), Professional Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
SYMPTOMSWhen you use the Assembly Registration tool (Regasm.exe) in a pre-build event or in a post-build event in Microsoft Visual C#, you receive one of the following build error messages in the Output window: Message 1Performing Post-Build Event...
'regasm' is not recognized as an internal or external command,
operable program or batch file. Project error: A tool returned an error code from the build event
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(814,9): error MSB3073: The command "RegAsm.exe "[Path]\MyClassLib.dll"" exited with code 9009.
Post-Build Event failed
Message 2Performing Pre-Build Event...
'regasm' is not recognized as an internal or external command,
operable program or batch file.
Project error: A tool returned an error code from the build event
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(814,9): error MSB3073: The command "RegAsm.exe "[Path]\MyClassLib.dll"" exited with code 9009.
Pre-Build Event failed RESOLUTIONTo resolve this problem, specify the complete path of the Regasm.exe file that is located in the Microsoft .NET Framework directory. For example, if you are using Microsoft Visual Studio .NET 2003, use the following line of code. C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\RegAsm.exe [path of dll]\MyClassLib.dll If you are using Microsoft Visual Studio 2005, use the following line of code. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe [path of dll]\MyClassLib.dll STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Major | Last Reviewed: | 11/21/2005 |
---|
Keywords: | kbProgramming kbBug kbtshoot kbprb KB908268 kbAudDeveloper |
---|
|