Skip to content

Commit

Permalink
Upgrade dotnet (Azure-Samples#96)
Browse files Browse the repository at this point in the history
* upgrade console-daemon to dotnet 8

* upgrade web-api-azure-function

* add .gitignore for azure function

* update readme to dotnet 8

* adding .gitattributes for unified line-ending

* Revert "adding .gitattributes for unified line-ending"

This reverts commit ffc2ec9.

* Upgrade console-cli to dotnet 8

* upgrade web-api-obo-client

* upgrade web-api-obo-user

* upgrade web-app-aspnet

* upgrade web-app-blazor-server to dotnet 8

* upgrade desktop-winforms to dotnet 8

* upgrade desktop-winui

* upgrade deaktop-wpf

* update readmes for desktop sample apps
  • Loading branch information
algo-1 authored Sep 12, 2024
1 parent ffd1a7b commit 37e943b
Show file tree
Hide file tree
Showing 28 changed files with 384 additions and 121 deletions.
2 changes: 1 addition & 1 deletion console-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ To sign in, use a web browser to open the page https://microsoft.com/devicelogin
## Prerequisites

- Microsoft Entra tenant and the permissions or role required for managing app registrations in the tenant.
- [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet/6.0)
- [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)

## Setup

Expand Down
7 changes: 2 additions & 5 deletions console-cli/cli.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>App</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Identity.Client" Version="4.*" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.64.0" />
</ItemGroup>

</Project>
11 changes: 4 additions & 7 deletions console-daemon/Cli.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Identity.Web.TokenCache" Version="2.*" />
<ItemGroup>
<PackageReference Include="Microsoft.Identity.Web.TokenCache" Version="3.1.0" />
</ItemGroup>

</Project>
</Project>
2 changes: 1 addition & 1 deletion console-daemon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Could not find a cached token, so fetching a new one.
## Prerequisites

- An Azure account with an active subscription. If you don't already have one, [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
- [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet/6.0)
- [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)

## Setup

Expand Down
5 changes: 1 addition & 4 deletions desktop-winforms/MsalExample.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Identity.Client" Version="4.*" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions desktop-winforms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ languages:
- csharp
page_type: sample
name: Windows Forms app that makes a request to the Graph API after signing in the user
description: This .NET 6 Windows Forms app signs in the user and then makes a request to Microsoft Graph for the user's profile data.
description: This .NET 8 Windows Forms app signs in the user and then makes a request to Microsoft Graph for the user's profile data.
products:
- azure
- entra-id
Expand All @@ -26,7 +26,7 @@ This .NET Windows Forms application authenticates a user and then makes a reques
## Prerequisites

- Microsoft Entra tenant and the permissions or role required for managing app registrations in the tenant.
- Visual Studio 2022, [configured for the .NET 6 desktop development workload](https://docs.microsoft.com/dotnet/desktop/winforms/get-started/create-app-visual-studio?view=netdesktop-6.0#prerequisites)
- Visual Studio 2022, [configured for the .NET 8 desktop development workload](https://docs.microsoft.com/dotnet/desktop/winforms/get-started/create-app-visual-studio?view=netdesktop-8.0#prerequisites)

## Setup

Expand Down Expand Up @@ -71,7 +71,7 @@ The appliction will open allowing you to click the **Sign In (if needed) & Call

## About the code

This .NET 6 Windows Forms application presents a button that initiates an authentication flow using the Microsoft Authentication Library (MSAL). The user completes this flow in their default web browser. Upon successful authentication, an HTTP GET request to the Microsoft Graph /me endpoint is issued with the user's access token in the HTTP header. The response from the GET request is then displayed to the user. The MSAL client first looks to its token cache, refreshing if necessary, before acquiring a new access token.
This .NET 8 Windows Forms application presents a button that initiates an authentication flow using the Microsoft Authentication Library (MSAL). The user completes this flow in their default web browser. Upon successful authentication, an HTTP GET request to the Microsoft Graph /me endpoint is issued with the user's access token in the HTTP header. The response from the GET request is then displayed to the user. The MSAL client first looks to its token cache, refreshing if necessary, before acquiring a new access token.

## Reporting problems

Expand Down
4 changes: 2 additions & 2 deletions desktop-winui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ languages:
- csharp
page_type: sample
name: WinUI 3 Packaged Desktop App that makes a request to the Graph API after signing in the user
description: This .NET 6 (C#) WinUI 3 Packaged Desktop App signs in the user and then makes a request to Microsoft Graph for the user's profile data.
description: This .NET 8 (C#) WinUI 3 Packaged Desktop App signs in the user and then makes a request to Microsoft Graph for the user's profile data.
products:
- azure
- entra-id
Expand Down Expand Up @@ -72,7 +72,7 @@ The application will open allowing you to click the **Sign In (if needed) & Call

## About the code

This .NET 6 WinUI 3 Packaged Desktop App presents a button that initiates an authentication flow using the Microsoft Authentication Library (MSAL). The user completes this flow in their default web browser. Upon successful authentication, an HTTP GET request to the Microsoft Graph /me endpoint is issued with the user's access token in the HTTP header. The response from the GET request is then displayed to the user. The MSAL client first looks to its token cache, refreshing if necessary, before acquiring a new access token.
This .NET 8 WinUI 3 Packaged Desktop App presents a button that initiates an authentication flow using the Microsoft Authentication Library (MSAL). The user completes this flow in their default web browser. Upon successful authentication, an HTTP GET request to the Microsoft Graph /me endpoint is issued with the user's access token in the HTTP header. The response from the GET request is then displayed to the user. The MSAL client first looks to its token cache, refreshing if necessary, before acquiring a new access token.

## Reporting problems

Expand Down
6 changes: 3 additions & 3 deletions desktop-winui/WinUIApp.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>WinUIApp</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
</PropertyGroup>
Expand Down
25 changes: 11 additions & 14 deletions desktop-wpf/MsalExample.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Identity.Client" Version="4.*" />
</ItemGroup>

</Project>
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Identity.Client" Version="4.*" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions desktop-wpf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ languages:
- csharp
page_type: sample
name: Windows Presentation Foundation (WPF) app that makes a request to the Graph API after signing in the user
description: This .NET 6 (C#) Windows Presentation Foundation (WPF) app signs in the user and then makes a request to Microsoft Graph for the user's profile data.
description: This .NET 8 (C#) Windows Presentation Foundation (WPF) app signs in the user and then makes a request to Microsoft Graph for the user's profile data.
products:
- azure
- entra-id
Expand All @@ -26,7 +26,7 @@ This .NET Windows Presentation Foundation (WPF) application authenticates a user
## Prerequisites

- Microsoft Entra tenant and the permissions or role required for managing app registrations in the tenant.
- Visual Studio 2022, [configured for the .NET 6 desktop development workload](https://docs.microsoft.com/dotnet/desktop/winforms/get-started/create-app-visual-studio?view=netdesktop-6.0#prerequisites)
- Visual Studio 2022, [configured for the .NET 8 desktop development workload](https://docs.microsoft.com/dotnet/desktop/winforms/get-started/create-app-visual-studio?view=netdesktop-8.0#prerequisites)

## Setup

Expand Down Expand Up @@ -71,7 +71,7 @@ The application will open allowing you to click the **Sign In (if needed) & Call

## About the code

This .NET 6 Windows Presentation Foundation (WPF) application presents a button that initiates an authentication flow using the Microsoft Authentication Library (MSAL). The user completes this flow in their default web browser. Upon successful authentication, an HTTP GET request to the Microsoft Graph /me endpoint is issued with the user's access token in the HTTP header. The response from the GET request is then displayed to the user. The MSAL client first looks to its token cache, refreshing if necessary, before acquiring a new access token.
This .NET 8 Windows Presentation Foundation (WPF) application presents a button that initiates an authentication flow using the Microsoft Authentication Library (MSAL). The user completes this flow in their default web browser. Upon successful authentication, an HTTP GET request to the Microsoft Graph /me endpoint is issued with the user's access token in the HTTP header. The response from the GET request is then displayed to the user. The MSAL client first looks to its token cache, refreshing if necessary, before acquiring a new access token.

## Reporting problems

Expand Down
Loading

0 comments on commit 37e943b

Please sign in to comment.