diff --git a/docfx.json b/docfx.json index e14d7c8db81cd..39f2a3fffb0bf 100644 --- a/docfx.json +++ b/docfx.json @@ -330,6 +330,7 @@ "docs/core/diagnostics/**/**.md": "tommcdon", "docs/core/extensions/**/**.md": "IEvangelist", "docs/core/docker/**/**.md": "IEvangelist", + "docs/core/install/**/**.md": "adegeo", "docs/core/native-interop/**/**.md": "jkoritzinsky", "docs/core/project-sdk/**/**.md": "gewarren", "docs/core/runtime-config/**/**.md": "gewarren", @@ -421,6 +422,7 @@ "docs/core/diagnostics/**/**.md": "tommcdon", "docs/core/extensions/**/**.md": "dapine", "docs/core/docker/**/**.md": "dapine", + "docs/core/install/**/**.md": "adegeo", "docs/core/native-interop/**/**.md": "jekoritz", "docs/core/porting/**/**.md": "dotnetcontent", "docs/core/project-sdk/**/**.md": "gewarren", diff --git a/docs/ai/quickstarts/get-started-openai.md b/docs/ai/quickstarts/get-started-openai.md index 3ef018134108e..82fbc56116200 100644 --- a/docs/ai/quickstarts/get-started-openai.md +++ b/docs/ai/quickstarts/get-started-openai.md @@ -12,214 +12,146 @@ zone_pivot_groups: openai-library # Build an AI chat app with .NET - -:::zone target="docs" pivot="openai" - +In this quickstart, you learn how to create a conversational .NET console chat app using an OpenAI or Azure OpenAI model. The app uses the [`Microsoft.Extensions.AI`](https://www.nuget.org/packages/Microsoft.Extensions.AI) library so you can write code using AI abstractions rather than a specific SDK. AI abstractions enable you to change the underlying AI model with minimal code changes. + +> [!NOTE] +> The [`Microsoft.Extensions.AI`](https://www.nuget.org/packages/Microsoft.Extensions.AI/) library is currently in Preview. -Get started with OpenAI and [Semantic Kernel](../semantic-kernel-dotnet-overview.md) by creating a simple .NET 8 console chat application. The application will run locally and use the OpenAI `gpt-3.5-turbo` model. Follow these steps to get access to OpenAI and learn how to use Semantic Kernel. +:::zone target="docs" pivot="openai" -[!INCLUDE [download-alert](includes/prerequisites-openai.md)] +[!INCLUDE [openai-prereqs](includes/prerequisites-openai.md)] :::zone-end - :::zone target="docs" pivot="azure-openai" - -Get started with OpenAI and [Semantic Kernel](../semantic-kernel-dotnet-overview.md) by creating a simple .NET 8 console chat application. The application will run locally and connect to the OpenAI `gpt-35-turbo` model deployed into Azure OpenAI. Follow these steps to provision Azure OpenAI and learn how to use Semantic Kernel. - -[!INCLUDE [download-alert](includes/prerequisites-azure-openai.md)] +[!INCLUDE [azure-openai-prereqs](includes/prerequisites-azure-openai.md)] :::zone-end -## Get the sample project +[!INCLUDE [semantic-kernel](../../azure/includes/semantic-kernel.md)] [!INCLUDE [clone-sample-repo](includes/clone-sample-repo.md)] -:::zone target="docs" pivot="azure-openai" +## Create the app -## Create the Azure OpenAI service +Complete the following steps to create a .NET console app to connect to an AI model. -# [Azure Developer CLI](#tab/azd) +1. In an empty directory on your computer, use the `dotnet new` command to create a new console app: -[!INCLUDE [deploy-azd](includes/deploy-azd.md)] + ```dotnetcli + dotnet new console -o ChatAppAI + ``` -# [Azure CLI](#tab/azure-cli) +1. Change directory into the app folder: -1. To provision an Azure OpenAI service and model using the Azure CLI, complete the steps in the [Create and deploy an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource?pivots=cli) article. + ```dotnetcli + cd ChatAppAI + ``` -1. From a terminal or command prompt, navigate to the `src\quickstarts\azure-openai\semantic-kernel\02-HikerAI` directory. +1. Install the required packages: -1. Run the following commands to configure your OpenAI API key as a secret for the sample app: + :::zone target="docs" pivot="azure-openai" ```bash - dotnet user-secrets init - dotnet user-secrets set OpenAIKey - -# [Azure Portal](#tab/azure-portal) - -1. To provision an Azure OpenAI service and model using the Azure portal, complete the steps in the [Create and deploy an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal) article. + dotnet add package Azure.Identity + dotnet add package Azure.AI.OpenAI + dotnet add package Microsoft.Extensions.AI.OpenAI + dotnet add package Microsoft.Extensions.Configuration + dotnet add package Microsoft.Extensions.Configuration.UserSecrets + ``` -1. From a terminal or command prompt, navigate to the `src\quickstarts\azure-openai\semantic-kernel\02-HikerAI` directory. + :::zone-end -1. Run the following commands to configure your OpenAI API key as a secret for the sample app: + :::zone target="docs" pivot="openai" ```bash - dotnet user-secrets init - dotnet user-secrets set OpenAIKey - ---- - -:::zone-end - -## Try the HikerAI sample - - -:::zone target="docs" pivot="openai" + dotnet add package OpenAI + dotnet add package Microsoft.Extensions.AI.OpenAI + dotnet add package Microsoft.Extensions.Configuration + dotnet add package Microsoft.Extensions.Configuration.UserSecrets + ``` -1. From a terminal or command prompt, navigate to the `src\quickstarts\azure-openai\semantic-kernel\02-HikerAI` directory. + :::zone-end -1. Run the following commands to configure your OpenAI API key as a secret for the sample app: +1. Open the app in Visual Studio Code (or your editor of choice). ```bash - dotnet user-secrets init - dotnet user-secrets set OpenAIKey - ``` - -1. Use the `dotnet run` command to run the app: - - ```dotnetcli - dotnet run + code . ``` -:::zone-end - :::zone target="docs" pivot="azure-openai" -1. From a terminal or command prompt, navigate to the `semantic-kernel\02-HikerAI` directory. - -2. Use the `dotnet run` command to run the app: - - ```dotnetcli - dotnet run - ``` - - > [!TIP] - > If you get an error message, the Azure OpenAI resources might not have finished deploying. Wait a couple of minutes and try again. +[!INCLUDE [create-ai-service](includes/create-ai-service.md)] :::zone-end :::zone target="docs" pivot="openai" -## Explore the code - -The app uses the [`Microsoft.SemanticKernel`](https://www.nuget.org/packages/Microsoft.SemanticKernel) package to send and receive requests to the OpenAI service. +## Configure the app -The app code is contained within the **Program.cs** file. The first several lines of code set configuration values and get the OpenAI Key that was previously set using the `dotnet user-secrets` command. +1. Navigate to the root of your .NET project from a terminal or command prompt. -```csharp -var config = new ConfigurationBuilder().AddUserSecrets().Build(); -string model = "gpt-3.5-turbo"; -string key = config["OpenAIKey"]; -``` - -The `OpenAIChatCompletionService` service facilitates the requests and responses. +1. Run the following commands to configure your OpenAI API key as a secret for the sample app: -```csharp -// Create the OpenAI Chat Completion Service -OpenAIChatCompletionService service = new(model, key); -``` + ```bash + dotnet user-secrets init + dotnet user-secrets set OpenAIKey + dotnet user-secrets set ModelName + ``` :::zone-end - -:::zone target="docs" pivot="azure-openai" - +## Add the app code -## Explore the code +The app uses the [`Microsoft.Extensions.AI`](https://www.nuget.org/packages/Microsoft.Extensions.AI/) package to send and receive requests to the AI model and is designed to provide users with information about hiking trails. -The application uses the [`Microsoft.SemanticKernel`](https://www.nuget.org/packages/Microsoft.SemanticKernel) package to send and receive requests to an Azure OpenAI service deployed in Azure. +1. In the **Program.cs** file, add the following code to connect and authenticate to the AI model. -The entire application is contained within the **Program.cs** file. The first several lines of code retrieve the secrets and configuration values that were set in the `dotnet user-secrets` for you during the application provisioning. + :::zone target="docs" pivot="azure-openai" -```csharp -// Retrieve the local secrets saved during the Azure deployment -var config = new ConfigurationBuilder().AddUserSecrets().Build(); -string endpoint = config["AZURE_OPENAI_ENDPOINT"]; -string deployment = config["AZURE_OPENAI_GPT_NAME"]; -``` + :::code language="csharp" source="snippets/build-chat-app/azure-openai/program.cs" range="1-12"::: -The `AzureOpenAIChatCompletionService` service facilitates the requests and responses. + > [!NOTE] + > searches for authentication credentials from your local tooling. If you aren't using the `azd` template to provision the Azure OpenAI resource, you'll need to assign the `Azure AI Developer` role to the account you used to sign in to Visual Studio or the Azure CLI. For more information, see [Authenticate to Azure AI services with .NET](../azure-ai-services-authentication.md). -```csharp -// Create the Azure OpenAI Chat Completion Service -AzureOpenAIChatCompletionService service = new(deployment, endpoint, new DefaultAzureCredential()); -``` + :::zone-end -:::zone-end + :::zone target="docs" pivot="openai" -Add a system prompt to provide more context to the model, which influences model behavior and the generated completions during the conversation. + :::code language="csharp" source="snippets/build-chat-app/openai/program.cs" range="1-11"::: -```csharp -// Start the conversation with context for the AI model -ChatHistory chatHistory = new(""" - You are a hiking enthusiast who helps people discover fun hikes in their area. - You are upbeat and friendly. You introduce yourself when first saying hello. - When helping people out, you always ask them for this information - to inform the hiking recommendation you provide: + :::zone-end - 1. Where they are located - 2. What hiking intensity they are looking for +1. Create a system prompt to provide the AI model with initial role context and instructions about hiking recommendations: - You will then provide three suggestions for nearby hikes that vary in length - after you get that information. You will also share an interesting fact about - the local nature on the hikes when making a recommendation. - """); -``` + :::code language="csharp" source="snippets/build-chat-app/openai/program.cs" range="13-30"::: -Add a user message to the chat history using the `AddUserMessage` function. Use the `GetChatMessageContentAsync` function to instruct the model to generate a response based off the system prompt and the user request. +1. Create a conversational loop that accepts an input prompt from the user, sends the prompt to the model, and prints the response completion: -```csharp - -// Add user message to chat history -chatHistory.AddUserMessage("Hi! Apparently you can help me find a hike that I will like?"); - -// Print User Message to console -Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last().Content}"); - -// Get response -var response = await service.GetChatMessageContentAsync( - chatHistory, new OpenAIPromptExecutionSettings() { MaxTokens = 400 }); -``` + :::code language="csharp" source="snippets/build-chat-app/openai/program.cs" range="32-51"::: -Add the response from the mode to maintain the chat history. - -```csharp -// Add response to chat history -chatHistory.Add(response); +1. Use the `dotnet run` command to run the app: -// Print Response to console -Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last().Content}"); -``` + ```dotnetcli + dotnet run + ``` -Customize the system prompt and user message to see how the model responds to help you find a hike that you'll like. + The app prints out the completion response from the AI model. Send additional follow up prompts and ask other questions to experiment with the AI chat functionality. - :::zone target="docs" pivot="azure-openai" - + ## Clean up resources -Remove the corresponding deployment and all resources when you no longer need the sample application or resources. +When you no longer need the sample application or resources, remove the corresponding deployment and all resources. ```azdeveloper azd down ``` -[!INCLUDE [troubleshoot](includes/troubleshoot.md)] - :::zone-end ## Next steps -- [Quickstart - Get insight about your data from .NET AI chat app](quickstart-ai-chat-with-data.md) -- [Generate text and conversations with .NET and OpenAI Completions](/training/modules/open-ai-dotnet-text-completions/) +- [Quickstart - Chat with a local AI model](quickstart-local-ai.md) +- [Generate images using AI with .NET](quickstart-openai-generate-images.md) diff --git a/docs/ai/quickstarts/includes/clone-sample-repo.md b/docs/ai/quickstarts/includes/clone-sample-repo.md index cf0519bc57332..c27f5d28d91b0 100644 --- a/docs/ai/quickstarts/includes/clone-sample-repo.md +++ b/docs/ai/quickstarts/includes/clone-sample-repo.md @@ -7,7 +7,7 @@ ms.topic: include ## Clone the sample repository - You can create your own app and follow along the steps in the sections ahead, or you can clone the GitHub repository that contains the completed sample apps for all of the quickstarts. The sample repo is also structured as an Azure Developer CLI template that can provision an Azure OpenAI resource for you. + You can create your own app using the steps in the sections ahead, or you can clone the GitHub repository that contains the completed sample apps for all of the quickstarts. If you plan to use Azure OpenAI, the sample repo is also structured as an Azure Developer CLI template that can provision an Azure OpenAI resource for you. ```bash git clone https://github.com/dotnet/ai-samples.git diff --git a/docs/ai/quickstarts/includes/create-ai-service.md b/docs/ai/quickstarts/includes/create-ai-service.md index 470e74356373b..2c9532b80d143 100644 --- a/docs/ai/quickstarts/includes/create-ai-service.md +++ b/docs/ai/quickstarts/includes/create-ai-service.md @@ -10,7 +10,7 @@ 1. From a terminal or command prompt, navigate to the root of your project directory. -1. Run the following commands to configure your OpenAI API key as a secret for the sample app: +1. Run the following commands to configure your Azure OpenAI endpoint and model name for the sample app: ```bash dotnet user-secrets init @@ -24,7 +24,7 @@ 1. From a terminal or command prompt, navigate to the root of your project directory. -1. Run the following commands to configure your OpenAI API key as a secret for the sample app: +1. Run the following commands to configure your Azure OpenAI endpoint and model name for the sample app: ```bash dotnet user-secrets init diff --git a/docs/ai/quickstarts/quickstart-azure-openai-tool.md b/docs/ai/quickstarts/quickstart-azure-openai-tool.md index 13e0f625acf09..225c1f7821a51 100644 --- a/docs/ai/quickstarts/quickstart-azure-openai-tool.md +++ b/docs/ai/quickstarts/quickstart-azure-openai-tool.md @@ -10,220 +10,135 @@ zone_pivot_groups: openai-library # CustomerIntent: As a .NET developer new to OpenAI, I want deploy and use sample code to interact to learn from the sample code how to extend the model using Tools. --- -# Extend OpenAI using Tools and execute a local Function with .NET +# Invoke .NET functions using an AI model - -:::zone target="docs" pivot="openai" - +In this quickstart, you create a .NET console AI chat app to connect to an AI model with local function calling enabled. The app uses the [`Microsoft.Extensions.AI`](https://www.nuget.org/packages/Microsoft.Extensions.AI) library so you can write code using AI abstractions rather than a specific SDK. AI abstractions enable you to change the underlying AI model with minimal code changes. + +> [!NOTE] +> The [`Microsoft.Extensions.AI`](https://www.nuget.org/packages/Microsoft.Extensions.AI/) library is currently in Preview. -Get started with AI by creating a simple .NET 8 console chat application. The application will run locally and use the OpenAI `gpt-3.5-turbo` model, using Tools to extend the model's capabilities by calling a local .NET method. Follow these steps to get access to OpenAI and learn how to use Semantic Kernel. +:::zone target="docs" pivot="openai" -[!INCLUDE [download-alert](includes/prerequisites-openai.md)] +[!INCLUDE [openai-prereqs](includes/prerequisites-openai.md)] :::zone-end - :::zone target="docs" pivot="azure-openai" - -Get started with AI by creating a simple .NET 8 console chat application. The application will run locally and use the OpenAI `gpt-35-turbo` model deployed into an Azure OpenAI account. It uses Tools to extend the model's capabilities by calling a local .NET method. Follow these steps to provision Azure OpenAI and learn how to use Semantic Kernel. - -[!INCLUDE [download-alert](includes/prerequisites-azure-openai.md)] +[!INCLUDE [azure-openai-prereqs](includes/prerequisites-azure-openai.md)] :::zone-end -## Get the sample project +[!INCLUDE [semantic-kernel](../../azure/includes/semantic-kernel.md)] [!INCLUDE [clone-sample-repo](includes/clone-sample-repo.md)] -:::zone target="docs" pivot="azure-openai" +## Create the app -## Create the Azure OpenAI service +Complete the following steps to create a .NET console app to connect to an AI model. -# [Azure Developer CLI](#tab/azd) +1. In an empty directory on your computer, use the `dotnet new` command to create a new console app: -[!INCLUDE [deploy-azd](includes/deploy-azd.md)] + ```dotnetcli + dotnet new console -o FunctionCallingAI + ``` -# [Azure CLI](#tab/azure-cli) +1. Change directory into the app folder: -1. To provision an Azure OpenAI service and model using the Azure CLI, complete the steps in the [Create and deploy an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource?pivots=cli) article. + ```dotnetcli + cd FunctionCallingAI + ``` -1. From a terminal or command prompt, navigate to the `src\quickstarts\azure-openai\semantic-kernel\04-HikerAIPro` directory. +1. Install the required packages: -1. Run the following commands to configure your OpenAI API key as a secret for the sample app: + :::zone target="docs" pivot="azure-openai" ```bash - dotnet user-secrets init - dotnet user-secrets set OpenAIKey - -# [Azure Portal](#tab/azure-portal) - -1. To provision an Azure OpenAI service and model using the Azure portal, complete the steps in the [Create and deploy an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal) article. + dotnet add package Azure.Identity + dotnet add package Azure.AI.OpenAI + dotnet add package Microsoft.Extensions.AI + dotnet add package Microsoft.Extensions.AI.OpenAI + dotnet add package Microsoft.Extensions.Configuration + dotnet add package Microsoft.Extensions.Configuration.UserSecrets + ``` -1. From a terminal or command prompt, navigate to the `src\quickstarts\azure-openai\semantic-kernel\04-HikerAIPro` directory. + :::zone-end -1. Run the following commands to configure your OpenAI API key as a secret for the sample app: + :::zone target="docs" pivot="openai" ```bash - dotnet user-secrets init - dotnet user-secrets set OpenAIKey - ---- - -:::zone-end - -## Try the the hiker pro sample + dotnet add package Microsoft.Extensions.AI + dotnet add package Microsoft.Extensions.AI.OpenAI + dotnet add package Microsoft.Extensions.Configuration + dotnet add package Microsoft.Extensions.Configuration.UserSecrets + ``` - -:::zone target="docs" pivot="openai" + :::zone-end -1. From a terminal or command prompt, navigate to the `src\quickstarts\openai\semantic-kernel\04-HikerAIPro` directory. - -1. Run the following commands to configure your OpenAI API key as a secret for the sample app: +1. Open the app in Visual Studio code or your editor of choice ```bash - dotnet user-secrets init - dotnet user-secrets set OpenAIKey + code . ``` -1. Use the `dotnet run` command to run the app: - - ```dotnetcli - dotnet run - ``` - -:::zone-end - :::zone target="docs" pivot="azure-openai" -1. From a terminal or command prompt, navigate to the `semantic-kernel\04-HikerAIPro` directory. - -2. Use the `dotnet run` command to run the app: - - ```dotnetcli - dotnet run - ``` - - > [!TIP] - > If you get an error message, the Azure OpenAI resources might not have finished deploying. Wait a couple of minutes and try again. +[!INCLUDE [create-ai-service](includes/create-ai-service.md)] :::zone-end - -## Understand the code - - :::zone target="docs" pivot="openai" -The application uses the [`Microsoft.SemanticKernel`](https://www.nuget.org/packages/Microsoft.SemanticKernel) package to send and receive requests to the OpenAI service. - -The entire application is contained within the **Program.cs** file. The first several lines of code set configuration values and get the OpenAI Key that was previously set using the `dotnet user-secrets` command. - -```csharp -var config = new ConfigurationBuilder().AddUserSecrets().Build(); -string model = "gpt-3.5-turbo"; -string key = config["OpenAIKey"]; -``` +## Configure the app -The `Kernel` class facilitates the requests and responses with the help of `AddOpenAIChatCompletion` service. +1. Navigate to the root of your .NET projet from a terminal or command prompt. -```csharp -// Create a Kernel containing the OpenAI Chat Completion Service -IKernelBuilder b = Kernel.CreateBuilder(); +1. Run the following commands to configure your OpenAI API key as a secret for the sample app: -Kernel kernel = b - .AddOpenAIChatCompletion(model, key) - .Build(); -``` + ```bash + dotnet user-secrets init + dotnet user-secrets set OpenAIKey + dotnet user-secrets set ModelName + ``` :::zone-end -:::zone target="docs" pivot="azure-openai" - - -The application uses the [`Microsoft.SemanticKernel`](https://www.nuget.org/packages/Microsoft.SemanticKernel) package to send and receive requests to the OpenAI service. +## Add the app code -The entire application is contained within the **Program.cs** file. The first several lines of code loads up secrets and configuration values that were set in the `dotnet user-secrets` for you during the application provisioning. +The app uses the [`Microsoft.Extensions.AI`](https://www.nuget.org/packages/Microsoft.Extensions.AI/) package to send and receive requests to the AI model. -```csharp -var config = new ConfigurationBuilder().AddUserSecrets().Build(); -string endpoint = config["AZURE_OPENAI_ENDPOINT"]; -string deployment = config["AZURE_OPENAI_GPT_NAME"]; -``` - -The `Kernel` class facilitates the requests and responses with the help of `AzureOpenAIChatCompletion` service. +1. In the **Program.cs** file, add the following code to connect and authenticate to the AI model. The `ChatClient` is also configured to use function invocation, which allows .NET functions in your code to be called by the AI model. -```csharp -// Create a Kernel containing the Azure OpenAI Chat Completion Service -IKernelBuilder b = Kernel.CreateBuilder(); + :::zone target="docs" pivot="azure-openai" -Kernel kernel = b - .AddAzureOpenAIChatCompletion(deployment, endpoint, new DefaultAzureCredential()) - .Build(); -``` + :::code language="csharp" source="snippets/function-calling/azure-openai/program.cs" range="1-16"::: -:::zone-end + > [!NOTE] + > searches for authentication credentials from your local tooling. If you aren't using the `azd` template to provision the Azure OpenAI resource, you'll need to assign the `Azure AI Developer` role to the account you used to sign in to Visual Studio or the Azure CLI. For more information, see [Authenticate to Azure AI services with .NET](../azure-ai-services-authentication.md). -The functions `ImportPluginFromFunctions` and `CreateFromMethod` define the local function that will be called by the model. - -```csharp -// Add a new plugin with a local .NET function that should be available to the AI model -// For convenience and clarity of into the code, this standalone local method handles tool call responses. It will fake a call to a weather API and return the current weather for the specified location. -kernel.ImportPluginFromFunctions("WeatherPlugin", -[ - KernelFunctionFactory.CreateFromMethod( - ([Description("The city, e.g. Montreal, Sidney")] string location, string unit = null) => - { - // Here you would call a weather API to get the weather for the location - return "Periods of rain or drizzle, 15 C"; - }, "get_current_weather", "Get the current weather in a given location") -]); -``` + :::zone-end -Once the `kernel` client is created, the code uses a system prompt to provide context and influence the completion tone and content. Note how the weather is emphasized in the system prompt. + :::zone target="docs" pivot="openai" -```csharp -ChatHistory chatHistory = new(""" - You are a hiking enthusiast who helps people discover fun hikes in their area. - You are upbeat and friendly. Good weather is important for a good hike. - Only make recommendations if the weather is good or if people insist. - You introduce yourself when first saying hello. When helping people out, - you always ask them for this information to inform the hiking recommendation you provide: + :::code language="csharp" source="snippets/function-calling/openai/program.cs" range="1-14"::: - 1. Where they are located - 2. What hiking intensity they are looking for + :::zone-end - You will then provide three suggestions for nearby hikes that vary in length - after you get that information. You will also share an interesting fact about the local - nature on the hikes when making a recommendation. - """); -``` +1. Create a new `ChatOptions` object that contains an inline function the AI model can call to get the current weather. The function declaration includes a delegate to run logic and name and description parameters to describe the purpose of the function to the AI model. -The app also adds a user message to the model using the `AddUserMessage` function. The `GetChatMessageContentAsync` function sends the chat history to the model to generate a response based off the system and user prompts. + :::code language="csharp" source="snippets/function-calling/openai/program.cs" range="16-26"::: -```csharp -chatHistory.AddUserMessage(""" - Is the weather is good today for a hike? - If yes, I live in the greater Montreal area and would like an easy hike. - I don't mind driving a bit to get there. I don't want the hike to be over 10 miles round trip. - I'd consider a point-to-point hike. - I want the hike to be as isolated as possible. I don't want to see many people. - I would like it to be as bug free as possible. - """); +1. Add a system prompt to the `chatHistory` to provide context and instructions to the model. Send a user prompt with a question that requires the AI model to call the registered function to properly answer the question. -Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last().Content}"); + :::code language="csharp" source="snippets/function-calling/openai/program.cs" range="28-40"::: -chatHistory.Add(await service.GetChatMessageContentAsync( - chatHistory, - new OpenAIPromptExecutionSettings() - { - MaxTokens = 400 - })); +1. Use the `dotnet run` command to run the app: -Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last().Content}"); -``` + ```dotnetcli + dotnet run + ``` -Customize the system prompt and user message to see how the model responds to help you find a hike that you'll like. + The app prints a the completion response from the AI model that includes data provided by the .NET function. The AI model understood the registered function was available and called it automatically to generate a proper response. :::zone target="docs" pivot="azure-openai" @@ -235,11 +150,9 @@ When you no longer need the sample application or resources, remove the correspo azd down ``` -[!INCLUDE [troubleshoot](includes/troubleshoot.md)] - :::zone-end ## Next steps -- [Quickstart - Get insight about your data from a .NET AI chat app](quickstart-ai-chat-with-data.md) +- [Quickstart - Build an AI chat app with .NET](get-started-openai.md) - [Generate text and conversations with .NET and Azure OpenAI Completions](/training/modules/open-ai-dotnet-text-completions/) diff --git a/docs/ai/quickstarts/quickstart-openai-summarize-text.md b/docs/ai/quickstarts/quickstart-openai-summarize-text.md index 8ce9714500d2e..4c6ba4b4f1991 100644 --- a/docs/ai/quickstarts/quickstart-openai-summarize-text.md +++ b/docs/ai/quickstarts/quickstart-openai-summarize-text.md @@ -19,13 +19,13 @@ In this quickstart, you learn how to create a .NET console chat app to connect t :::zone target="docs" pivot="openai" -[!INCLUDE [azure-openai-prereqs](includes/prerequisites-azure-openai.md)] +[!INCLUDE [openai-prereqs](includes/prerequisites-openai.md)] :::zone-end :::zone target="docs" pivot="azure-openai" -[!INCLUDE [openai-prereqs](includes/prerequisites-openai.md)] +[!INCLUDE [azure-openai-prereqs](includes/prerequisites-azure-openai.md)] :::zone-end diff --git a/docs/ai/quickstarts/snippets/build-chat-app/azure-openai/ChatAppAI.csproj b/docs/ai/quickstarts/snippets/build-chat-app/azure-openai/ChatAppAI.csproj new file mode 100644 index 0000000000000..f269d006a3a95 --- /dev/null +++ b/docs/ai/quickstarts/snippets/build-chat-app/azure-openai/ChatAppAI.csproj @@ -0,0 +1,20 @@ + + + + Exe + net9.0 + enable + enable + 4d162886-0da5-4b62-a4db-d09780d06911 + + + + + + + + + + + + diff --git a/docs/ai/quickstarts/snippets/build-chat-app/azure-openai/Program.cs b/docs/ai/quickstarts/snippets/build-chat-app/azure-openai/Program.cs new file mode 100644 index 0000000000000..c6031d83718f5 --- /dev/null +++ b/docs/ai/quickstarts/snippets/build-chat-app/azure-openai/Program.cs @@ -0,0 +1,51 @@ +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.AI; +using Azure.AI.OpenAI; +using Azure.Identity; + +var config = new ConfigurationBuilder().AddUserSecrets().Build(); +string endpoint = config["AZURE_OPENAI_ENDPOINT"]; +string deployment = config["AZURE_OPENAI_GPT_NAME"]; + +IChatClient chatClient = + new AzureOpenAIClient(new Uri(endpoint), new DefaultAzureCredential()) + .AsChatClient(deployment); + +// Start the conversation with context for the AI model +List chatHistory = new() + { + new ChatMessage(ChatRole.System, """ + You are a friendly hiking enthusiast who helps people discover fun hikes in their area. + You introduce yourself when first saying hello. + When helping people out, you always ask them for this information + to inform the hiking recommendation you provide: + + 1. The location where they would like to hike + 2. What hiking intensity they are looking for + + You will then provide three suggestions for nearby hikes that vary in length + after you get that information. You will also share an interesting fact about + the local nature on the hikes when making a recommendation. At the end of your + response, ask if there is anything else you can help with. + """) + }; + +while (true) +{ + // Get user prompt and add to chat history + Console.WriteLine("Your prompt:"); + var userPrompt = Console.ReadLine(); + chatHistory.Add(new ChatMessage(ChatRole.User, userPrompt)); + + // Stream the AI response and add to chat history + Console.WriteLine("AI Response:"); + var response = ""; + await foreach (var item in + chatClient.CompleteStreamingAsync(chatHistory)) + { + Console.Write(item.Text); + response += item.Text; + } + chatHistory.Add(new ChatMessage(ChatRole.Assistant, response)); + Console.WriteLine(); +} diff --git a/docs/ai/quickstarts/snippets/build-chat-app/openai/ExtensionsOpenAI.csproj b/docs/ai/quickstarts/snippets/build-chat-app/openai/ExtensionsOpenAI.csproj new file mode 100644 index 0000000000000..870fe0459d937 --- /dev/null +++ b/docs/ai/quickstarts/snippets/build-chat-app/openai/ExtensionsOpenAI.csproj @@ -0,0 +1,16 @@ + + + + Exe + net9.0 + enable + enable + + + + + + + + + diff --git a/docs/ai/quickstarts/snippets/build-chat-app/openai/Program.cs b/docs/ai/quickstarts/snippets/build-chat-app/openai/Program.cs new file mode 100644 index 0000000000000..12e694e1ab8c8 --- /dev/null +++ b/docs/ai/quickstarts/snippets/build-chat-app/openai/Program.cs @@ -0,0 +1,50 @@ +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.AI; +using OpenAI; + +var config = new ConfigurationBuilder().AddUserSecrets().Build(); +string model = config["ModelName"]; +string key = config["OpenAIKey"]; + +// Create the IChatClient +IChatClient chatClient = + new OpenAIClient(key).AsChatClient(model); + +// Start the conversation with context for the AI model +List chatHistory = new() + { + new ChatMessage(ChatRole.System, """ + You are a friendly hiking enthusiast who helps people discover fun hikes in their area. + You introduce yourself when first saying hello. + When helping people out, you always ask them for this information + to inform the hiking recommendation you provide: + + 1. The location where they would like to hike + 2. What hiking intensity they are looking for + + You will then provide three suggestions for nearby hikes that vary in length + after you get that information. You will also share an interesting fact about + the local nature on the hikes when making a recommendation. At the end of your + response, ask if there is anything else you can help with. + """) + }; + +while (true) +{ + // Get user prompt and add to chat history + Console.WriteLine("Your prompt:"); + var userPrompt = Console.ReadLine(); + chatHistory.Add(new ChatMessage(ChatRole.User, userPrompt)); + + // Stream the AI response and add to chat history + Console.WriteLine("AI Response:"); + var response = ""; + await foreach (var item in + chatClient.CompleteStreamingAsync(chatHistory)) + { + Console.Write(item.Text); + response += item.Text; + } + chatHistory.Add(new ChatMessage(ChatRole.Assistant, response)); + Console.WriteLine(); +} diff --git a/docs/ai/quickstarts/snippets/function-calling/azure-openai/FunctionCallingAI.csproj b/docs/ai/quickstarts/snippets/function-calling/azure-openai/FunctionCallingAI.csproj new file mode 100644 index 0000000000000..d4ba16e09b3dd --- /dev/null +++ b/docs/ai/quickstarts/snippets/function-calling/azure-openai/FunctionCallingAI.csproj @@ -0,0 +1,21 @@ + + + + Exe + net9.0 + enable + enable + 4d162886-0da5-4b62-a4db-d09780d06911 + + + + + + + + + + + + + diff --git a/docs/ai/quickstarts/snippets/function-calling/azure-openai/Program.cs b/docs/ai/quickstarts/snippets/function-calling/azure-openai/Program.cs new file mode 100644 index 0000000000000..5d9dee4294635 --- /dev/null +++ b/docs/ai/quickstarts/snippets/function-calling/azure-openai/Program.cs @@ -0,0 +1,42 @@ +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.AI; +using Azure.AI.OpenAI; +using Azure.Identity; + +var config = new ConfigurationBuilder().AddUserSecrets().Build(); +string endpoint = config["AZURE_OPENAI_ENDPOINT"]; +string deployment = config["AZURE_OPENAI_GPT_NAME"]; + +IChatClient client = + new ChatClientBuilder() + .UseFunctionInvocation() + .Use( + new AzureOpenAIClient(new Uri(endpoint), + new DefaultAzureCredential()) + .AsChatClient(deployment)); + +// Add a new plugin with a local .NET function that should be available to the AI model +var chatOptions = new ChatOptions +{ + Tools = [AIFunctionFactory.Create((string location, string unit) => + { + // Here you would call a weather API to get the weather for the location + return "Periods of rain or drizzle, 15 C"; + }, + "get_current_weather", + "Get the current weather in a given location")] +}; + +// System prompt to provide context +List chatHistory = [new(ChatRole.System, """ + You are a hiking enthusiast who helps people discover fun hikes in their area. You are upbeat and friendly. + """)]; + +// Weather conversation relevant to the registered function +chatHistory.Add(new ChatMessage(ChatRole.User, + "I live in Montreal and I'm looking for a moderate intensity hike. What's the current weather like? ")); +Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last()}"); + +var response = await client.CompleteAsync(chatHistory, chatOptions); +chatHistory.Add(new ChatMessage(ChatRole.Assistant, response.Message.Contents)); +Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last()}"); diff --git a/docs/ai/quickstarts/snippets/function-calling/openai/FunctionCallingAI.csproj b/docs/ai/quickstarts/snippets/function-calling/openai/FunctionCallingAI.csproj new file mode 100644 index 0000000000000..8941b559a1c54 --- /dev/null +++ b/docs/ai/quickstarts/snippets/function-calling/openai/FunctionCallingAI.csproj @@ -0,0 +1,17 @@ + + + + Exe + net9.0 + enable + enable + + + + + + + + + + diff --git a/docs/ai/quickstarts/snippets/function-calling/openai/Program.cs b/docs/ai/quickstarts/snippets/function-calling/openai/Program.cs new file mode 100644 index 0000000000000..c57da3c4c3275 --- /dev/null +++ b/docs/ai/quickstarts/snippets/function-calling/openai/Program.cs @@ -0,0 +1,40 @@ +using Microsoft.Extensions.AI; +using Microsoft.Extensions.Configuration; +using OpenAI; + +var config = new ConfigurationBuilder().AddUserSecrets().Build(); +string model = config["ModelName"]; +string key = config["OpenAIKey"]; + +IChatClient client = + new ChatClientBuilder() + .UseFunctionInvocation() + .Use( + new OpenAIClient(key) + .AsChatClient(model)); + +// Add a new plugin with a local .NET function that should be available to the AI model +var chatOptions = new ChatOptions +{ + Tools = [AIFunctionFactory.Create((string location, string unit) => + { + // Here you would call a weather API to get the weather for the location + return "Periods of rain or drizzle, 15 C"; + }, + "get_current_weather", + "Get the current weather in a given location")] +}; + +// System prompt to provide context +List chatHistory = [new(ChatRole.System, """ + You are a hiking enthusiast who helps people discover fun hikes in their area. You are upbeat and friendly. + """)]; + +// Weather conversation relevant to the registered function +chatHistory.Add(new ChatMessage(ChatRole.User, + "I live in Montreal and I'm looking for a moderate intensity hike. What's the current weather like? ")); +Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last()}"); + +var response = await client.CompleteAsync(chatHistory, chatOptions); +chatHistory.Add(new ChatMessage(ChatRole.Assistant, response.Message.Contents)); +Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last()}"); diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md index acfda7a4de0d0..6ae946b8714d8 100644 --- a/docs/azure/includes/dotnet-all.md +++ b/docs/azure/includes/dotnet-all.md @@ -68,6 +68,7 @@ | Maps Search | NuGet [2.0.0-beta.4](https://www.nuget.org/packages/Azure.Maps.Search/2.0.0-beta.4) | [docs](/dotnet/api/overview/azure/Maps.Search-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [2.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.Search_2.0.0-beta.4/sdk/maps/Azure.Maps.Search/) | | Media Analytics Edge | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Media.Analytics.Edge/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Media.Analytics.Edge-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Media.Analytics.Edge_1.0.0-beta.1/sdk/mediaservices/Azure.Media.Analytics.Edge) | | Metrics Advisor | NuGet [1.1.0](https://www.nuget.org/packages/Azure.AI.MetricsAdvisor/1.1.0) | [docs](/dotnet/api/overview/azure/AI.MetricsAdvisor-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.MetricsAdvisor_1.1.0/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/) | +| Microsoft Playwright Testing | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/Developer.MicrosoftPlaywrightTesting.TestLogger-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger_1.0.0-beta.3/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/) | | Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents | NuGet [1.0.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/1.0.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents_1.0.1/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/) | | Microsoft.Azure.WebPubSub.AspNetCore | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.WebPubSub.AspNetCore/1.4.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebPubSub.AspNetCore-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebPubSub.AspNetCore_1.4.0/sdk/webpubsub/Microsoft.Azure.WebPubSub.AspNetCore/) | | Microsoft.Azure.WebPubSub.Common | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.WebPubSub.Common/1.4.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebPubSub.Common-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebPubSub.Common_1.4.0/sdk/webpubsub/Microsoft.Azure.WebPubSub.Common/) | @@ -75,6 +76,7 @@ | Models Repository | NuGet [1.0.0-preview.6](https://www.nuget.org/packages/Azure.IoT.ModelsRepository/1.0.0-preview.6) | [docs](/dotnet/api/overview/azure/IoT.ModelsRepository-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-preview.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.IoT.ModelsRepository_1.0.0-preview.6/sdk/modelsrepository/Azure.IoT.ModelsRepository/) | | Monitor Ingestion | NuGet [1.1.2](https://www.nuget.org/packages/Azure.Monitor.Ingestion/1.1.2) | [docs](/dotnet/api/overview/azure/Monitor.Ingestion-readme) | GitHub [1.1.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Ingestion_1.1.2/sdk/monitor/Azure.Monitor.Ingestion/) | | Monitor Query | NuGet [1.5.0](https://www.nuget.org/packages/Azure.Monitor.Query/1.5.0) | [docs](/dotnet/api/overview/azure/Monitor.Query-readme) | GitHub [1.5.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Query_1.5.0/sdk/monitor/Azure.Monitor.Query/) | +| NUnit ? Microsoft Playwright Testing | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/Developer.MicrosoftPlaywrightTesting.NUnit-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.MicrosoftPlaywrightTesting.NUnit_1.0.0-beta.3/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/) | | OpenAI Assistants | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.AI.OpenAI.Assistants/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/AI.OpenAI.Assistants-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI.Assistants_1.0.0-beta.4/sdk/openai/Azure.AI.OpenAI.Assistants/) | | OpenAI Inference | NuGet [2.0.0](https://www.nuget.org/packages/Azure.AI.OpenAI/2.0.0)
NuGet [2.1.0-beta.2](https://www.nuget.org/packages/Azure.AI.OpenAI/2.1.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.OpenAI-readme) | GitHub [2.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI_2.0.0/sdk/openai/Azure.AI.OpenAI/)
GitHub [2.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI_2.1.0-beta.2/sdk/openai/Azure.AI.OpenAI/) | | OpenTelemetry AspNetCore | NuGet [1.2.0](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.AspNetCore/1.2.0)
NuGet [1.3.0-beta.2](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.AspNetCore/1.3.0-beta.2) | [docs](/dotnet/api/overview/azure/Monitor.OpenTelemetry.AspNetCore-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.AspNetCore_1.2.0/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/)
GitHub [1.3.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.AspNetCore_1.3.0-beta.2/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/) | @@ -244,7 +246,7 @@ | Resource Management - HDInsight | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight/1.1.0)
NuGet [1.2.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight/1.2.0-beta.3) | [docs](/dotnet/api/overview/azure/ResourceManager.HDInsight-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight_1.1.0/sdk/hdinsight/Azure.ResourceManager.HDInsight/)
GitHub [1.2.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight_1.2.0-beta.3/sdk/hdinsight/Azure.ResourceManager.HDInsight/) | | Resource Management - HDInsight Containers | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight.Containers/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/ResourceManager.HDInsight.Containers-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight.Containers_1.0.0-beta.4/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/) | | Resource Management - Health Bot | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.HealthBot/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthBot-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthBot_1.1.0/sdk/healthbot/Azure.ResourceManager.HealthBot/) | -| Resource Management - Health Data AI Services | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.HealthDataAIServices/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthDataAIServices-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthDataAIServices_1.0.0-beta.1/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/) | +| Resource Management - Health Data AI Services | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.HealthDataAIServices/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthDataAIServices-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthDataAIServices_1.0.0/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/) | | Resource Management - Healthcare APIs | NuGet [1.3.0](https://www.nuget.org/packages/Azure.ResourceManager.HealthcareApis/1.3.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthcareApis-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthcareApis_1.3.0/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/) | | Resource Management - Hybrid Compute | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.HybridCompute/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HybridCompute-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridCompute_1.0.0/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/) | | Resource Management - Hybrid Connectivity | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.ResourceManager.HybridConnectivity/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/ResourceManager.HybridConnectivity-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridConnectivity_1.0.0-beta.4/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/) | @@ -327,7 +329,7 @@ | Resource Management - Self Help | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.SelfHelp/1.0.0)
NuGet [1.1.0-beta.4](https://www.nuget.org/packages/Azure.ResourceManager.SelfHelp/1.1.0-beta.4) | [docs](/dotnet/api/overview/azure/ResourceManager.SelfHelp-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SelfHelp_1.0.0/sdk/selfhelp/Azure.ResourceManager.SelfHelp/)
GitHub [1.1.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SelfHelp_1.1.0-beta.4/sdk/selfhelp/Azure.ResourceManager.SelfHelp/) | | Resource Management - Service Bus | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceBus/1.0.1)
NuGet [1.1.0-beta.7](https://www.nuget.org/packages/Azure.ResourceManager.ServiceBus/1.1.0-beta.7) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceBus-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceBus_1.0.1/sdk/servicebus/Azure.ResourceManager.ServiceBus/)
GitHub [1.1.0-beta.7](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceBus_1.1.0-beta.7/sdk/servicebus/Azure.ResourceManager.ServiceBus/) | | Resource Management - Service Fabric | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabric/1.1.0)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabric/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceFabric-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabric_1.1.0/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabric_1.2.0-beta.1/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/) | -| Resource Management - Service Fabric Managed Clusters | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabricManagedClusters/1.2.0)
NuGet [1.3.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabricManagedClusters/1.3.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceFabricManagedClusters-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabricManagedClusters_1.2.0/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/)
GitHub [1.3.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabricManagedClusters_1.3.0-beta.1/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/) | +| Resource Management - Service Fabric Managed Clusters | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabricManagedClusters/1.2.0)
NuGet [1.3.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabricManagedClusters/1.3.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceFabricManagedClusters-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabricManagedClusters_1.2.0/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/)
GitHub [1.3.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabricManagedClusters_1.3.0-beta.2/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/) | | Resource Management - Service Linker | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ServiceLinker/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceLinker-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceLinker_1.1.0/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/) | | Resource Management - Service Networking | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceNetworking/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceNetworking-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceNetworking_1.0.1/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/) | | Resource Management - SignalR | NuGet [1.1.3](https://www.nuget.org/packages/Azure.ResourceManager.SignalR/1.1.3) | [docs](/dotnet/api/overview/azure/ResourceManager.SignalR-readme) | GitHub [1.1.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SignalR_1.1.3/sdk/signalr/Azure.ResourceManager.SignalR/) | @@ -366,8 +368,6 @@ | System Net Client Model | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/System.Net.ClientModel/1.0.0-beta.1) | | | | Unknown Display Name | NuGet [1.0.1-beta.3](https://www.nuget.org/packages/Azure.AI.ContentSafety.Extension.Embedded.Image/1.0.1-beta.3) | | | | Unknown Display Name | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.ContentSafety.Extension.Embedded.Text/1.0.0)
NuGet [1.0.1-beta.3](https://www.nuget.org/packages/Azure.AI.ContentSafety.Extension.Embedded.Text/1.0.1-beta.3) | | | -| Unknown Display Name | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/1.0.0-beta.3) | | | -| Unknown Display Name | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/1.0.0-beta.3) | | | | Unknown Display Name | NuGet [1.0.4-preview](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.MySql/1.0.4-preview) | | | | Unknown Display Name | NuGet [1.0.4-preview](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.MySql/1.0.4-preview) | | | | Unknown Display Name | NuGet [1.41.1](https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech.CLI/1.41.1) | | | @@ -428,7 +428,7 @@ | LUIS Runtime | NuGet [3.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime/3.1.0-preview.1) | | GitHub [3.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime_3.1.0-preview.1/sdk/cognitiveservices/Language.LUIS.Runtime) | | Media Live Video Analytics Edge | NuGet [1.0.4-preview.1](https://www.nuget.org/packages/Microsoft.Azure.Media.LiveVideoAnalytics.Edge/1.0.4-preview.1) | | GitHub [1.0.4-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Media.LiveVideoAnalytics.Edge_1.0.4-preview.1/sdk/mediaservices/Microsoft.Azure.Media.LiveVideoAnalytics.Edge) | | Microsoft.Azure.Amqp | NuGet [2.6.9](https://www.nuget.org/packages/Microsoft.Azure.Amqp/2.6.9) | | | -| Microsoft.Azure.Devices | NuGet [1.39.1](https://www.nuget.org/packages/Microsoft.Azure.Devices/1.39.1)
NuGet [2.0.0-preview007](https://www.nuget.org/packages/Microsoft.Azure.Devices/2.0.0-preview007) | | | +| Microsoft.Azure.Devices | NuGet [1.40.0](https://www.nuget.org/packages/Microsoft.Azure.Devices/1.40.0)
NuGet [2.0.0-preview007](https://www.nuget.org/packages/Microsoft.Azure.Devices/2.0.0-preview007) | | | | Microsoft.Azure.Devices.Authentication | NuGet [2.0.0-preview001](https://www.nuget.org/packages/Microsoft.Azure.Devices.Authentication/2.0.0-preview001) | | | | Microsoft.Azure.Devices.Client.PCL | NuGet [1.0.16](https://www.nuget.org/packages/Microsoft.Azure.Devices.Client.PCL/1.0.16) | | | | Microsoft.Azure.Devices.ProtocolGateway.Core | NuGet [2.0.1](https://www.nuget.org/packages/Microsoft.Azure.Devices.ProtocolGateway.Core/2.0.1) | | | diff --git a/docs/azure/includes/dotnet-new.md b/docs/azure/includes/dotnet-new.md index 792ed654f8e55..504ef1f67ccaa 100644 --- a/docs/azure/includes/dotnet-new.md +++ b/docs/azure/includes/dotnet-new.md @@ -69,6 +69,7 @@ | Maps Search | NuGet [2.0.0-beta.4](https://www.nuget.org/packages/Azure.Maps.Search/2.0.0-beta.4) | [docs](/dotnet/api/overview/azure/Maps.Search-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [2.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.Search_2.0.0-beta.4/sdk/maps/Azure.Maps.Search/) | | Media Analytics Edge | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Media.Analytics.Edge/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Media.Analytics.Edge-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Media.Analytics.Edge_1.0.0-beta.1/sdk/mediaservices/Azure.Media.Analytics.Edge) | | Metrics Advisor | NuGet [1.1.0](https://www.nuget.org/packages/Azure.AI.MetricsAdvisor/1.1.0) | [docs](/dotnet/api/overview/azure/AI.MetricsAdvisor-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.MetricsAdvisor_1.1.0/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/) | +| Microsoft Playwright Testing | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/Developer.MicrosoftPlaywrightTesting.TestLogger-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger_1.0.0-beta.3/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.TestLogger/) | | Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents | NuGet [1.0.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/1.0.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents_1.0.1/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/) | | Microsoft.Azure.WebPubSub.AspNetCore | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.WebPubSub.AspNetCore/1.4.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebPubSub.AspNetCore-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebPubSub.AspNetCore_1.4.0/sdk/webpubsub/Microsoft.Azure.WebPubSub.AspNetCore/) | | Microsoft.Azure.WebPubSub.Common | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.WebPubSub.Common/1.4.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebPubSub.Common-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebPubSub.Common_1.4.0/sdk/webpubsub/Microsoft.Azure.WebPubSub.Common/) | @@ -76,6 +77,7 @@ | Models Repository | NuGet [1.0.0-preview.6](https://www.nuget.org/packages/Azure.IoT.ModelsRepository/1.0.0-preview.6) | [docs](/dotnet/api/overview/azure/IoT.ModelsRepository-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-preview.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.IoT.ModelsRepository_1.0.0-preview.6/sdk/modelsrepository/Azure.IoT.ModelsRepository/) | | Monitor Ingestion | NuGet [1.1.2](https://www.nuget.org/packages/Azure.Monitor.Ingestion/1.1.2) | [docs](/dotnet/api/overview/azure/Monitor.Ingestion-readme) | GitHub [1.1.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Ingestion_1.1.2/sdk/monitor/Azure.Monitor.Ingestion/) | | Monitor Query | NuGet [1.5.0](https://www.nuget.org/packages/Azure.Monitor.Query/1.5.0) | [docs](/dotnet/api/overview/azure/Monitor.Query-readme) | GitHub [1.5.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Query_1.5.0/sdk/monitor/Azure.Monitor.Query/) | +| NUnit ? Microsoft Playwright Testing | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/Developer.MicrosoftPlaywrightTesting.NUnit-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.MicrosoftPlaywrightTesting.NUnit_1.0.0-beta.3/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/) | | OpenAI Assistants | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.AI.OpenAI.Assistants/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/AI.OpenAI.Assistants-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI.Assistants_1.0.0-beta.4/sdk/openai/Azure.AI.OpenAI.Assistants/) | | OpenAI Inference | NuGet [2.0.0](https://www.nuget.org/packages/Azure.AI.OpenAI/2.0.0)
NuGet [2.1.0-beta.2](https://www.nuget.org/packages/Azure.AI.OpenAI/2.1.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.OpenAI-readme) | GitHub [2.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI_2.0.0/sdk/openai/Azure.AI.OpenAI/)
GitHub [2.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI_2.1.0-beta.2/sdk/openai/Azure.AI.OpenAI/) | | OpenTelemetry AspNetCore | NuGet [1.2.0](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.AspNetCore/1.2.0)
NuGet [1.3.0-beta.2](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.AspNetCore/1.3.0-beta.2) | [docs](/dotnet/api/overview/azure/Monitor.OpenTelemetry.AspNetCore-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.AspNetCore_1.2.0/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/)
GitHub [1.3.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.AspNetCore_1.3.0-beta.2/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/) | @@ -250,7 +252,7 @@ | Resource Management - HDInsight | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight/1.1.0)
NuGet [1.2.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight/1.2.0-beta.3) | [docs](/dotnet/api/overview/azure/ResourceManager.HDInsight-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight_1.1.0/sdk/hdinsight/Azure.ResourceManager.HDInsight/)
GitHub [1.2.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight_1.2.0-beta.3/sdk/hdinsight/Azure.ResourceManager.HDInsight/) | | Resource Management - HDInsight Containers | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight.Containers/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/ResourceManager.HDInsight.Containers-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight.Containers_1.0.0-beta.4/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/) | | Resource Management - Health Bot | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.HealthBot/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthBot-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthBot_1.1.0/sdk/healthbot/Azure.ResourceManager.HealthBot/) | -| Resource Management - Health Data AI Services | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.HealthDataAIServices/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthDataAIServices-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthDataAIServices_1.0.0-beta.1/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/) | +| Resource Management - Health Data AI Services | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.HealthDataAIServices/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthDataAIServices-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthDataAIServices_1.0.0/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/) | | Resource Management - Healthcare APIs | NuGet [1.3.0](https://www.nuget.org/packages/Azure.ResourceManager.HealthcareApis/1.3.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthcareApis-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthcareApis_1.3.0/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/) | | Resource Management - Hybrid Compute | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.HybridCompute/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HybridCompute-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridCompute_1.0.0/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/) | | Resource Management - Hybrid Connectivity | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.ResourceManager.HybridConnectivity/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/ResourceManager.HybridConnectivity-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridConnectivity_1.0.0-beta.4/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/) | @@ -334,7 +336,7 @@ | Resource Management - Self Help | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.SelfHelp/1.0.0)
NuGet [1.1.0-beta.4](https://www.nuget.org/packages/Azure.ResourceManager.SelfHelp/1.1.0-beta.4) | [docs](/dotnet/api/overview/azure/ResourceManager.SelfHelp-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SelfHelp_1.0.0/sdk/selfhelp/Azure.ResourceManager.SelfHelp/)
GitHub [1.1.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SelfHelp_1.1.0-beta.4/sdk/selfhelp/Azure.ResourceManager.SelfHelp/) | | Resource Management - Service Bus | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceBus/1.0.1)
NuGet [1.1.0-beta.7](https://www.nuget.org/packages/Azure.ResourceManager.ServiceBus/1.1.0-beta.7) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceBus-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceBus_1.0.1/sdk/servicebus/Azure.ResourceManager.ServiceBus/)
GitHub [1.1.0-beta.7](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceBus_1.1.0-beta.7/sdk/servicebus/Azure.ResourceManager.ServiceBus/) | | Resource Management - Service Fabric | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabric/1.1.0)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabric/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceFabric-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabric_1.1.0/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabric_1.2.0-beta.1/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/) | -| Resource Management - Service Fabric Managed Clusters | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabricManagedClusters/1.2.0)
NuGet [1.3.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabricManagedClusters/1.3.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceFabricManagedClusters-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabricManagedClusters_1.2.0/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/)
GitHub [1.3.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabricManagedClusters_1.3.0-beta.1/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/) | +| Resource Management - Service Fabric Managed Clusters | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabricManagedClusters/1.2.0)
NuGet [1.3.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabricManagedClusters/1.3.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceFabricManagedClusters-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabricManagedClusters_1.2.0/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/)
GitHub [1.3.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabricManagedClusters_1.3.0-beta.2/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/) | | Resource Management - Service Linker | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ServiceLinker/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceLinker-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceLinker_1.1.0/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/) | | Resource Management - Service Networking | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceNetworking/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceNetworking-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceNetworking_1.0.1/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/) | | Resource Management - SignalR | NuGet [1.1.3](https://www.nuget.org/packages/Azure.ResourceManager.SignalR/1.1.3) | [docs](/dotnet/api/overview/azure/ResourceManager.SignalR-readme) | GitHub [1.1.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SignalR_1.1.3/sdk/signalr/Azure.ResourceManager.SignalR/) | diff --git a/docs/azure/sdk/media/assign-local-dev-group-to-role-azure-portal-6-240px.png b/docs/azure/sdk/media/assign-local-dev-group-to-role-azure-portal-6-240px.png index be16e82654f3e..b76ae12713896 100644 Binary files a/docs/azure/sdk/media/assign-local-dev-group-to-role-azure-portal-6-240px.png and b/docs/azure/sdk/media/assign-local-dev-group-to-role-azure-portal-6-240px.png differ diff --git a/docs/azure/sdk/media/assign-local-dev-group-to-role-azure-portal-6.png b/docs/azure/sdk/media/assign-local-dev-group-to-role-azure-portal-6.png index 4ea84ee9d8dc8..fb77ded6488e9 100644 Binary files a/docs/azure/sdk/media/assign-local-dev-group-to-role-azure-portal-6.png and b/docs/azure/sdk/media/assign-local-dev-group-to-role-azure-portal-6.png differ diff --git a/docs/azure/sdk/media/assign-local-dev-group-to-role-azure-portal-7-240px.png b/docs/azure/sdk/media/assign-local-dev-group-to-role-azure-portal-7-240px.png index 751f016e80880..77a376167bff5 100644 Binary files a/docs/azure/sdk/media/assign-local-dev-group-to-role-azure-portal-7-240px.png and b/docs/azure/sdk/media/assign-local-dev-group-to-role-azure-portal-7-240px.png differ diff --git a/docs/azure/sdk/media/assign-local-dev-group-to-role-azure-portal-7.png b/docs/azure/sdk/media/assign-local-dev-group-to-role-azure-portal-7.png index 23adf1ccf8daa..6051efea2f35a 100644 Binary files a/docs/azure/sdk/media/assign-local-dev-group-to-role-azure-portal-7.png and b/docs/azure/sdk/media/assign-local-dev-group-to-role-azure-portal-7.png differ diff --git a/docs/core/testing/unit-testing-mstest-sdk.md b/docs/core/testing/unit-testing-mstest-sdk.md index d1389adf2330c..b3c6c47656e0f 100644 --- a/docs/core/testing/unit-testing-mstest-sdk.md +++ b/docs/core/testing/unit-testing-mstest-sdk.md @@ -8,7 +8,7 @@ ms.date: 02/13/2024 # MSTest SDK overview -Introduced in .NET 9, [MSTest.Sdk](https://www.nuget.org/packages/MSTest.Sdk) is a [MSBuild project SDK](/visualstudio/msbuild/how-to-use-project-sdk) for building MSTest apps. It's possible to build a MSTest app without this SDK, however, the MSTest SDK is: +[MSTest.Sdk](https://www.nuget.org/packages/MSTest.Sdk) is a [MSBuild project SDK](/visualstudio/msbuild/how-to-use-project-sdk) for building MSTest apps. It's possible to build a MSTest app without this SDK, however, the MSTest SDK is: * Tailored towards providing a first-class experience for testing with MSTest. * The recommended target for most users. diff --git a/docs/core/tools/dotnet-nuget-why.md b/docs/core/tools/dotnet-nuget-why.md index 2514722be9491..84426fcc1ff7c 100644 --- a/docs/core/tools/dotnet-nuget-why.md +++ b/docs/core/tools/dotnet-nuget-why.md @@ -29,6 +29,9 @@ First, restore the project in Visual Studio, or `msbuild.exe`. By default the assets file is in the project's `obj\` directory, but you can find the location with `msbuild.exe path\to\project.proj -getProperty:ProjectAssetsFile`. Finally, run `dotnet nuget why path\to\project.assets.json SomePackage`. +Starting with version 9.0.200, the command introduces support for runtime identifier (RID) specific packages by generating separate dependency trees for each RID and framework combination. +For example, if a project targets `net9.0` with the `win-x64` RID, the command generates trees for `net9.0/win-x64` and `net9.0`. + ## Arguments - **`PROJECT|SOLUTION`** diff --git a/docs/core/tutorials/creating-app-with-plugin-support.md b/docs/core/tutorials/creating-app-with-plugin-support.md index 7420524c99219..22304c597b0ad 100644 --- a/docs/core/tutorials/creating-app-with-plugin-support.md +++ b/docs/core/tutorials/creating-app-with-plugin-support.md @@ -3,24 +3,24 @@ title: Create a .NET Core application with plugins description: Learn how to create a .NET Core application that supports plugins. author: jkoritzinsky ms.author: jekoritz -ms.date: 10/16/2019 +ms.date: 11/20/2024 --- # Create a .NET Core application with plugins -This tutorial shows you how to create a custom to load plugins. An is used to resolve the dependencies of the plugin. The tutorial correctly isolates the plugin's dependencies from the hosting application. You'll learn how to: +This tutorial shows you how to create a custom to load plugins. An is used to resolve the dependencies of the plugin. The tutorial provides a separate assembly context for the plugin's dependencies, allowing different assembly dependencies between the plugins and the hosting application. You'll learn how to: - Structure a project to support plugins. - Create a custom to load each plugin. - Use the type to allow plugins to have dependencies. - Author plugins that can be easily deployed by just copying the build artifacts. -## Prerequisites +> [!NOTE] +> Untrusted code cannot be safely loaded into a trusted .NET process. To provide a security or reliability boundary, consider a technology provided by your OS or virtualization platform. -- Install the [.NET 5 SDK](https://dotnet.microsoft.com/download) or a newer version. +## Prerequisites -> [!NOTE] -> The sample code targets .NET 5, but all the features it uses were introduced in .NET Core 3.0 and are available in all .NET releases since then. +- Install the [.NET SDK](https://dotnet.microsoft.com/download). ## Create the application diff --git a/docs/csharp/fundamentals/types/anonymous-types.md b/docs/csharp/fundamentals/types/anonymous-types.md index f4523239ad885..d86d624246787 100644 --- a/docs/csharp/fundamentals/types/anonymous-types.md +++ b/docs/csharp/fundamentals/types/anonymous-types.md @@ -28,9 +28,13 @@ Anonymous types are typically used in the [`select`](../../language-reference/ke Anonymous types contain one or more public read-only properties. No other kinds of class members, such as methods or events, are valid. The expression that is used to initialize a property cannot be `null`, an anonymous function, or a pointer type. -The most common scenario is to initialize an anonymous type with properties from another type. In the following example, assume that a class exists that is named `Product`. Class `Product` includes `Color` and `Price` properties, together with other properties that you are not interested in. Variable `products` is a collection of `Product` objects. The anonymous type declaration starts with the `new` keyword. The declaration initializes a new type that uses only two properties from `Product`. Using anonymous types causes a smaller amount of data to be returned in the query. +The most common scenario is to initialize an anonymous type with properties from another type. In the following example, assume that a class exists that is named `Product`. Class `Product` includes `Color` and `Price` properties, together with other properties that you are not interested in: -If you don't specify member names in the anonymous type, the compiler gives the anonymous type members the same name as the property being used to initialize them. You provide a name for a property that's being initialized with an expression, as shown in the previous example. In the following example, the names of the properties of the anonymous type are `Color` and `Price`. +:::code language="csharp" source="snippets/anonymous-types/Program.cs" ID="ProductDefinition"::: + +The anonymous type declaration starts with the `new` keyword. The declaration initializes a new type that uses only two properties from `Product`. Using anonymous types causes a smaller amount of data to be returned in the query. + +If you don't specify member names in the anonymous type, the compiler gives the anonymous type members the same name as the property being used to initialize them. You provide a name for a property that's being initialized with an expression, as shown in the previous example. In the following example, the names of the properties of the anonymous type are `Color` and `Price`. The instances are item from the `products` collection of `Product` types: :::code language="csharp" source="snippets/anonymous-types/Program.cs" ID="snippet81"::: diff --git a/docs/csharp/fundamentals/types/snippets/anonymous-types/Program.cs b/docs/csharp/fundamentals/types/snippets/anonymous-types/Program.cs index ec5a8576d3c23..86423bb785516 100644 --- a/docs/csharp/fundamentals/types/snippets/anonymous-types/Program.cs +++ b/docs/csharp/fundamentals/types/snippets/anonymous-types/Program.cs @@ -4,11 +4,16 @@ namespace anonymous_types { + // class Product { public string? Color {get;set;} public decimal Price {get;set;} + public string? Name {get;set;} + public string? Category {get;set;} + public string? Size {get;set;} } + // class Anonymous { static void Main() diff --git a/docs/csharp/language-reference/statements/yield.md b/docs/csharp/language-reference/statements/yield.md index ba8e2fac49378..c387eb9d627d9 100644 --- a/docs/csharp/language-reference/statements/yield.md +++ b/docs/csharp/language-reference/statements/yield.md @@ -38,7 +38,7 @@ You can't use the `yield` statements in: - methods with [in](../keywords/method-parameters.md#in-parameter-modifier), [ref](../keywords/ref.md), or [out](../keywords/method-parameters.md#out-parameter-modifier) parameters - [lambda expressions](../operators/lambda-expressions.md) and [anonymous methods](../operators/delegate-operator.md) - [unsafe blocks](../keywords/unsafe.md). Before C# 13, `yield` was invalid in any method with an `unsafe` block. Beginning with C# 13, you can use `yield` in methods with `unsafe` blocks, but not in the `unsafe` block. -- `yield return` and `yield break` can not be used in [try](../statements/exception-handling-statements.md), [catch](../statements/exception-handling-statements.md) and [finally](../statements/exception-handling-statements.md) blocks. +- `yield return` and `yield break` can not be used in [catch](../statements/exception-handling-statements.md) and [finally](../statements/exception-handling-statements.md) blocks, or in [try](../statements/exception-handling-statements.md) blocks with a corresponding `catch` block. The `yield return` and `yield break` statements can be used in a `try` block with no `catch` blocks, only a `finally` block. ## Execution of an iterator diff --git a/docs/framework/release-notes/2024/10-08-october-security-and-quality-rollup.md b/docs/framework/release-notes/2024/10-08-october-security-and-quality-rollup.md index 3e1f789d0e706..ae6bcc805fb90 100644 --- a/docs/framework/release-notes/2024/10-08-october-security-and-quality-rollup.md +++ b/docs/framework/release-notes/2024/10-08-october-security-and-quality-rollup.md @@ -36,7 +36,7 @@ Addresses an issue with May cumulative updates causing customers to observe runt ## Known issues -This release contains no known issues. +This release contains no known issues. ## Summary tables @@ -55,7 +55,7 @@ The following table outlines the updates in this release. | .NET Framework 3.5, 4.8.1 | [5044035](https://support.microsoft.com/kb/5044035) | | **Windows 11, version 21H2** |**[5044092](https://support.microsoft.com/kb/5044092)** | | .NET Framework 3.5, 4.8 | [5044023](https://support.microsoft.com/kb/5044023) | -| .NET Framework 3.5, 4.8.1 | [5044032](https://support.microsoft.com/kb/5044032**) | +| .NET Framework 3.5, 4.8.1 | [5044032](https://support.microsoft.com/kb/5044032) | | **Microsoft server operating system, version 21H2** | **[5044099](https://support.microsoft.com/kb/5044099)** | | .NET Framework 3.5, 4.8 | [5044025](https://support.microsoft.com/kb/5044025) | | .NET Framework 3.5, 4.8.1 | [5044035](https://support.microsoft.com/kb/5044035) | diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2013.md b/docs/fundamentals/code-analysis/quality-rules/ca2013.md index 83ec21af6493f..c872c30789ad2 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2013.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2013.md @@ -9,7 +9,6 @@ helpviewer_keywords: - "DoNotUseReferenceEqualsWithValueTypes" - "CA2013" author: buyaa-n -ms.author: bunamnan --- # CA2013: Do not use ReferenceEquals with value types