BUG: Visual C++ .NET Does Not Create a .Netmodule File by Default When You Use /clr:noAssembly Option (311416)



The information in this article applies to:

  • Microsoft Visual C++ .NET (2002)
  • Microsoft Visual C++ .NET (2003)

This article was previously published under Q311416

SYMPTOMS

The Microsoft Visual C++ .NET integrated development environment (IDE) does not create a .netmodule file by default when you specify the /clr:noAssembly option. However, the command-line linker creates a .netmodule file when you use the /noassembly option. Note that the IDE does not provide this behavior by default. The Microsoft Visual C# .NET compiler and the Microsoft Visual Basic .NET compiler also default to the .netmodule extension when you create a module by using the /target:module option.

RESOLUTION

To change the extension of the output file, follow these steps:
  1. Under Project Properties, select the Linker folder.
  2. Select the General page.
  3. Modify the Output File option to YourModuleName.netmodule.
  4. Build your project.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce the Problem

  1. Create a new project of the type Managed C++ class library.
  2. Under Project Properties, select the Linker folder.
  3. Select the Advanced page.
  4. Modify Turn Off Assembly Generation to Yes(/NOASSEMBLY).
  5. Build your project.
An output file with a .dll extension is generated instead of a file with the default .netmodule extension.

REFERENCES

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

309805 HOW TO: Create .NET Modules by Using Visual C++ .NET


Modification Type:MinorLast Reviewed:5/28/2003
Keywords:kbbug KB311416