From 40fe241b56c59cc78a6feb3549b27bf29d1d17ba Mon Sep 17 00:00:00 2001 From: sayedimac Date: Fri, 7 Mar 2025 13:34:55 +0000 Subject: [PATCH 1/2] ok ok --- .vscode/settings.json | 4 ++++ .vscode/tasks.json | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..ff3f4ef --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "appService.preDeployTask": "publish-release", + "appService.deploySubpath": "bin/Release/net9.0/publish" +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..e7f5bf1 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,32 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "clean", + "command": "dotnet", + "type": "process", + "args": [ + "clean", + "${workspaceFolder}", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish-release", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}", + "--configuration", + "Release", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile", + "dependsOn": "clean" + } + ] +} \ No newline at end of file From 752719193f73ccb175e685a0c707fedfd3e8d058 Mon Sep 17 00:00:00 2001 From: sayedimac Date: Fri, 7 Mar 2025 13:44:30 +0000 Subject: [PATCH 2/2] lets hope --- Program.cs | 10 +++++----- Services/ResourceGroupsClass.cs | 13 ------------- 2 files changed, 5 insertions(+), 18 deletions(-) delete mode 100644 Services/ResourceGroupsClass.cs diff --git a/Program.cs b/Program.cs index 954ed9d..e4bbe01 100644 --- a/Program.cs +++ b/Program.cs @@ -16,13 +16,13 @@ var builder = WebApplication.CreateBuilder(args); IConfiguration _configuration = new ConfigurationBuilder() - .AddJsonFile("appsettings.json") + .AddEnvironmentVariables() .Build(); -var clientId = _configuration["AzureAd:ClientId"]; -var clientSecret = _configuration["AzureAd:ClientSecret"]; -var tenantId = _configuration["AzureAd:TenantId"]; -var subscriptionId = _configuration["AzureAd:SubscriptionId"]; +var clientId = _configuration["ClientId"]; +var clientSecret = _configuration["ClientSecret"]; +var tenantId = _configuration["TenantId"]; +var subscriptionId = _configuration["SubscriptionId"]; IConfidentialClientApplication authapp = ConfidentialClientApplicationBuilder.Create(clientId) .WithClientSecret(clientSecret) diff --git a/Services/ResourceGroupsClass.cs b/Services/ResourceGroupsClass.cs deleted file mode 100644 index 17f5830..0000000 --- a/Services/ResourceGroupsClass.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace AzureIntegration.Services -{ - public class ResourceGroup - { - public string Name { get; set; } - public string Location { get; set; } - } - - public class ResourceGroups - { - public List Value { get; set; } - } -}