AssemblyInfo.obj : Módulo MSIL encontrado; vínculo incremental está desabilitado para MSIL; executando link completo
Assistant
The message you're seeing:
code
AssemblyInfo.obj : Módulo MSIL encontrado; vínculo incremental está desabilitado para MSIL; executando link completo
translates to:
code
AssemblyInfo.obj : MSIL module found; incremental linking is disabled for MSIL; performing full link
This message occurs during the linking phase of your build process in Visual Studio (or another MSVC-based environment). It indicates that the linker has encountered a module containing Microsoft Intermediate Language (MSIL) code, which is typical when compiling with the Common Language Runtime (CLR) support enabled (using the /clr compiler option).
What Does This Mean?
MSIL Module Found: One or more of your object files (.obj), such as AssemblyInfo.obj, contains MSIL code. This happens when source files are compiled with CLR support.
Incremental Linking Disabled: Incremental linking is a feature that speeds up the linking process by only linking changed modules. However, when MSIL modules are present, incremental linking isn't supported because the linker needs to process the managed code fully.
Performing Full Link: The linker proceeds to perform a full link of your application, which may take longer than an incremental link.
Why Is This Happening?
Intentional Use of Managed Code: If you're developing a mixed-mode application that includes both native C++ and managed C++/CLI code, then this is expected behavior. The presence of MSIL modules means that some of your code is compiled with the /clr option.
Accidental Inclusion of Managed Code: If you're not intending to use managed code, some of your source files might inadvertently have the /clr option enabled.
How to Address This
If You Intend to Use Managed Code:
No Action Needed: This message is informational. Since MSIL modules require a full link, you can safely ignore this message unless the full link time is causing issues.
Suppress the Message (Optional): If you find the message cluttering your build output, you might consider suppressing it, although it's generally not recommended to suppress linker messages.
If You Do NOT Intend to Use Managed Code:
Check Project Settings:
Go to your project's Property Pages.
Navigate to Configuration Properties > C/C++ > General.
Ensure that Common Language Runtime Support is set to No CLR Support.
Per-File Compiler Options:
It's possible that specific files have overridden project defaults.
Right-click on AssemblyInfo.cpp (or any suspect source files) in Solution Explorer.
Select Properties.
Check under Configuration Properties > C/C++ > General for Common Language Runtime Support.
Make sure it's set to No CLR Support for files that should be compiled as native code.
Review AssemblyInfo.cpp:
AssemblyInfo.cpp is typically used in managed projects to define assembly attributes.
If your project is purely native, you might not need this file.
Consider removing AssemblyInfo.cpp if it's not necessary for your application.
Disable Incremental Linking (Optional):
Since incremental linking is disabled anyway due to the presence of MSIL modules, you can turn off incremental linking to eliminate the message.
In your project's Property Pages:
Navigate to Configuration Properties > Linker > General.
Set Enable Incremental Linking to No (/INCREMENTAL:NO).
Additional Considerations
Mixing CLR and Non-CLR Code: Be cautious when mixing managed and unmanaged code. Consistency in compiler settings across your project is important to avoid unexpected behavior.
Build Configurations: Ensure that your build configurations (Debug/Release) are correctly set up, and that settings are consistent between them if necessary.
Project Templates: If you started your project using a template (like a CLR Console Application), it might have default settings that enable CLR support. Adjust the project settings accordingly if you need a native application.
Summary
The linker message is informational, explaining why a full link is being performed.
Determine whether your project should include managed code.
Adjust your project and file-level settings to match your intended use of CLR support.
If using managed code, you can safely ignore the message.
By reviewing your project settings and ensuring they align with your development goals, you can manage or eliminate this message as appropriate.