From 10c6ddd2e8b3c53a4d6891447875e96180ec380a Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 4 Sep 2025 09:49:37 -0400 Subject: [PATCH 1/8] Document Group By alias syntax for grouping keys in Visual Basic (#48176) * Initial plan * Document Group By alias syntax for grouping keys Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- .../queries/group-by-clause.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/docs/visual-basic/language-reference/queries/group-by-clause.md b/docs/visual-basic/language-reference/queries/group-by-clause.md index a59fa1ee30566..64212f7ca21ee 100644 --- a/docs/visual-basic/language-reference/queries/group-by-clause.md +++ b/docs/visual-basic/language-reference/queries/group-by-clause.md @@ -24,6 +24,13 @@ Groups the elements of a query result. Can also be used to apply aggregate funct Group [ listField1 [, listField2 [...] ] By keyExp1 [, keyExp2 [...] ] Into aggregateList ``` + + -or- + +```vb +Group [ listField1 [, listField2 [...] ] By alias1 = keyExp1 [, alias2 = keyExp2 [...] ] + Into aggregateList +``` ## Parts @@ -31,13 +38,17 @@ Group [ listField1 [, listField2 [...] ] By keyExp1 [, keyExp2 [...] ] Optional. One or more fields of the query variable or variables that explicitly identify the fields to be included in the grouped result. If no fields are specified, all fields of the query variable or variables are included in the grouped result. +- `alias1`, `alias2` + + Optional. Names that are assigned to the grouping keys. If aliases are provided, they can be referenced in the query result instead of the key expressions. + - `keyExp1` - + Required. An expression that identifies the key to use to determine the groups of elements. You can specify more than one key to specify a composite key. - + - `keyExp2` - - Optional. One or more additional keys that are combined with `keyExp1` to create a composite key. + + Optional. One or more additional keys that are combined with `keyExp1` to create a composite key. - `aggregateList` From c5a40f806a543ddfafce8bfffc181a805b1a162f Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 4 Sep 2025 09:51:11 -0400 Subject: [PATCH 2/8] Update Visual Basic event handler article to use generic examples instead of WinForms (#48221) * Initial plan * Replace WinForms-specific examples with generic event handling examples Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- .../how-to-call-an-event-handler.md | 2 +- .../CallEventHandler.vbproj | 14 +--- .../SpecialForm.Designer.vb | 31 ------- .../SpecialForm.vb | 82 +++++++++++++++---- 4 files changed, 71 insertions(+), 58 deletions(-) delete mode 100644 docs/visual-basic/programming-guide/language-features/procedures/snippets/how-to-call-an-event-handler/SpecialForm.Designer.vb diff --git a/docs/visual-basic/programming-guide/language-features/procedures/how-to-call-an-event-handler.md b/docs/visual-basic/programming-guide/language-features/procedures/how-to-call-an-event-handler.md index 953962c150912..c3ee03c3860ea 100644 --- a/docs/visual-basic/programming-guide/language-features/procedures/how-to-call-an-event-handler.md +++ b/docs/visual-basic/programming-guide/language-features/procedures/how-to-call-an-event-handler.md @@ -43,7 +43,7 @@ You can associate more than one event handler with the same event. In some cases 3. When the event occurs, Visual Basic automatically calls the `Sub` procedure. Your code can use a `RaiseEvent` statement to make the event occur. - The following example uses the [AddHandler statement](../../../language-reference/statements/addhandler-statement.md) in the constructor to associate the `OnFormClosing` procedure as an event handler for . + The following example uses the [AddHandler statement](../../../language-reference/statements/addhandler-statement.md) in the constructor to associate the `OnTimerElapsed` procedure as an event handler for a custom timer event. :::code language="vb" source="snippets/how-to-call-an-event-handler/SpecialForm.vb" id="5"::: diff --git a/docs/visual-basic/programming-guide/language-features/procedures/snippets/how-to-call-an-event-handler/CallEventHandler.vbproj b/docs/visual-basic/programming-guide/language-features/procedures/snippets/how-to-call-an-event-handler/CallEventHandler.vbproj index b69507c34eae8..f37a3af8095e7 100644 --- a/docs/visual-basic/programming-guide/language-features/procedures/snippets/how-to-call-an-event-handler/CallEventHandler.vbproj +++ b/docs/visual-basic/programming-guide/language-features/procedures/snippets/how-to-call-an-event-handler/CallEventHandler.vbproj @@ -1,17 +1,9 @@ - + - WinExe - net8.0-windows + Exe + net8.0 CallEventHandler - CallEventHandler.SpecialForm - true - - - - - - diff --git a/docs/visual-basic/programming-guide/language-features/procedures/snippets/how-to-call-an-event-handler/SpecialForm.Designer.vb b/docs/visual-basic/programming-guide/language-features/procedures/snippets/how-to-call-an-event-handler/SpecialForm.Designer.vb deleted file mode 100644 index e85c38be0623e..0000000000000 --- a/docs/visual-basic/programming-guide/language-features/procedures/snippets/how-to-call-an-event-handler/SpecialForm.Designer.vb +++ /dev/null @@ -1,31 +0,0 @@ - _ -Partial Class SpecialForm - Inherits System.Windows.Forms.Form - - 'Form overrides dispose to clean up the component list. - _ - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - Try - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - Finally - MyBase.Dispose(disposing) - End Try - End Sub - - 'Required by the Windows Form Designer - Private components As System.ComponentModel.IContainer - - 'NOTE: The following procedure is required by the Windows Form Designer - 'It can be modified using the Windows Form Designer. - 'Do not modify it using the code editor. - _ - Private Sub InitializeComponent() - components = New System.ComponentModel.Container() - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(800, 450) - Me.Text = "SpecialForm" - End Sub - -End Class diff --git a/docs/visual-basic/programming-guide/language-features/procedures/snippets/how-to-call-an-event-handler/SpecialForm.vb b/docs/visual-basic/programming-guide/language-features/procedures/snippets/how-to-call-an-event-handler/SpecialForm.vb index c9bc80656725f..48858810118d8 100644 --- a/docs/visual-basic/programming-guide/language-features/procedures/snippets/how-to-call-an-event-handler/SpecialForm.vb +++ b/docs/visual-basic/programming-guide/language-features/procedures/snippets/how-to-call-an-event-handler/SpecialForm.vb @@ -1,22 +1,74 @@ -Public Class SpecialForm - ' - Sub New() - InitializeComponent() - AddHandler Me.FormClosing, AddressOf OnFormClosing - End Sub - - Private Sub OnFormClosing(sender As Object, e As FormClosingEventArgs) - ' Insert code to deal with impending closure of this form. +' +' Example showing event handling with Handles and WithEvents +Public Class EventPublisher + Public Event SomethingHappened() + + Public Sub CauseEvent() + ' Raise the event when something interesting happens + RaiseEvent SomethingHappened() End Sub - ' End Class -' -Public Class RaisesEvent - Public Event SomethingHappened() - Dim WithEvents happenObj As New RaisesEvent - Public Sub ProcessHappen() Handles happenObj.SomethingHappened +Public Class EventSubscriber + ' Declare a WithEvents variable + Dim WithEvents eventObj As New EventPublisher + + ' Handle the event using Handles clause + Public Sub ProcessHappen() Handles eventObj.SomethingHappened ' Insert code to handle somethingHappened event. + Console.WriteLine("Event handled using Handles clause!") + End Sub + + Public Sub TriggerEvent() + eventObj.CauseEvent() End Sub End Class ' + +' +' Example showing event handling with AddHandler +Public Class Timer + Public Event TimerElapsed(ByVal message As String) + + Public Sub Start() + ' Simulate timer elapsed + RaiseEvent TimerElapsed("Timer has elapsed!") + End Sub +End Class + +Public Class Application + Private appTimer As New Timer() + + Sub New() + ' Use AddHandler to dynamically associate event handler + AddHandler appTimer.TimerElapsed, AddressOf OnTimerElapsed + End Sub + + Private Sub OnTimerElapsed(ByVal message As String) + ' Insert code to handle timer elapsed event + Console.WriteLine($"Handling timer event: {message}") + End Sub + + Public Sub StartTimer() + appTimer.Start() + End Sub +End Class +' + +' Demo program to show both event handling approaches +Module Program + Sub Main() + ' Demonstrate Handles approach + Console.WriteLine("=== Demonstrating Handles approach ===") + Dim subscriber As New EventSubscriber() + subscriber.TriggerEvent() + + ' Demonstrate AddHandler approach + Console.WriteLine("=== Demonstrating AddHandler approach ===") + Dim app As New Application() + app.StartTimer() + + Console.WriteLine("Press any key to exit...") + Console.ReadKey() + End Sub +End Module From 448f422cab75e360e17642cea91354f2a84b69d4 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 4 Sep 2025 14:03:30 +0000 Subject: [PATCH 3/8] Add missing "To correct this error" content and Error IDs for Visual Basic error documentation (#48121) * Initial plan * Add missing "To correct this error" content and Error IDs for 8 VB error documentation files Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Apply suggestions from code review * Update docs/visual-basic/misc/bc31537.md * Update docs/visual-basic/misc/bc31537.md * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> Co-authored-by: Bill Wagner Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- docs/visual-basic/misc/bc30981.md | 7 +++++++ docs/visual-basic/misc/bc31199.md | 4 ++++ docs/visual-basic/misc/bc31536.md | 16 ++++++++++++++++ docs/visual-basic/misc/bc31537.md | 11 +++++++++++ docs/visual-basic/misc/bc31538.md | 10 ++++++++++ docs/visual-basic/misc/bc36613.md | 2 ++ docs/visual-basic/misc/bc36614.md | 2 ++ docs/visual-basic/misc/bc42207.md | 12 ++++++++++++ 8 files changed, 64 insertions(+) diff --git a/docs/visual-basic/misc/bc30981.md b/docs/visual-basic/misc/bc30981.md index f94bc1015bba9..7cd4d3b317791 100644 --- a/docs/visual-basic/misc/bc30981.md +++ b/docs/visual-basic/misc/bc30981.md @@ -11,8 +11,15 @@ ms.assetid: fb68e246-c135-4e7a-a1be-12d83dbcf96f --- # \ in class \ cannot override \ in class \ because an intermediate class \ overrides \ in class \ but is not accessible. +**Error ID:** BC30981 + ## To correct this error +- Change the inheritance structure to directly inherit from the base class instead of going through the intermediate class. +- Make the intermediate class accessible by changing its access modifier to `Public` or an appropriate level. +- Override the member at the appropriate level in the inheritance hierarchy where it is accessible. +- Review the class design to ensure proper access levels throughout the inheritance chain. + ## See also - [Access levels in Visual Basic](../programming-guide/language-features/declared-elements/access-levels.md) diff --git a/docs/visual-basic/misc/bc31199.md b/docs/visual-basic/misc/bc31199.md index 0be8cd8498ecb..6aa9896d3f007 100644 --- a/docs/visual-basic/misc/bc31199.md +++ b/docs/visual-basic/misc/bc31199.md @@ -15,6 +15,10 @@ ms.assetid: c150778e-c82d-4e6e-acc0-06080eece1d1 ## To correct this error +- Update to a supported version of .NET Framework that includes the required components for Win32 manifest embedding. +- Remove the `/win32manifest` compiler option if Win32 manifest embedding is not required for your project. +- Verify that the .NET Framework installation is complete and includes the necessary updates for manifest support. + ## See also - [-win32manifest (Visual Basic)](../reference/command-line-compiler/win32manifest.md) diff --git a/docs/visual-basic/misc/bc31536.md b/docs/visual-basic/misc/bc31536.md index baf8e55cdd4e7..741eb8c71ff5d 100644 --- a/docs/visual-basic/misc/bc31536.md +++ b/docs/visual-basic/misc/bc31536.md @@ -15,6 +15,22 @@ ms.assetid: ce87cc25-ab61-4d5f-b0f8-2e87cc479d62 ## To correct this error +- Add the public key information in the project settings for the friend assembly. +- Use the command-line compiler switch to specify the public key: + + ```dotnetcli + vbc /keyfile:mykey.snk /reference:friendassembly.dll mycode.vb + ``` + +- Add the public key information to the `InternalsVisibleTo` attribute in the friend assembly: + + ```vb + ")> + ``` + +- Ensure both assemblies use the same strong naming key if strong naming is required. +- Check that the friend assembly declaration is correctly formatted and the assembly name matches exactly. + ## See also - diff --git a/docs/visual-basic/misc/bc31537.md b/docs/visual-basic/misc/bc31537.md index 72f882813d8d6..132da7589dce6 100644 --- a/docs/visual-basic/misc/bc31537.md +++ b/docs/visual-basic/misc/bc31537.md @@ -15,6 +15,17 @@ ms.assetid: a5b88d90-ce11-44cb-8df2-457f661a553b ## To correct this error +- Verify that the friend declaration syntax is correct and the assembly name is valid. +- Check that the referenced assembly exists and is accessible: + + ```vb + ' Ensure the assembly reference is correct + + ``` + +- Confirm that the strong name or public key token matches between assemblies if strong naming is used. +- Ensure the friend assembly has been compiled and is available to the current project. + ## See also - diff --git a/docs/visual-basic/misc/bc31538.md b/docs/visual-basic/misc/bc31538.md index 4c36418ad7c65..a43b788b2b08d 100644 --- a/docs/visual-basic/misc/bc31538.md +++ b/docs/visual-basic/misc/bc31538.md @@ -11,8 +11,18 @@ ms.assetid: a0b13f40-eee2-46fd-9e85-11c3988f7a95 --- # Member \ cannot override member \ defined in another assembly/project because… +**Error ID:** BC31538 + ## To correct this error +Review the access levels of the base member in the referenced assembly to determine the appropriate modifier. Ensure the overriding member does not expand the accessibility of the base member being overridden. For example, change the access modifier from `Protected Friend` to `Protected` for the overriding member: + +```vb +' Instead of Protected Friend (which expands access) +Protected Overrides Sub MyMethod() +' Use Protected (which matches the base member access level) +``` + ## See also - [Friend](../language-reference/modifiers/friend.md) diff --git a/docs/visual-basic/misc/bc36613.md b/docs/visual-basic/misc/bc36613.md index 0db43e5533bb7..5fb973271cd19 100644 --- a/docs/visual-basic/misc/bc36613.md +++ b/docs/visual-basic/misc/bc36613.md @@ -15,6 +15,8 @@ ms.assetid: 592d52a2-7442-472c-8b84-9dc63e24ba79 ## To correct this error +Ensure the XML identifier follows Visual Basic naming rules (starts with letter or underscore, contains only letters, digits, and underscores), or use a valid Visual Basic identifier for the property name explicitly. + ## See also - [Declared Element Names](../programming-guide/language-features/declared-elements/declared-element-names.md) diff --git a/docs/visual-basic/misc/bc36614.md b/docs/visual-basic/misc/bc36614.md index ab1c9759bc148..29cd731b64471 100644 --- a/docs/visual-basic/misc/bc36614.md +++ b/docs/visual-basic/misc/bc36614.md @@ -15,6 +15,8 @@ ms.assetid: cfa9a854-c70e-4f10-a009-2686c650ca2b ## To correct this error +Ensure the XML identifier follows Visual Basic naming rules when used as a range variable (starts with letter or underscore, contains only letters, digits, and underscores), or use a valid Visual Basic identifier for the range variable name explicitly. + ## See also - [Introduction to LINQ in Visual Basic](../programming-guide/language-features/linq/introduction-to-linq.md) diff --git a/docs/visual-basic/misc/bc42207.md b/docs/visual-basic/misc/bc42207.md index 910c78553635f..a958853cba04f 100644 --- a/docs/visual-basic/misc/bc42207.md +++ b/docs/visual-basic/misc/bc42207.md @@ -15,6 +15,18 @@ ms.assetid: c6129559-7273-4abe-b2f1-deea05d242c9 ## To correct this error +- Verify that the assembly reference path is correct and the assembly file exists: + + ```vb + ' Check the assembly reference in project settings + ' Ensure the file path is valid and accessible + ``` + +- Confirm that the referenced assembly is compiled for a compatible target framework. +- Check that the assembly is not corrupted by trying to reference it in a new test project. +- If the assembly requires dependencies, ensure they are also available and properly referenced. +- Update the assembly reference to point to the correct version or location of the assembly. + ## See also - [Visual Basic Command-Line Compiler](../reference/command-line-compiler/index.md) From a2a82d83b89aa19652537ec932d28e80b7880b9d Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 4 Sep 2025 14:09:10 +0000 Subject: [PATCH 4/8] Add documentation for Visual Basic -pathmap compiler option (#48177) * Initial plan * Add -pathmap compiler option documentation for Visual Basic Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> * Apply code review suggestions and add pathmap to Visual Basic TOC Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> Co-authored-by: Bill Wagner Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- .../compiler-options-listed-alphabetically.md | 1 + .../compiler-options-listed-by-category.md | 1 + .../command-line-compiler/pathmap.md | 62 +++++++++++++++++++ docs/visual-basic/toc.yml | 2 + 4 files changed, 66 insertions(+) create mode 100644 docs/visual-basic/reference/command-line-compiler/pathmap.md diff --git a/docs/visual-basic/reference/command-line-compiler/compiler-options-listed-alphabetically.md b/docs/visual-basic/reference/command-line-compiler/compiler-options-listed-alphabetically.md index 562923cb65ece..0c3378ddb9fb0 100644 --- a/docs/visual-basic/reference/command-line-compiler/compiler-options-listed-alphabetically.md +++ b/docs/visual-basic/reference/command-line-compiler/compiler-options-listed-alphabetically.md @@ -54,6 +54,7 @@ The Visual Basic command-line compiler is provided as an alternative to compilin |[-optionstrict](optionstrict.md)|Enforces strict language semantics.| |[-out](out.md)|Specifies an output file.| |-parallel[+|-]|Specifies whether to use concurrent build (+).| +|[-pathmap](pathmap.md)|Specifies how to map physical paths to source path names output by the compiler.| |[-platform](platform.md)|Specifies the processor platform the compiler targets for the output file.| |`-preferreduilang`|Specify the preferred output language name.| |[-quiet](quiet.md)|Prevents the compiler from displaying code for syntax-related errors and warnings.| diff --git a/docs/visual-basic/reference/command-line-compiler/compiler-options-listed-by-category.md b/docs/visual-basic/reference/command-line-compiler/compiler-options-listed-by-category.md index e150ca7129bff..9821f1bf3c2a3 100644 --- a/docs/visual-basic/reference/command-line-compiler/compiler-options-listed-by-category.md +++ b/docs/visual-basic/reference/command-line-compiler/compiler-options-listed-by-category.md @@ -113,6 +113,7 @@ The Visual Basic command-line compiler is provided as an alternative to compilin |[-noconfig](noconfig.md)|Do not compile with Vbc.rsp| |[-nostdlib](nostdlib.md)|Causes the compiler not to reference the standard libraries.| |[-nowin32manifest](nowin32manifest.md)|Instructs the compiler not to embed any application manifest into the executable file.| +|[-pathmap](pathmap.md)|Specifies how to map physical paths to source path names output by the compiler.| |[-platform](platform.md)|Specifies the processor platform the compiler targets for the output file.| |[-recurse](recurse.md)|Searches subdirectories for source files to compile.| |[-rootnamespace](rootnamespace.md)|Specifies a namespace for all type declarations.| diff --git a/docs/visual-basic/reference/command-line-compiler/pathmap.md b/docs/visual-basic/reference/command-line-compiler/pathmap.md new file mode 100644 index 0000000000000..695d79298a73d --- /dev/null +++ b/docs/visual-basic/reference/command-line-compiler/pathmap.md @@ -0,0 +1,62 @@ +--- +description: "Learn more about: -pathmap" +title: "-pathmap" +ms.date: 09/04/2025 +f1_keywords: + - "pathmap" + - "-pathmap" +helpviewer_keywords: + - "-pathmap compiler option [Visual Basic]" + - "/pathmap compiler option [Visual Basic]" + - "pathmap compiler option [Visual Basic]" +ai-usage: ai-generated +--- +# -pathmap + +Specifies how to map physical paths to source path names output by the compiler. + +## Syntax + +```console +-pathmap:path1=sourcePath1,path2=sourcePath2 +``` + +## Arguments + +| Term | Definition | +|----------------|-----------------------------------------------------------------------------| +| `path1` | Required. The full path to the source files in the current environment. | +| `sourcePath1` | Required. The source path substituted for `path1` in any output files. | + +## Remarks + +> [!NOTE] +> Specifying `-pathmap` prevents breakpoints from working in local debug builds. Only set `-pathmap` for production or continuous integration builds. + +The `-pathmap` compiler option specifies how to map physical paths to source path names output by the compiler. This option maps each physical path on the machine where the compiler runs to a corresponding path that should be written in the output files. + +To specify multiple mapped source paths, separate each with a comma. + +The compiler writes the source path into its output for the following reasons: + +- The source path is substituted for an argument when the is applied to an optional parameter. +- The source path is embedded in a PDB file. +- The path of the PDB file is embedded into a PE (portable executable) file. + +The `-pathmap` option is not available from within the Visual Studio development environment; it's available only when compiling from the command line. + +## Example + +The following example compiles `Test.vb` and maps the source paths: + +```console +vbc -pathmap:C:\MyProject\=\BuildServer\,C:\Temp\=\BuildTemp\ Test.vb +``` + +In this example, if a source file is located at `C:\MyProject\Program.vb`, it will appear in the output as `\BuildServer\Program.vb`. + +## See also + +- [Visual Basic Command-Line Compiler](index.md) +- [Sample Compilation Command Lines](sample-compilation-command-lines.md) +- diff --git a/docs/visual-basic/toc.yml b/docs/visual-basic/toc.yml index fd922fb986657..0e749ebb57c55 100644 --- a/docs/visual-basic/toc.yml +++ b/docs/visual-basic/toc.yml @@ -1379,6 +1379,8 @@ items: href: reference/command-line-compiler/optionstrict.md - name: -out href: reference/command-line-compiler/out.md + - name: -pathmap + href: reference/command-line-compiler/pathmap.md - name: -platform href: reference/command-line-compiler/platform.md - name: -quiet From 68c8c771e88a983c420c41c1ba94add0c016f935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Cincura=20=E2=86=B9?= Date: Thu, 4 Sep 2025 17:18:38 +0200 Subject: [PATCH 5/8] Add Chroma .NET SDK link (#48253) --- docs/ai/includes/vector-databases.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ai/includes/vector-databases.md b/docs/ai/includes/vector-databases.md index c0d5b65daeb4a..74b6b3c2abbae 100644 --- a/docs/ai/includes/vector-databases.md +++ b/docs/ai/includes/vector-databases.md @@ -16,7 +16,7 @@ Semantic Kernel provides connectors for the following vector databases and servi | Azure Cosmos DB for MongoDB | [Microsoft.SemanticKernel.Connectors.AzureCosmosDBMongoDB](https://www.nuget.org/packages/Microsoft.SemanticKernel.Connectors.AzureCosmosDBMongoDB) | [MongoDb.Driver](https://www.nuget.org/packages/MongoDB.Driver) | | Azure PostgreSQL Server | [Microsoft.SemanticKernel.Connectors.Postgres](https://www.nuget.org/packages/Microsoft.SemanticKernel.Connectors.Postgres) | [Npgsql](https://www.nuget.org/packages/Npgsql/) | | Azure SQL Database | [Microsoft.SemanticKernel.Connectors.SqlServer](https://www.nuget.org/packages/Microsoft.SemanticKernel.Connectors.SqlServer) | [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient) | -| Chroma | [Microsoft.SemanticKernel.Connectors.Chroma](https://www.nuget.org/packages/Microsoft.SemanticKernel.Connectors.Chroma) | NA | +| Chroma | [Microsoft.SemanticKernel.Connectors.Chroma](https://www.nuget.org/packages/Microsoft.SemanticKernel.Connectors.Chroma) | [ChromaDB.Client](https://www.nuget.org/packages/ChromaDB.Client) | | DuckDB | [Microsoft.SemanticKernel.Connectors.DuckDB](https://www.nuget.org/packages/Microsoft.SemanticKernel.Connectors.DuckDB) | [DuckDB.NET.Data.Full](https://www.nuget.org/packages/DuckDB.NET.Data.Full) | | Milvus | [Microsoft.SemanticKernel.Connectors.Milvus](https://www.nuget.org/packages/Microsoft.SemanticKernel.Connectors.Milvus) | [Milvus.Client](https://www.nuget.org/packages/Milvus.Client) | | MongoDB Atlas Vector Search | [Microsoft.SemanticKernel.Connectors.MongoDB](https://www.nuget.org/packages/Microsoft.SemanticKernel.Connectors.MongoDB) | [MongoDb.Driver](https://www.nuget.org/packages/MongoDB.Driver) | From 65ab242822f705d98a81eb7124983041f8d30217 Mon Sep 17 00:00:00 2001 From: Mariam Abdullah <122357303+mariam-abdulla@users.noreply.github.com> Date: Thu, 4 Sep 2025 17:19:27 +0200 Subject: [PATCH 6/8] Update dotnet test --arch and --runtime options (#48181) --- docs/core/tools/dotnet-test.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/core/tools/dotnet-test.md b/docs/core/tools/dotnet-test.md index a273970afb8de..062608d4ccc2f 100644 --- a/docs/core/tools/dotnet-test.md +++ b/docs/core/tools/dotnet-test.md @@ -496,6 +496,9 @@ With Microsoft Testing Platform, `dotnet test` operates faster than with VSTest. Short form `-r` available starting in .NET SDK 7. + > [!NOTE] + > Running tests for a solution with a global `RuntimeIdentifier` property (explicitly or via `--arch`, `--runtime`, or `--os`) is not supported. Set `RuntimeIdentifier` on an individual project level instead. + - **`-v|--verbosity `** Sets the MSBuild verbosity level. Allowed values are `q[uiet]`, `m[inimal]`, `n[ormal]`, `d[etailed]`, and `diag[nostic]`. For more information, see . From 444dc32969d9c15cb361cb3d64c6df9c78670c74 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 4 Sep 2025 09:25:16 -0700 Subject: [PATCH 7/8] Update package index with latest published versions (#48255) --- docs/azure/includes/dotnet-all.md | 2 +- docs/azure/includes/dotnet-new.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md index 53fd5b3e9133f..2b83ee4be8dd3 100644 --- a/docs/azure/includes/dotnet-all.md +++ b/docs/azure/includes/dotnet-all.md @@ -279,7 +279,7 @@ | Resource Management - IoT Operations | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.IotOperations/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.IotOperations-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.IotOperations_1.0.0/sdk/iotoperations/Azure.ResourceManager.IotOperations/) | | Resource Management - Key Vault | NuGet [1.3.2](https://www.nuget.org/packages/Azure.ResourceManager.KeyVault/1.3.2) | [docs](/dotnet/api/overview/azure/ResourceManager.KeyVault-readme) | GitHub [1.3.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.KeyVault_1.3.2/sdk/keyvault/Azure.ResourceManager.KeyVault/) | | Resource Management - Kubernetes Configuration | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.KubernetesConfiguration/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.KubernetesConfiguration-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.KubernetesConfiguration_1.2.0/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/) | -| Resource Management - Kusto | NuGet [1.6.1](https://www.nuget.org/packages/Azure.ResourceManager.Kusto/1.6.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Kusto-readme) | GitHub [1.6.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Kusto_1.6.1/sdk/kusto/Azure.ResourceManager.Kusto/) | +| Resource Management - Kusto | NuGet [1.6.2](https://www.nuget.org/packages/Azure.ResourceManager.Kusto/1.6.2) | [docs](/dotnet/api/overview/azure/ResourceManager.Kusto-readme) | GitHub [1.6.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Kusto_1.6.2/sdk/kusto/Azure.ResourceManager.Kusto/) | | Resource Management - Lab Services | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.LabServices/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.LabServices-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.LabServices_1.1.1/sdk/labservices/Azure.ResourceManager.LabServices/) | | Resource Management - Lambdatesthyperexecute | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.LambdaTestHyperExecute/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.LambdaTestHyperExecute-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.LambdaTestHyperExecute_1.0.0/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/) | | Resource Management - Large Instance | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.LargeInstance/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.LargeInstance-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.LargeInstance_1.0.0-beta.2/sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance/) | diff --git a/docs/azure/includes/dotnet-new.md b/docs/azure/includes/dotnet-new.md index 9d069c7a0183b..27835984eeec8 100644 --- a/docs/azure/includes/dotnet-new.md +++ b/docs/azure/includes/dotnet-new.md @@ -288,7 +288,7 @@ | Resource Management - IoT Operations | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.IotOperations/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.IotOperations-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.IotOperations_1.0.0/sdk/iotoperations/Azure.ResourceManager.IotOperations/) | | Resource Management - Key Vault | NuGet [1.3.2](https://www.nuget.org/packages/Azure.ResourceManager.KeyVault/1.3.2) | [docs](/dotnet/api/overview/azure/ResourceManager.KeyVault-readme) | GitHub [1.3.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.KeyVault_1.3.2/sdk/keyvault/Azure.ResourceManager.KeyVault/) | | Resource Management - Kubernetes Configuration | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.KubernetesConfiguration/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.KubernetesConfiguration-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.KubernetesConfiguration_1.2.0/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/) | -| Resource Management - Kusto | NuGet [1.6.1](https://www.nuget.org/packages/Azure.ResourceManager.Kusto/1.6.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Kusto-readme) | GitHub [1.6.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Kusto_1.6.1/sdk/kusto/Azure.ResourceManager.Kusto/) | +| Resource Management - Kusto | NuGet [1.6.2](https://www.nuget.org/packages/Azure.ResourceManager.Kusto/1.6.2) | [docs](/dotnet/api/overview/azure/ResourceManager.Kusto-readme) | GitHub [1.6.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Kusto_1.6.2/sdk/kusto/Azure.ResourceManager.Kusto/) | | Resource Management - Lab Services | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.LabServices/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.LabServices-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.LabServices_1.1.1/sdk/labservices/Azure.ResourceManager.LabServices/) | | Resource Management - Lambdatesthyperexecute | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.LambdaTestHyperExecute/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.LambdaTestHyperExecute-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.LambdaTestHyperExecute_1.0.0/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/) | | Resource Management - Large Instance | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.LargeInstance/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.LargeInstance-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.LargeInstance_1.0.0-beta.2/sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance/) | From 96233be578b032fef2fe2537188378f48e5c9198 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Thu, 4 Sep 2025 18:54:09 -0700 Subject: [PATCH 8/8] Update pruning breaking change for RC 1 (#48261) --- docs/core/compatibility/10.0.md | 2 +- .../sdk/10.0/nu1510-pruned-references.md | 15 ++++++----- .../prune-packagereference-privateassets.md | 26 +++++++++---------- docs/core/compatibility/toc.yml | 2 +- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md index 971c193e7ea29..141acda5665f4 100644 --- a/docs/core/compatibility/10.0.md +++ b/docs/core/compatibility/10.0.md @@ -115,7 +115,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af | [NU1510 is raised for direct references pruned by NuGet](sdk/10.0/nu1510-pruned-references.md) | Source incompatible | Preview 1 | | [NuGet packages with no runtime assets aren't included in deps.json](sdk/10.0/deps-json-trimmed-packages.md) | Source incompatible | Preview 5 | | [PackageReference without a version raises an error](sdk/10.0/nu1015-packagereference-version.md) | Behavioral change | Preview 6 | -| [PrunePackageReference marks direct prunable references with PrivateAssets=all and IncludeAssets=none](sdk/10.0/prune-packagereference-privateassets.md) | Behavioral change | Preview 7 | +| [PrunePackageReference privatizes direct prunable references](sdk/10.0/prune-packagereference-privateassets.md) | Behavioral change | Preview 7 | | [HTTP warnings promoted to errors in `dotnet package list` and `dotnet package search`](sdk/10.0/http-warnings-to-errors.md) | Behavioral/source incompatible change | Preview 4 | | [NUGET_ENABLE_ENHANCED_HTTP_RETRY environment variable removed](sdk/10.0/nuget-enhanced-http-retry-removed.md) | Behavioral change | Preview 6 | diff --git a/docs/core/compatibility/sdk/10.0/nu1510-pruned-references.md b/docs/core/compatibility/sdk/10.0/nu1510-pruned-references.md index 7762deff6c9c6..074ca3f9d420a 100644 --- a/docs/core/compatibility/sdk/10.0/nu1510-pruned-references.md +++ b/docs/core/compatibility/sdk/10.0/nu1510-pruned-references.md @@ -1,18 +1,21 @@ --- title: "Breaking change - NU1510 is raised for direct references pruned by NuGet" description: "Learn about the breaking change in the .NET 10 SDK where NU1510 is raised for unnecessary direct package references." -ms.date: 08/11/2025 +ms.date: 09/04/2025 ai-usage: ai-assisted ms.custom: https://github.com/dotnet/docs/issues/45462 --- # NU1510 is raised for direct references pruned by NuGet -Starting in .NET 10, NuGet raises a [`NU1510` warning](/nuget/reference/errors-and-warnings/nu1510) when a project includes a direct package reference that overlaps with a framework-provided library and isn't required. +Starting in the .NET 10 SDK, when pruning is enabled, NuGet raises a [`NU1510` warning](/nuget/reference/errors-and-warnings/nu1510) for projects that: + +- Target or multi-target .NET 10 or a later version. +- Include a direct package reference that overlaps with a framework-provided library (that is, the reference isn't necessary). ## Version introduced -.NET 10 Preview 1 +.NET 10 ## Previous behavior @@ -20,10 +23,10 @@ Previously, the .NET SDK ignored the contents of a package if it overlapped with ## New behavior -Starting in .NET 10, NuGet handles any unnecessary package references by raising a `NU1510` warning to notify you of the issue. +Starting with the .NET 10 SDK, if pruning is enabled and the project targets .NET 10 or a later version, NuGet notifies you of any unnecessary package references by raising a `NU1510` warning. > [!NOTE] -> In a later .NET 10 preview, this behavior changed again such that direct prunable package references are automatically excluded from the `.nuspec` file. For more information, see [PrunePackageReference marks direct prunable references with PrivateAssets=all and IncludeAssets=none](prune-packagereference-privateassets.md). +> In a later .NET 10 preview, a related change was made such that [direct prunable package references](prune-packagereference-privateassets.md) are automatically excluded from the `.nuspec` file. However, you'll still get the `NU1510` warning to clean up your project. ## Type of breaking change @@ -56,4 +59,4 @@ None. ## See also -- [PrunePackageReference marks direct prunable references with PrivateAssets=all and IncludeAssets=none](prune-packagereference-privateassets.md) +- [PrunePackageReference privatizes direct prunable references](prune-packagereference-privateassets.md) diff --git a/docs/core/compatibility/sdk/10.0/prune-packagereference-privateassets.md b/docs/core/compatibility/sdk/10.0/prune-packagereference-privateassets.md index 54844e80f56e5..2fbeaf2aafd2f 100644 --- a/docs/core/compatibility/sdk/10.0/prune-packagereference-privateassets.md +++ b/docs/core/compatibility/sdk/10.0/prune-packagereference-privateassets.md @@ -1,11 +1,11 @@ --- -title: "Breaking change - PrunePackageReference marks direct prunable references with PrivateAssets=all and IncludeAssets=none" +title: "Breaking change - PrunePackageReference privatizes direct prunable references" description: "Learn about the breaking change in the .NET 10 SDK where PrunePackageReference automatically marks directly prunable PackageReference with PrivateAssets=all and IncludeAssets=none." -ms.date: 01/03/2025 +ms.date: 09/04/2025 ai-usage: ai-assisted --- -# PrunePackageReference marks direct prunable references with PrivateAssets=all and IncludeAssets=none +# PrunePackageReference privatizes direct prunable references The [PrunePackageReference](/nuget/consume-packages/package-references-in-project-files#prunepackagereference) feature automatically removes *transitive* packages that are provided by the target platform. With this change, the feature also marks *directly* prunable `PackageReference` items with `PrivateAssets=all` and `IncludeAssets=none` attributes. These attributes prevent the packages from appearing in generated dependency lists for packages. @@ -15,17 +15,17 @@ The [PrunePackageReference](/nuget/consume-packages/package-references-in-projec ## Previous behavior -In earlier .NET 10 previews, directly prunable `PackageReference` items might have generated an [`NU1510` warning](/nuget/reference/errors-and-warnings/nu1510) but still appeared in the generated *.nuspec* dependencies for all target frameworks, even those where the package is provided by the platform. +Starting in .NET 10 Preview 1, if pruning was enabled, directly prunable `PackageReference` items might have generated an [`NU1510` warning](/nuget/reference/errors-and-warnings/nu1510) but still appeared in the generated *.nuspec* dependencies list, even if the package was provided by the platform. For example, consider a multi-targeting project with the following configuration: ```xml - net9.0;net472 + net10.0;net472 - + ``` @@ -34,26 +34,26 @@ Such a project file generated a *.nuspec* file with dependencies for both target ```xml - + - - + + ``` ## New behavior -Starting in .NET 10 Preview 7, directly prunable `PackageReference` items are automatically marked with `PrivateAssets=all` and `IncludeAssets=none`, which excludes them from the generated dependencies for target frameworks where they're provided by the platform. +Starting in .NET 10 Preview 7, when pruning is enabled, directly prunable `PackageReference` items are automatically marked with `PrivateAssets=all` and `IncludeAssets=none`, which excludes them from the generated dependencies for target frameworks where they're provided by the platform. (However, if your project targets .NET 10 or later, you'll still get the `NU1510` warning until you remove the reference from your project.) -The same project configuration now generates a *.nuspec* file with the prunable dependency removed from the target framework that provides it (.NET 9): +The same project configuration now generates a *.nuspec* file with the prunable dependency removed from the target framework that provides it (.NET 10): ```xml - + - + ``` diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 9a56a8726e7a3..e307e5e63682e 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -132,7 +132,7 @@ items: href: sdk/10.0/deps-json-trimmed-packages.md - name: PackageReference without a version raises error href: sdk/10.0/nu1015-packagereference-version.md - - name: PrunePackageReference marks direct prunable references with PrivateAssets=all and IncludeAssets=none + - name: PrunePackageReference privatizes direct prunable references href: sdk/10.0/prune-packagereference-privateassets.md - name: HTTP warnings promoted to errors in package list and search href: sdk/10.0/http-warnings-to-errors.md