You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build/reference/choosing-the-format-of-netmodule-input-files.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.date: "11/04/2016"
7
7
8
8
You can use an MSIL `.obj` file (compiled with [`/clr`](clr-common-language-runtime-compilation.md)) as a `.netmodule` file. `.obj` files contain metadata and native symbols. `.netmodules` only contain metadata.
9
9
10
-
Pass an MSIL `.obj` file to any other Visual Studio compiler with the `/addmodule` compiler option. Be aware that the`.obj` file becomes part of the resulting assembly and must be shipped with the assembly. For example, Visual C# and Visual Basic have the `/addmodule` compiler option.
10
+
Pass an MSIL `.obj` file to any other Visual Studio compiler with the `/addmodule` compiler option. The`.obj` file becomes part of the resulting assembly and must be shipped with the assembly. For example, Visual C# and Visual Basic have the `/addmodule` compiler option.
11
11
12
12
> [!NOTE]
13
13
> In most cases, you need to pass to the linker the `.obj` file from the compilation that created the .net module. Passing a `.dll` or `.netmodule` MSIL module file to the linker might result in LNK1107.
@@ -20,13 +20,13 @@ Use the following guidance to determine whether you need to use a `.netmodule` o
20
20
21
21
- If you're building with a Visual Studio compiler other than Visual C++, produce a `.netmodule` and use the `.netmodule` as input to the linker.
22
22
23
-
- If you're using the MSVC compiler to produce modules and if the modules will be used to build something other than a library, use the `.obj` files produced by the compiler as module input to the linker. Don't use the `.netmodule` file as input.
23
+
- If you're using the MSVC compiler to produce modules and if the modules are used to build something other than a library, use the `.obj` files produced by the compiler as module input to the linker. Don't use the `.netmodule` file as input.
24
24
25
-
- If your modules will be used to build a native (not a managed) library, use `.obj` files as module input to the linker and generate a `.lib` library file.
25
+
- If your modules are used to build a native (not a managed) library, use `.obj` files as module input to the linker and generate a `.lib` library file.
26
26
27
-
- If your modules will be used to build a managed library, and if all module input to the linker is verifiable (produced with `/clr:safe`), use `.obj` files as module input to the linker and generate a `.dll` (assembly) or `.netmodule` (module) library file.
27
+
- If your modules are used to build a managed library, and if all module input to the linker is verifiable (produced with `/clr:safe`), use `.obj` files as module input to the linker and generate a `.dll` (assembly) or `.netmodule` (module) library file.
28
28
29
-
- If your modules will be used to build a managed library, and if one or more modules input to the linker are produced with just `/clr`, use `.obj` files as module input to the linker and generate a `.dll` (assembly). If you want to expose managed types from the library and if you also want C++ applications to consume the native types in the library, your library consists of the `.obj` files for the libraries component modules. You also want to ship the `.h` files for each module, so they can be referenced with #include from source code.
29
+
- If your modules are used to build a managed library, and if one or more modules input to the linker are produced with just `/clr`, use `.obj` files as module input to the linker and generate a `.dll` (assembly). If you want to expose managed types from the library and if you also want C++ applications to consume the native types in the library, your library consists of the `.obj` files for the libraries component modules. You also want to ship the `.h` files for each module, so they can be referenced with #include from source code.
Copy file name to clipboardExpand all lines: docs/build/reference/ln-create-msil-module.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,19 +21,19 @@ By default, `/LN` isn't in effect, and the compiler inserts an assembly manifest
21
21
22
22
When you use `/LN`, you must also use one of the [/clr (Common Language Runtime Compilation)](clr-common-language-runtime-compilation.md) options.
23
23
24
-
A managed program that doesn't have assembly metadata in the manifest is called a module. If you compile with [/c (Compile Without Linking)](c-compile-without-linking.md) and `/LN`, specify [/NOASSEMBLY (Create a MSIL Module)](noassembly-create-a-msil-module.md) in the linker phase to create the output file.
24
+
A managed program that doesn't have assembly metadata in the manifest is called a module. If you compile with [/c (Compile Without Linking)](c-compile-without-linking.md) and `/LN`, specify [`/NOASSEMBLY `(Create a MSIL Module)](noassembly-create-a-msil-module.md) in the linker phase to create the output file.
25
25
26
-
Create modules if you want to take a component-based approach to building assemblies. You can author types and compile them into modules. Then, you can generate an assembly from one or more modules. For more information on creating assemblies from modules, see [.netmodule Files as Linker Input](netmodule-files-as-linker-input.md) or [Al.exe (Assembly Linker)](/dotnet/framework/tools/al-exe-assembly-linker).
26
+
Create modules if you want to take a component-based approach to building assemblies. You can author types and compile them into modules. Then, you can generate an assembly from one or more modules. For more information on creating assemblies from modules, see [`.netmodule` Files as Linker Input](netmodule-files-as-linker-input.md) or [`Al.exe `(Assembly Linker)](/dotnet/framework/tools/al-exe-assembly-linker).
27
27
28
28
The default file extension for a module is `.netmodule`.
29
29
30
30
In releases before Visual Studio 2005, you created a module with `/clr:noAssembly`.
31
31
32
-
The MSVC linker accepts `.netmodule` files as input. The output file produced by the linker is an assembly or `.netmodule` with no run-time dependence on any of the `.netmodule`s that you input to the linker. For more information, see [.netmodule Files as Linker Input](netmodule-files-as-linker-input.md).
32
+
The MSVC linker accepts `.netmodule` files as input. The output file produced by the linker is an assembly or `.netmodule` with no run-time dependence on any of the `.netmodule`s that you input to the linker. For more information, see [`.netmodule `Files as Linker Input](netmodule-files-as-linker-input.md).
33
33
34
34
### To set this compiler option in the Visual Studio development environment
35
35
36
-
- Specify [/NOASSEMBLY (Create a MSIL Module)](noassembly-create-a-msil-module.md) in the linker phase to create the output file.
36
+
- Specify [`/NOASSEMBLY` (Create a MSIL Module)](noassembly-create-a-msil-module.md) in the linker phase to create the output file.
Copy file name to clipboardExpand all lines: docs/extensions/safe-cast-cpp-component-extensions.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,15 +102,15 @@ An expression that evaluates to a handle to a reference or value type, a value t
102
102
103
103
The expression `safe_cast<`*type-id*`>(`*expression*`)` converts the operand *expression* to an object of type *type-id*.
104
104
105
-
The compiler accepts a [`static_cast`](../cpp/static-cast-operator.md) in most places that it accepts a **`safe_cast`**. However, **`safe_cast`** always produces verifiable MSIL, whereas a **`static_cast`** might produce unverifiable MSIL. For more information on verifiable code, see [Pure and Verifiable Code (C++/CLI)](../dotnet/pure-and-verifiable-code-cpp-cli.md) and [`Peverify.exe` (PEVerify Tool)](/dotnet/framework/tools/peverify-exe-peverify-tool).
105
+
The compiler accepts a [`static_cast`](../cpp/static-cast-operator.md) in most places that it accepts a **`safe_cast`**. However, **`safe_cast`** always produces verifiable MSIL, whereas a **`static_cast`** might produce unverifiable MSIL. For more information on verifiable code, see [Pure and Verifiable Code (C++/CLI)](../dotnet/pure-and-verifiable-code-cpp-cli.md) and [`Peverify.exe` (PEVerify Tool)](/dotnet/framework/tools/peverify-exe-peverify-tool).
106
106
107
107
Like **`static_cast`**, **`safe_cast`** invokes user-defined conversions.
108
108
109
109
For more information about casts, see [Casting Operators](../cpp/casting-operators.md).
110
110
111
111
**`safe_cast`** doesn't apply a **`const_cast`** (cast away **`const`**).
112
112
113
-
**`safe_cast`** is in the cli namespace. For more information, see [Platform, default, and cli Namespaces](platform-default-and-cli-namespaces-cpp-component-extensions.md).
113
+
**`safe_cast`** is in the cli namespace. For more information, see [Platform, default, and cli Namespaces](platform-default-and-cli-namespaces-cpp-component-extensions.md).
114
114
115
115
For more information on **`safe_cast`**, see:
116
116
@@ -123,7 +123,7 @@ Compiler option: `/clr`
123
123
124
124
### Examples
125
125
126
-
One example of where the compiler doesn't accept a **`static_cast`** but accepts a **`safe_cast`** is for casts between unrelated interface types. With **`safe_cast`**, the compiler doesn't issue a conversion error and performs a check at runtime to see if the cast is possible.
126
+
One example of where the compiler doesn't accept a **`static_cast`** but accepts a **`safe_cast`** is for casts between unrelated interface types. With **`safe_cast`**, the compiler doesn't issue a conversion error and performs a check at runtime to see if the cast is possible.
0 commit comments