Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Causes the compiler to make COM type information in the specified assemblies ava
> [!NOTE]
> When you create an instance of an embedded COM type in your code, you must create the instance by using the appropriate interface. Attempting to create an instance of an embedded COM type by using the CoClass causes an error.

To set the `-link` option in [!INCLUDE[vsprvs](~/includes/vsprvs-md.md)], add an assembly reference and set the `Embed Interop Types` property to **true**. The default for the `Embed Interop Types` property is **false**.
To set the `-link` option in Visual Studio, add an assembly reference and set the `Embed Interop Types` property to **true**. The default for the `Embed Interop Types` property is **false**.

If you link to a COM assembly (Assembly A) which itself references another COM assembly (Assembly B), you also have to link to Assembly B if either of the following is true:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Use the **-win32manifest** option to specify a user-defined Win32 application ma

- You provide a custom manifest that does not specify a requested execution level.

[!INCLUDE[vsprvs](~/includes/vsprvs-md.md)] creates a default .manifest file and stores it in the debug and release directories alongside the executable file. You can add a custom manifest by creating one in any text editor and then adding the file to the project. Alternatively, you can right-click the **Project** icon in **Solution Explorer**, click **Add New Item**, and then click **Application Manifest File**. After you have added your new or existing manifest file, it will appear in the **Manifest** drop down list. For more information, see [Application Page, Project Designer (C#)](/visualstudio/ide/reference/application-page-project-designer-csharp).
Visual Studio creates a default .manifest file and stores it in the debug and release directories alongside the executable file. You can add a custom manifest by creating one in any text editor and then adding the file to the project. Alternatively, you can right-click the **Project** icon in **Solution Explorer**, click **Add New Item**, and then click **Application Manifest File**. After you have added your new or existing manifest file, it will appear in the **Manifest** drop down list. For more information, see [Application Page, Project Designer (C#)](/visualstudio/ide/reference/application-page-project-designer-csharp).

You can provide the application manifest as a custom post-build step or as part of a Win32 resource file by using the [-nowin32manifest (C# Compiler Options)](../../../csharp/language-reference/compiler-options/nowin32manifest-compiler-option.md) option. Use that same option if you want your application to be subject to file or registry virtualization on Windows Vista. This will prevent the compiler from creating and embedding a default manifest in the portable executable (PE) file.

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0013.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ ms.author: "wiwagn"
# Compiler Error CS0013
Unexpected error writing metadata to file 'ModelStore.dll' -- 'No logical space left to create more user strings.

The .NET Framework common language runtime did not emit metadata. Check to make sure that the path is correct and that the disk is not full. If the problem persists, you may have to repair or reinstall [!INCLUDE[vsprvs](~/includes/vsprvs-md.md)] and/or the .NET Framework.
The .NET Framework common language runtime did not emit metadata. Check to make sure that the path is correct and that the disk is not full. If the problem persists, you may have to repair or reinstall Visual Studio and/or the .NET Framework.
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0014.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ ms.author: "wiwagn"
# Compiler Error CS0014
Required file 'file' could not be found

A file is needed by the compiler but is not on the system. Make sure that the path is correct. If the file is a [!INCLUDE[vsprvs](~/includes/vsprvs-md.md)] system file, then you may need to repair your installation or else remove and reinstall [!INCLUDE[vsprvs](~/includes/vsprvs-md.md)] completely.
A file is needed by the compiler but is not on the system. Make sure that the path is correct. If the file is a Visual Studio system file, then you may need to repair your installation or else remove and reinstall Visual Studio completely.
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0025.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ Standard library file 'file' could not be found

A file that is needed by the compiler was not found. Check that the path is correct and that the file exists.

If the file is a [!INCLUDE[vsprvs](~/includes/vsprvs-md.md)] system file, you may need to repair your [!INCLUDE[vsprvs](~/includes/vsprvs-md.md)] installation, or reinstall it completely.
If the file is a Visual Studio system file, you may need to repair your Visual Studio installation, or reinstall it completely.
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0041.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ ms.author: "wiwagn"
# Compiler Error CS0041
The fully qualified name for 'type' is too long for debug information. Compile without '/debug' option.

This error can occur when using the [/debug](../../csharp/language-reference/compiler-options/debug-compiler-option.md) compiler option. If you encounter this error, try to delete the PDB files in the bin directory and recompiling. If you are still encountering this error, you may have to repair or reinstall [!INCLUDE[vsprvs](~/includes/vsprvs-md.md)].
This error can occur when using the [/debug](../../csharp/language-reference/compiler-options/debug-compiler-option.md) compiler option. If you encounter this error, try to delete the PDB files in the bin directory and recompiling. If you are still encountering this error, you may have to repair or reinstall Visual Studio.
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ We’re sorry, but we don’t have any specific information about this error. Yo
Provides a forum for questions about and general discussions of the Visual C# language syntax and compiler.

[Visual C# IDE](https://social.msdn.microsoft.com/Forums/en-US/home?forum=csharpide)
Provides a forum for questions about how to work in the [!INCLUDE[vsprvs](~/includes/vsprvs-md.md)] environment.
Provides a forum for questions about how to work in the Visual Studio environment.

[Visual C# General](https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral)
Provides a forum for questions about and issues with Visual C# that are not discussed in other forums.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You can use object initializers to initialize type objects in a declarative mann
[!code-csharp[csProgGuideLINQ#36](../../../csharp/programming-guide/arrays/codesnippet/CSharp/how-to-initialize-objects-by-using-an-object-initializer_2.cs)]

## Compiling the Code
To run this code, copy and paste the class into a Visual C# console application project that has been created in [!INCLUDE[vsprvs](~/includes/vsprvs-md.md)].
To run this code, copy and paste the class into a Visual C# console application project that has been created in Visual Studio.

## See Also
[C# Programming Guide](../../../csharp/programming-guide/index.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/programming-guide/enumeration-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The following are advantages of using an enum instead of a numeric type:

- You clearly specify for client code which values are valid for the variable.

- In [!INCLUDE[vsprvs](~/includes/vsprvs-md.md)], IntelliSense lists the defined values.
- In Visual Studio, IntelliSense lists the defined values.

When you do not specify values for the elements in the enumerator list, the values are automatically incremented by 1. In the previous example, `Day.Sunday` has a value of 0, `Day.Monday` has a value of 1, and so on. When you create a new `Day` object, it will have a default value of `Day.Sunday` (0) if you do not explicitly assign it a value. When you create an enum, select the most logical default value and give it a value of zero. That will cause all enums to have that default value if they are not explicitly assigned a value when they are created.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The topic describes methods to enable interoperability between C# managed code a

2. Add to the project a reference to the COM component or type library.

When you add the reference, [!INCLUDE[vsprvs](~/includes/vsprvs-md.md)] uses the [Tlbimp.exe (Type Library Importer)](../../../../docs/framework/tools/tlbimp-exe-type-library-importer.md), which takes a type library as input, to output a .NET Framework interop assembly. The assembly, also named a runtime callable wrapper (RCW), contains managed classes and interfaces that wrap the COM classes and interfaces that are in the type library. [!INCLUDE[vsprvs](~/includes/vsprvs-md.md)] adds to the project a reference to the generated assembly.
When you add the reference, Visual Studio uses the [Tlbimp.exe (Type Library Importer)](../../../../docs/framework/tools/tlbimp-exe-type-library-importer.md), which takes a type library as input, to output a .NET Framework interop assembly. The assembly, also named a runtime callable wrapper (RCW), contains managed classes and interfaces that wrap the COM classes and interfaces that are in the type library. Visual Studio adds to the project a reference to the generated assembly.

3. Create an instance of a class that is defined in the RCW. This, in turn, creates an instance of the COM object.

Expand All @@ -54,7 +54,7 @@ The topic describes methods to enable interoperability between C# managed code a

2. Generate a COM type library and register it for COM usage.

You can modify Visual C# project properties to automatically register the C# assembly for COM interop. [!INCLUDE[vsprvs](~/includes/vsprvs-md.md)] uses the [Regasm.exe (Assembly Registration Tool)](../../../../docs/framework/tools/regasm-exe-assembly-registration-tool.md), using the `/tlb` command-line switch, which takes a managed assembly as input, to generate a type library. This type library describes the `public` types in the assembly and adds registry entries so that COM clients can create managed classes.
You can modify Visual C# project properties to automatically register the C# assembly for COM interop. Visual Studio uses the [Regasm.exe (Assembly Registration Tool)](../../../../docs/framework/tools/regasm-exe-assembly-registration-tool.md), using the `/tlb` command-line switch, which takes a managed assembly as input, to generate a type library. This type library describes the `public` types in the assembly and adds registry entries so that COM clients can create managed classes.

For more information, see [Exposing .NET Framework Components to COM](../../../../docs/framework/interop/exposing-dotnet-components-to-com.md) and [Example COM Class](../../../csharp/programming-guide/interop/example-com-class.md).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The `Main` method is the entry point of a C# application. (Libraries and service
- `Main` is declared inside a class or struct. `Main` must be [static](../../../csharp/language-reference/keywords/static.md) and it need not be [public](../../../csharp/language-reference/keywords/public.md). (In the earlier example, it receives the default access of [private](../../../csharp/language-reference/keywords/private.md).) The enclosing class or struct is not required to be static.
- `Main` can either have a `void`, `int`, or, starting with C# 7.1, `Task`, or `Task<int>` return type.
- If and only if `Main` returns a `Task` or `Task<int>`, the declaration of `Main` may include the [`async`](../../language-reference/keywords/async.md) modifier. Note that this specifically excludes an `async void Main` method.
- The `Main` method can be declared with or without a `string[]` parameter that contains command-line arguments. When using [!INCLUDE[vsprvs](~/includes/vsprvs-md.md)] to create Windows applications, you can add the parameter manually or else use the <xref:System.Environment> class to obtain the command-line arguments. Parameters are read as zero-indexed command-line arguments. Unlike C and C++, the name of the program is not treated as the first command-line argument.
- The `Main` method can be declared with or without a `string[]` parameter that contains command-line arguments. When using Visual Studio to create Windows applications, you can add the parameter manually or else use the <xref:System.Environment> class to obtain the command-line arguments. Parameters are read as zero-indexed command-line arguments. Unlike C and C++, the name of the program is not treated as the first command-line argument.

The addition of `async` and `Task`, `Task<int>` return types simplifies program code when console applications need to start and `await` asynchronous operations in `Main`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ You need [IronPython](http://ironpython.net/) for .NET to complete this walkthro

#### To create a custom dynamic class

1. Start [!INCLUDE[vsprvs](~/includes/vsprvs-md.md)].
1. Start Visual Studio.

2. On the **File** menu, point to **New** and then click **Project**.

Expand Down Expand Up @@ -138,7 +138,7 @@ The next project that you create in this walkthrough accesses a library that is

#### To create a custom dynamic class

1. In [!INCLUDE[vsprvs](~/includes/vsprvs-md.md)], on the **File** menu, point to **New** and then click **Project**.
1. In Visual Studio, on the **File** menu, point to **New** and then click **Project**.

2. In the **New Project** dialog box, in the **Project Types** pane, make sure that **Windows** is selected. Select **Console Application** in the **Templates** pane. In the **Name** box, type `DynamicIronPythonSample`, and then click **OK**. The new project is created.

Expand Down
2 changes: 1 addition & 1 deletion docs/framework/add-ins/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Add-in pipeline

|Title|Description|
|-----------|-----------------|
|[Pipeline Development](../../../docs/framework/add-ins/pipeline-development.md)|Describes the communication pipeline of segments from the host application to the add-in. Provides code examples in walkthrough topics that describe how to construct the pipeline and how to deploy segments to the pipeline in [!INCLUDE[vsprvs](../../../includes/vsprvs-md.md)].|
|[Pipeline Development](../../../docs/framework/add-ins/pipeline-development.md)|Describes the communication pipeline of segments from the host application to the add-in. Provides code examples in walkthrough topics that describe how to construct the pipeline and how to deploy segments to the pipeline in Visual Studio.|
|[Application Domains and Assemblies](http://msdn.microsoft.com/library/433b04ae-4ba8-4849-9dbd-79194f240346)|Describes the relationship between application domains, which provide an isolation boundary for security, reliability, and versioning, and assemblies.|

[Back to top](#top)
Expand Down
6 changes: 3 additions & 3 deletions docs/framework/add-ins/walkthrough-create-extensible-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ This walkthrough describes how to create a pipeline for an add-in that performs
## Prerequisites
You need the following to complete this walkthrough:

- [!INCLUDE[vsprvs](../../../includes/vsprvs-md.md)].
- Visual Studio.

## Creating a Visual Studio Solution
Use a solution in [!INCLUDE[vsprvs](../../../includes/vsprvs-md.md)] to contain the projects of your pipeline segments.
Use a solution in Visual Studio to contain the projects of your pipeline segments.

#### To create the pipeline solution

1. In [!INCLUDE[vsprvs](../../../includes/vsprvs-md.md)], create a new project named `Calc1Contract`. Base it on the **Class Library** template.
1. In Visual Studio, create a new project named `Calc1Contract`. Base it on the **Class Library** template.

2. Name the solution `CalculatorV1`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ms.workload:
To sign an assembly with a strong name, you must have a public/private key pair. This public and private cryptographic key pair is used during compilation to create a strong-named assembly. You can create a key pair using the [Strong Name tool (Sn.exe)](../../../docs/framework/tools/sn-exe-strong-name-tool.md). Key pair files usually have an .snk extension.

> [!NOTE]
> In [!INCLUDE[vsprvs](../../../includes/vsprvs-md.md)], the C# and Visual Basic project property pages include a **Signing** tab that enables you to select existing key files or to generate new key files without using Sn.exe. In Visual C++, you can specify the location of an existing key file in the **Advanced** property page in the **Linker** section of the **Configuration Properties** section of the **Property Pages** window. The use of the <xref:System.Reflection.AssemblyKeyFileAttribute> attribute to identify key file pairs has been made obsolete beginning with [!INCLUDE[vsprvslong](../../../includes/vsprvslong-md.md)].
> In Visual Studio, the C# and Visual Basic project property pages include a **Signing** tab that enables you to select existing key files or to generate new key files without using Sn.exe. In Visual C++, you can specify the location of an existing key file in the **Advanced** property page in the **Linker** section of the **Configuration Properties** section of the **Property Pages** window. The use of the <xref:System.Reflection.AssemblyKeyFileAttribute> attribute to identify key file pairs has been made obsolete beginning with [!INCLUDE[vsprvslong](../../../includes/vsprvslong-md.md)].

### To create a key pair

Expand Down Expand Up @@ -66,7 +66,7 @@ sn -p keypair.snk public.snk

When signing an assembly with a strong name, the [Assembly Linker (Al.exe)](../../../docs/framework/tools/al-exe-assembly-linker.md) looks for the key file relative to the current directory and to the output directory. When using command-line compilers, you can simply copy the key to the current directory containing your code modules.

If you are using an earlier version of [!INCLUDE[vsprvs](../../../includes/vsprvs-md.md)] that does not have a **Signing** tab in the project properties, the recommended key file location is the project directory with the file attribute specified as follows:
If you are using an earlier version of Visual Studio that does not have a **Signing** tab in the project properties, the recommended key file location is the project directory with the file attribute specified as follows:

[!code-cpp[AssemblyName_KeyPair#21](../../../samples/snippets/cpp/VS_Snippets_CLR/AssemblyName_KeyPair/CPP/keyfileattrib.cpp#21)]
[!code-csharp[AssemblyName_KeyPair#21](../../../samples/snippets/csharp/VS_Snippets_CLR/AssemblyName_KeyPair/CS/keyfileattrib.cs#21)]
Expand Down
Loading