Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .azure-pipelines/release-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ stages:
condition: and(succeeded(), ne('${{ parameters.simulate }}', 'true'))
steps:
- task: UseDotNet@2
displayName: 'Use .NET 7'
displayName: 'Use .NET 8'
inputs:
version: 7.x
version: 8.x

# Restore NuGet packages (enables cache by default)
- template: templates/nuget-packages.yaml
Expand Down Expand Up @@ -114,10 +114,10 @@ stages:
# maxParallel: 2
steps:
- task: UseDotNet@2
displayName: 'Use .NET 7'
displayName: 'Use .NET 8'
condition: and(succeeded(), ne('${{ parameters.simulate }}', 'true'))
inputs:
version: 7.x
version: 8.x

- ${{ if ne(parameters.simulate, 'true') }}:
- template: templates/nuget-packages.yaml
Expand Down Expand Up @@ -179,9 +179,9 @@ stages:
condition: and(succeeded(), ne('${{ parameters.simulate }}', 'true'))
steps:
- task: UseDotNet@2
displayName: 'Use .NET 7'
displayName: 'Use .NET 8'
inputs:
version: 7.x
version: 8.x

# Restore NuGet packages (enables cache by default)
- template: templates/nuget-packages.yaml
Expand Down Expand Up @@ -410,10 +410,10 @@ stages:

# Nuget tool doesn't work with multi-stage builds
- task: UseDotNet@2
displayName: 'Use .NET 7'
displayName: 'Use .NET 8'
condition: and(false, succeeded(), ne('${{ parameters.simulate }}', 'true'), eq(variables['IS_NUGET'], 'true'))
inputs:
version: 7.x
version: 8.x

- ${{ if ne(parameters.simulate, 'true') }}:
- template: templates/nuget-packages.yaml
Expand Down Expand Up @@ -448,7 +448,7 @@ stages:
script: |
$path = '$(ARTIFACTS_PATH)'
if ('$(IS_NUGET)'.ToLower() -eq 'true' -and ('${{ parameters.simulate }}'.ToLower() -ne 'true')) {
$path = './src/obj/$(buildConfiguration)/net7.0'
$path = './src/obj/$(buildConfiguration)/net8.0'
}
Write-Verbose "Checking if $path has files"
$hasArtifacts = Test-Path $path/* -PathType Leaf
Expand Down
46 changes: 41 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/src/bin/Debug/net7.0/mgc.dll",
"program": "${workspaceFolder}/src/bin/Debug/net8.0/mgc.dll",
"args": ["-h"],
"cwd": "${workspaceFolder}/src",
"envFile": "${workspaceFolder}/src/.env",
Expand All @@ -21,7 +21,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/src/bin/Debug/net7.0/mgc.dll",
"program": "${workspaceFolder}/src/bin/Debug/net8.0/mgc.dll",
"args": ["login"],
"cwd": "${workspaceFolder}/src",
"envFile": "${workspaceFolder}/src/.env",
Expand All @@ -33,7 +33,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/src/bin/Debug/net7.0/mgc.dll",
"program": "${workspaceFolder}/src/bin/Debug/net8.0/mgc.dll",
"args": ["me", "get", "--output", "TABLE"],
"cwd": "${workspaceFolder}/src",
"envFile": "${workspaceFolder}/src/.env",
Expand All @@ -45,17 +45,53 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/src/bin/Debug/net6.0/mgc.dll",
"program": "${workspaceFolder}/src/bin/Debug/net8.0/mgc.dll",
"args": ["users", "item", "patch", "--user-id", "admin@M365x258755.OnMicrosoft.com", "--body", "{\"officeLocation\": \"NewLocation\"}", "--debug"],
"cwd": "${workspaceFolder}/src",
"envFile": "${workspaceFolder}/src/.env",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "sites get",
"type": "coreclr",
"request": "launch",
// "preLaunchTask": "build",
"justMyCode": false,
"symbolOptions": {
"searchPaths": [],
"searchMicrosoftSymbolServer": false,
"searchNuGetOrgSymbolServer": true
},
"program": "${workspaceFolder}/src/bin/Debug/net8.0/mgc.dll",
"args": ["sites", "list", "--debug"],
"cwd": "${workspaceFolder}/src",
"envFile": "${workspaceFolder}/src/.env",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "identity get",
"type": "coreclr",
"request": "launch",
// "preLaunchTask": "build",
"justMyCode": false,
// "symbolOptions": {
// "searchPaths": [],
// "searchMicrosoftSymbolServer": false,
// "searchNuGetOrgSymbolServer": true
// },
"program": "${workspaceFolder}/src/bin/Debug/net8.0/mgc.dll",
"args": ["identity", "get", "--debug"],
"cwd": "${workspaceFolder}/src",
"envFile": "${workspaceFolder}/src/.env",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}
}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# 2. Use the \\?\ prefix when specifying the path in the docker build command. e.g.
# docker build \\?\C:\path -f .\Dockerfile
# See https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS build-env
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build-env

ARG MSGRAPH_NUGET_URL=https://nuget.pkg.github.com/microsoftgraph/index.json

Expand All @@ -16,7 +16,7 @@ WORKDIR /app/msgraph-cli

RUN dotnet publish -p:PublishSingleFile=false -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true ./src/msgraph-cli.csproj --configuration Release --no-self-contained --runtime linux-musl-x64 --output /app/output

FROM mcr.microsoft.com/dotnet/runtime:7.0-alpine as runtime
FROM mcr.microsoft.com/dotnet/runtime:8.0-alpine as runtime

# Change this password by providing a different value when running the container
ENV KEYRING_PASSWORD="password"
Expand Down
6 changes: 3 additions & 3 deletions src/msgraph-cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Microsoft.Graph.Cli</RootNamespace>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyName>mgc</AssemblyName>
<Version>1.1.1</Version>
<Version>1.2.0</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -57,7 +57,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="Microsoft.Graph.Cli.Core" Version="1.0.0" />
<PackageReference Include="Microsoft.Graph.Cli.Core" Version="1.1.0" />
<PackageReference Include="System.CommandLine.Hosting" Version="0.4.0-alpha.22272.1" />
</ItemGroup>

Expand Down
Loading