Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

897821 - Modify the samples of Azure app service windows to .NET 8.0 #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 8 additions & 8 deletions Getting Started/ASP.NET Core/Create Excel/Create Excel.sln
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31729.503
# Visual Studio Version 17
VisualStudioVersion = 17.9.34310.174
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Create Excel", "Create Excel\Create Excel.csproj", "{FD4DFA50-0712-445D-8B57-00BBE2879B8C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Create Excel", "Create Excel\Create Excel.csproj", "{4C6910F2-CF16-477F-A790-E80A55920350}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FD4DFA50-0712-445D-8B57-00BBE2879B8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD4DFA50-0712-445D-8B57-00BBE2879B8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD4DFA50-0712-445D-8B57-00BBE2879B8C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD4DFA50-0712-445D-8B57-00BBE2879B8C}.Release|Any CPU.Build.0 = Release|Any CPU
{4C6910F2-CF16-477F-A790-E80A55920350}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C6910F2-CF16-477F-A790-E80A55920350}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C6910F2-CF16-477F-A790-E80A55920350}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C6910F2-CF16-477F-A790-E80A55920350}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {015F00D8-E636-4CF5-9C7C-ABB4A8708896}
SolutionGuid = {AB6292D3-7D51-4FBB-86F9-FCB52357C7C0}
EndGlobalSection
EndGlobal

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Create_Excel</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.XlsIO.Net.Core" Version="19.4.0.53" />
<None Remove="AdventureCycles-Logo.png" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="AdventureCycles-Logo.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.XlsIO.Net.Core" Version="26.1.42" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ActiveDebugProfile>https</ActiveDebugProfile>
<NameOfLastUsedPublishProfile>C:\Syncfusion\XlsIO-Examples-AzureNew\Getting Started\ASP.NET Core\Create Excel\Create Excel\Properties\PublishProfiles\CreateExcel20240717150739 - Web Deploy1.pubxml</NameOfLastUsedPublishProfile>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using System;

namespace Create_Excel.Models
{
public class ErrorViewModel
{
public string RequestId { get; set; }
public string? RequestId { get; set; }

public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
}
Expand Down
49 changes: 25 additions & 24 deletions Getting Started/ASP.NET Core/Create Excel/Create Excel/Program.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Create_Excel
var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddControllersWithViews();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}

public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
app.UseExceptionHandler("/Home/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}

app.UseHttpsRedirection();
app.UseStaticFiles();

app.UseRouting();

app.UseAuthorization();

app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");

app.Run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<ResourceId>/subscriptions/431b6c0e-6e67-43e0-b169-2a182a91b202/resourcegroups/CreateExcel20240717150739/providers/Microsoft.Web/sites/CreateExcel20240717150739</ResourceId>
<ResourceGroup>CreateExcel20240717150739</ResourceGroup>
<PublishProvider>AzureWebSite</PublishProvider>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>https://createexcel20240717150739.azurewebsites.net</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<ExcludeApp_Data>false</ExcludeApp_Data>
<ProjectGuid>4c6910f2-cf16-477f-a790-e80a55920350</ProjectGuid>
<MSDeployServiceURL>createexcel20240717150739.scm.azurewebsites.net:443</MSDeployServiceURL>
<DeployIisAppPath>CreateExcel20240717150739</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>true</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>true</EnableMSDeployBackup>
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
<UserName>$CreateExcel20240717150739</UserName>
<_SavePWD>true</_SavePWD>
<_DestinationType>AzureWebSite</_DestinationType>
<InstallAspNetCoreSiteExtension>false</InstallAspNetCoreSiteExtension>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile />
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAjeBIP9TRokGwlBDE4aW+rwAAAAACAAAAAAAQZgAAAAEAACAAAACNuCWzrifONuFKeOBsx3bdbzWYQLy9O88KVjJKJnMi4QAAAAAOgAAAAAIAACAAAAC+lQXL2HcVog79arcajQnqzqJwW0FSs8Q573YE+50OxoAAAAACLwDrXy/oRfQ/8razjRTuNVpw5Fgl6kE7zx4n46OAjlE0WdLqeR+1yzepxl/d/7tdf35sbq0RWpLZNud3LBTbLR1+qMKaLUSTMluyITtNH2pdNQru/ft3QyEOgA25XBoHI6moYnyYjhF+OlvGJW49Tq27EvWCo5Ge40AUczmcikAAAAAICbV71OUyQbIEiAU41UsERxxbAJM0nRLtPlFiEi8gJdR6a8kDK6shr47Y4+cSF4mcTbN6V7bXFaiz6uZ0DoiM</EncryptedPassword>
<History>True|2024-07-17T09:53:58.2701452Z;True|2024-07-17T15:17:14.7994045+05:30;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<ResourceId>/subscriptions/431b6c0e-6e67-43e0-b169-2a182a91b202/resourceGroups/CreateExcel20240717150739/providers/Microsoft.Web/sites/CreateExcel20240717150739</ResourceId>
<ResourceGroup>CreateExcel20240717150739</ResourceGroup>
<PublishProvider>AzureWebSite</PublishProvider>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>https://createexcel20240717150739.azurewebsites.net</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<ExcludeApp_Data>false</ExcludeApp_Data>
<ProjectGuid>4c6910f2-cf16-477f-a790-e80a55920350</ProjectGuid>
<MSDeployServiceURL>createexcel20240717150739.scm.azurewebsites.net:443</MSDeployServiceURL>
<DeployIisAppPath>CreateExcel20240717150739</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>true</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>true</EnableMSDeployBackup>
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
<UserName>$CreateExcel20240717150739</UserName>
<_SavePWD>true</_SavePWD>
<_DestinationType>AzureWebSite</_DestinationType>
<InstallAspNetCoreSiteExtension>false</InstallAspNetCoreSiteExtension>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile />
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAjeBIP9TRokGwlBDE4aW+rwAAAAACAAAAAAAQZgAAAAEAACAAAABLz8sLE7JsUdZXeYZUauMfwm6wNYnvbIU8urtpz7OxEAAAAAAOgAAAAAIAACAAAAD9By4hoGuRUx7RyDTzb2hF29bDrPd5CTJnodxpsXD3IIAAAAAkq8i4uJaRbZmFGDfZZu+3onKlfImkPY9Pqkt4icA7JPdFIUCTEEm1fUO8VHHKTDM/l52qPZa9LQYkssr7BY00H1cor1FDeduRYtq8hHRubpfUCwtKQ4A+6xMTrHSSSkh6EOEm4Ul5870ETWwNkSQbE7fwhh1XCbJmXBentB5vjkAAAAAysx+a2BvZB5b87MZaB859iWN2GfubJiCZdF3mEcAm2uCLXsyDbQ3sK6iDFyYRtXbLzkzkWMsuzCtwVxMHmZv5</EncryptedPassword>
<History>True|2024-07-18T06:23:00.4475029Z;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_dependencyType": "compute.appService.windows"
},
"parameters": {
"resourceGroupName": {
"type": "string",
"defaultValue": "CreateExcel20240717150739",
"metadata": {
"description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
}
},
"resourceGroupLocation": {
"type": "string",
"defaultValue": "eastus",
"metadata": {
"description": "Location of the resource group. Resource groups could have different location than resources, however by default we use API versions from latest hybrid profile which support all locations for resource types we support."
}
},
"resourceName": {
"type": "string",
"defaultValue": "CreateExcel20240717150739",
"metadata": {
"description": "Name of the main resource to be created by this template."
}
},
"resourceLocation": {
"type": "string",
"defaultValue": "[parameters('resourceGroupLocation')]",
"metadata": {
"description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
}
}
},
"variables": {
"appServicePlan_name": "[concat('Plan', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
"appServicePlan_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/serverFarms/', variables('appServicePlan_name'))]"
},
"resources": [
{
"type": "Microsoft.Resources/resourceGroups",
"name": "[parameters('resourceGroupName')]",
"location": "[parameters('resourceGroupLocation')]",
"apiVersion": "2019-10-01"
},
{
"type": "Microsoft.Resources/deployments",
"name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
"resourceGroup": "[parameters('resourceGroupName')]",
"apiVersion": "2019-10-01",
"dependsOn": [
"[parameters('resourceGroupName')]"
],
"properties": {
"mode": "Incremental",
"template": {
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"location": "[parameters('resourceLocation')]",
"name": "[parameters('resourceName')]",
"type": "Microsoft.Web/sites",
"apiVersion": "2015-08-01",
"tags": {
"[concat('hidden-related:', variables('appServicePlan_ResourceId'))]": "empty"
},
"dependsOn": [
"[variables('appServicePlan_ResourceId')]"
],
"kind": "app",
"properties": {
"name": "[parameters('resourceName')]",
"kind": "app",
"httpsOnly": true,
"reserved": false,
"serverFarmId": "[variables('appServicePlan_ResourceId')]",
"siteConfig": {
"metadata": [
{
"name": "CURRENT_STACK",
"value": "dotnetcore"
}
]
}
},
"identity": {
"type": "SystemAssigned"
}
},
{
"location": "[parameters('resourceLocation')]",
"name": "[variables('appServicePlan_name')]",
"type": "Microsoft.Web/serverFarms",
"apiVersion": "2015-08-01",
"sku": {
"name": "S1",
"tier": "Standard",
"family": "S",
"size": "S1"
},
"properties": {
"name": "[variables('appServicePlan_name')]"
}
}
]
}
}
}
]
}
Loading
Loading