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/core/testing/microsoft-testing-platform-migration-from-v1-to-v2.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ ms.author: ygerges
6
6
ms.date: 10/08/2025
7
7
---
8
8
9
-
# Mirate from Microsoft.Testing.Platform v1 to v2
9
+
# Migrate from Microsoft.Testing.Platform v1 to v2
10
10
11
11
The stable version Microsoft.Testing.Platform v2 is now available. This migration guide explores what's changed in Microsoft.Testing.Platform v2 and how you can migrate to this version.
This specifically means that the *empty* property pattern `is { }` matches everything non-null, and can be used instead of the `is not null` to create a variable: `somethingPossiblyNull is { } somethingDefinitelyNotNull`.
A property pattern is a recursive pattern. You can use any pattern as a nested pattern. Use a property pattern to match parts of data against nested patterns, as the following example shows:
Copy file name to clipboardExpand all lines: docs/fundamentals/code-analysis/quality-rules/ca1806.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "CA1806: Do not ignore method results (code analysis)"
3
3
description: "Learn about code analysis rule CA1806: Do not ignore method results"
4
-
ms.date: 06/08/2022
4
+
ms.date: 10/30/2025
5
5
f1_keywords:
6
6
- CA1806
7
7
- DoNotIgnoreMethodResults
@@ -32,6 +32,7 @@ There are several possible reasons for this warning:
32
32
- A method that creates and returns a new string is called and the new string is never used.
33
33
- A COM or P/Invoke method returns a `HRESULT` or error code that's never used.
34
34
- A language-integrated query (LINQ) method returns a result that's never used.
35
+
- A `[Pure]` method is called and the return value is never used.
35
36
36
37
## Rule description
37
38
@@ -41,7 +42,7 @@ Strings are immutable and methods such as <xref:System.String.ToUpper%2A?display
41
42
42
43
Ignoring `HRESULT` or an error code can lead to low-resource conditions or unexpected behavior in error conditions.
43
44
44
-
LINQ methods are known to not have side effects, and the result should not be ignored.
45
+
LINQ methods and methods annotated with <xref:System.Diagnostics.Contracts.PureAttribute>are known to not have side effects, and the result should not be ignored.
45
46
46
47
## How to fix violations
47
48
@@ -57,7 +58,7 @@ If method A calls method B but does not use the `HRESULT` or error code that the
57
58
58
59
-or-
59
60
60
-
If a LINQ method A calls method B but does not use the result, use the result in a conditional statement, assign the result to a variable, or pass it as an argument to another method.
61
+
If method A calls a LINQ or pure method B but does not use the result, use the result in a conditional statement, assign the result to a variable, or pass it as an argument to another method.
61
62
62
63
## When to suppress warnings
63
64
@@ -122,7 +123,7 @@ The following example fixes the violation by assigning the result of <xref:Syste
122
123
The following example shows a method that doesn't use an object that it creates.
123
124
124
125
> [!NOTE]
125
-
> This violation cannot be reproduced in Visual Basic.
126
+
> This violation can't be reproduced in Visual Basic.
Copy file name to clipboardExpand all lines: docs/visual-basic/reference/command-line-compiler/how-to-invoke-the-command-line-compiler.md
+28-13Lines changed: 28 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,51 +9,66 @@ helpviewer_keywords:
9
9
- "command line [Visual Basic], arguments"
10
10
ms.assetid: 0fd9a8f6-f34e-4c35-a49d-9b9bbd8da4a9
11
11
---
12
-
# How to: Invoke the Command-Line Compiler (Visual Basic)
12
+
# How to Invoke the Command-Line Compiler
13
13
14
14
You can invoke the command-line compiler by typing the name of its executable file into the command line, also known as the MS-DOS prompt. If you compile from the default Windows Command Prompt, you must type the fully qualified path to the executable file. To override this default behavior, you can either use the Developer Command Prompt for Visual Studio, or modify the PATH environment variable. Both allow you to compile from any directory by simply typing the compiler name.
15
15
16
+
[!TIP]
17
+
For modern .NET projects, use the [`dotnet build`](../../../core/tools/dotnet-build.md) command to compile Visual Basic source files.
18
+
The `vbc.exe` command-line compiler is only used for older .NET Framework projects.
## To invoke the compiler using the Developer Command Prompt for Visual Studio
19
23
20
24
1. Open the Visual Studio Tools program folder within the Microsoft Visual Studio program group.
21
25
22
-
2. You can use the Developer Command Prompt for Visual Studio to access the compiler from any directory on your machine, if Visual Studio is installed.
26
+
1. You can use the **Developer Command Prompt for Visual Studio** to access the compiler from any directory on your machine, if Visual Studio is installed.
27
+
28
+
1. Open the **Developer Command Prompt for Visual Studio**.
23
29
24
-
3. Invoke the Developer Command Prompt for Visual Studio.
30
+
1. At the command line, type `vbc.exe <sourceFileName>` and then press **Enter**.
25
31
26
-
4. At the command line, type `vbc.exe`*sourceFileName* and then press ENTER.
32
+
For example, if you stored your source code in a directory called `SourceFiles`, you would open the Command Prompt and type:
27
33
28
-
For example, if you stored your source code in a directory called `SourceFiles`, you would open the Command Prompt and type `cd SourceFiles` to change to that directory. If the directory contained a source file named `Source.vb`, you could compile it by typing `vbc.exe Source.vb`.
34
+
```cmd
35
+
cd SourceFiles
36
+
vbc.exe Source.vb
37
+
```
29
38
30
39
## To set the PATH environment variable to the compiler for the Windows Command Prompt
31
40
32
41
1. Use the Windows Search feature to find Vbc.exe on your local disk.
33
42
34
43
The exact name of the directory where the compiler is located depends on the location of the Windows directory and the version of the ".NET Framework" installed. If you have more than one version of the ".NET Framework" installed, you must determine which version to use (typically the latest version).
35
44
36
-
2. From your **Start** Menu, right-click **My Computer**, and then click **Properties** from the shortcut menu.
45
+
1. From your **Start** Menu, right-click **My Computer**, and then click **Properties** from the shortcut menu.
37
46
38
-
3. Click the **Advanced** tab, and then click **Environment Variables**.
47
+
1. Click the **Advanced** tab, and then click **Environment Variables**.
39
48
40
-
4. In the **System** variables pane, select **Path** from the list and click **Edit**.
49
+
1. In the **System** variables pane, select **Path** from the list and click **Edit**.
41
50
42
-
5. In the **Edit System** Variable dialog box, move the insertion point to the end of the string in the **Variable Value** field and type a semicolon (;) followed by the full directory name found in Step 1.
51
+
1. In the **Edit System** Variable dialog box, move the insertion point to the end of the string in the **Variable Value** field and type a semicolon (;) followed by the full directory name found in Step 1.
43
52
44
-
6. Click **OK** to confirm your edits and close the dialog boxes.
53
+
1. Click **OK** to confirm your edits and close the dialog boxes.
45
54
46
-
After you change the PATH environment variable, you can run the Visual Basic compiler at the Windows Command Prompt from any directory on the computer.
55
+
After you change the PATH environment variable, you can run the Visual Basic compiler at the Windows Command Prompt from any directory on the computer.
47
56
48
57
## To invoke the compiler using the Windows Command Prompt
49
58
50
59
1. From the **Start** menu, click on the **Accessories** folder, and then open the **Windows Command Prompt**.
51
60
52
-
2. At the command line, type `vbc.exe`*sourceFileName* and then press ENTER.
61
+
1. At the command line, type `vbc.exe <sourceFileName>` and then press **Enter**.
62
+
63
+
For example, if you stored your source code in a directory called `SourceFiles`, you would open the Command Prompt and type:
53
64
54
-
For example, if you stored your source code in a directory called `SourceFiles`, you would open the Command Prompt and type `cd SourceFiles` to change to that directory. If the directory contained a source file named `Source.vb`, you could compile it by typing `vbc.exe Source.vb`.
0 commit comments