Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Kudu.Console/Kudu.Console.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<TieredCompilation>true</TieredCompilation>
<AssemblyName>kudu</AssemblyName>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Kudu.Contracts/Kudu.Contracts.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<TieredCompilation>true</TieredCompilation>
</PropertyGroup>
<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Kudu.Core/Kudu.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<TieredCompilation>true</TieredCompilation>
</PropertyGroup>
<PropertyGroup>
Expand Down
18 changes: 11 additions & 7 deletions Kudu.Services.Web/Kudu.Services.Web.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<TieredCompilation>true</TieredCompilation>
</PropertyGroup>
<!-- Supressing Net Core migration warnings-->
Expand All @@ -26,6 +26,10 @@
<PackageReference Include="AspNetCore.RouteAnalyzer" Version="0.5.3" />
<PackageReference Include="log4net" Version="2.0.8" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.421302">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.5" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Proxy" />
Expand All @@ -48,12 +52,12 @@
<Folder Include="wwwroot\Content\Styles\" />
<Folder Include="wwwroot\Content\Scripts\" />
</ItemGroup>
<!-- Run updateNodeModules to install kuduscript -->
<Target Name="PutNodeModulesInBinDir" AfterTargets="Build">
<Exec Command="$(ProjectDir)\updateNodeModules.cmd &quot;$(PublishDir)&quot;" Condition="'$(OS)' == 'Windows_NT' AND '$(Configuration)'=='Release'" />
<Exec Command="$(ProjectDir)\updateNodeModules.cmd &quot;$(OutputPath)&quot;" Condition="'$(OS)' == 'Windows_NT' AND '$(Configuration)'=='Debug'" />
<!-- Run updateNodeModules to install kuduscript -->
<Target Name="PutNodeModulesInBinDir" AfterTargets="Build">
<Exec Command="$(ProjectDir)\updateNodeModules.cmd &quot;$(PublishDir)&quot;" Condition="'$(OS)' == 'Windows_NT' AND '$(Configuration)'=='Release'" />
<Exec Command="$(ProjectDir)\updateNodeModules.cmd &quot;$(OutputPath)&quot;" Condition="'$(OS)' == 'Windows_NT' AND '$(Configuration)'=='Debug'" />
<Exec Command="sh $(ProjectDir)/updateNodeModules.sh &quot;$(PublishDir)&quot;" Condition="'$(OS)' != 'Windows_NT' AND '$(Configuration)' == 'Release'" />
<Exec Command="sh $(ProjectDir)/updateNodeModules.sh &quot;$(OutputPath)&quot;" Condition="'$(OS)' != 'Windows_NT' AND '$(Configuration)' == 'Debug'" />
<Exec Command="sh $(ProjectDir)/updateNodeModules.sh &quot;$(OutputPath)&quot;" Condition="'$(OS)' != 'Windows_NT' AND '$(Configuration)' == 'Debug'" />
</Target>
<Target Name="BuildKuduConsole" AfterTargets="Build">
<Message Text="%0a%0aBuilding KuduConsole%0a" Importance="high" />
Expand All @@ -71,4 +75,4 @@
<Exec Command="chmod -R +x $(OutputPath)/node_modules" Condition=" '$(OS)' != 'Windows_NT' AND '$(Configuration)' == 'Debug'" />
<Exec Command="chmod -R +x $(OutputPath)/Scripts" Condition=" '$(OS)' != 'Windows_NT' AND '$(Configuration)' == 'Debug'" />
</Target>
</Project>
</Project>
8 changes: 2 additions & 6 deletions Kudu.Services.Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Configuration;
using System.IO;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Reflection;
using AspNetCore.RouteAnalyzer;
using Kudu.Contracts;
Expand Down Expand Up @@ -43,6 +42,7 @@
using Swashbuckle.AspNetCore.Swagger;
using ILogger = Kudu.Core.Deployment.ILogger;
using AspNetCore.Proxy;
using ConfigurationManager = System.Configuration.ConfigurationManager;

namespace Kudu.Services.Web
{
Expand Down Expand Up @@ -88,11 +88,9 @@ public void ConfigureServices(IServiceCollection services)
// Kudu.Services contains all the Controllers
var kuduServicesAssembly = Assembly.Load("Kudu.Services");

services.AddMvcCore()
services.AddMvcCore(c => c.EnableEndpointRouting = false)
.AddRazorPages()
.AddAuthorization()
.AddJsonFormatters()
.AddJsonOptions(options => options.SerializerSettings.ContractResolver = new DefaultContractResolver())
.AddApplicationPart(kuduServicesAssembly).AddControllersAsServices()
.AddApiExplorer();

Expand Down Expand Up @@ -349,7 +347,6 @@ public void Configure(IApplicationBuilder app,
{
Console.WriteLine(@"Configure : " + DateTime.Now.ToString("hh.mm.ss.ffffff"));

loggerFactory.AddEventSourceLogger();

KuduWebUtil.MigrateToNetCorePatch(_webAppRuntimeEnvironment);

Expand Down Expand Up @@ -413,7 +410,6 @@ public void Configure(IApplicationBuilder app,
//GlobalConfiguration.Configuration.Formatters.Clear();
//GlobalConfiguration.Configuration.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;

var jsonFormatter = new JsonMediaTypeFormatter();


// CORE TODO concept of "deprecation" in routes for traces, Do we need this for linux ?
Expand Down
5 changes: 1 addition & 4 deletions Kudu.Services/DebugExtension/DebugExtensionMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ public void ConfigureLogging()
{
if (loggerFactory == null)
{
loggerFactory = new LoggerFactory();

string level = Environment.GetEnvironmentVariable("APPSVC_TUNNEL_VERBOSITY");
LogLevel logLevel = LogLevel.Information;

Expand All @@ -76,8 +74,7 @@ public void ConfigureLogging()
}
Console.WriteLine("Setting LogLevel to " + level);
}

loggerFactory.AddConsole(logLevel);
loggerFactory = LoggerFactory.Create(builder => builder.AddConsole());
}

if (_logger == null)
Expand Down
11 changes: 1 addition & 10 deletions Kudu.Services/Diagnostics/LogStreamManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public async Task ProcessRequest(HttpContext context)
_startTime = DateTime.UtcNow;
_lastTraceTime = _startTime;

DisableResponseBuffering(context);
stopwatch = Stopwatch.StartNew();

// CORE TODO Shutdown detector registration
Expand Down Expand Up @@ -369,15 +368,7 @@ private Action<T1, T2> DoSafeAction<T1, T2, T3>(Action<T1, T2, T3> func, string
}
};
}

private void DisableResponseBuffering(HttpContext context)
{
IHttpBufferingFeature bufferingFeature = context.Features.Get<IHttpBufferingFeature>();
if (bufferingFeature != null)
{
bufferingFeature.DisableResponseBuffering();
}
}


private void Reset()
{
Expand Down
1 change: 0 additions & 1 deletion Kudu.Services/Infrastructure/FileCallbackResult.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.AspNetCore.Mvc.Internal;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System;
Expand Down
2 changes: 1 addition & 1 deletion Kudu.Services/Kudu.Services.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<TieredCompilation>true</TieredCompilation>
</PropertyGroup>
<PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion Kudu.Services/Zip/ZipController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Kudu.Core;
using Kudu.Services.Infrastructure;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Internal;
using System;
using System.IO.Abstractions;
using System.IO.Compression;
Expand Down
2 changes: 1 addition & 1 deletion Kudu.Tests/Kudu.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>net7.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
151 changes: 151 additions & 0 deletions UpgradeReport.sarif
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
{
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"version": "2.1.0",
"runs": [
{
"tool": {
"driver": {
"name": "Back up project",
"semanticVersion": "",
"informationUri": "https://github.com/dotnet/upgrade-assistant#usage",
"rules": [
{
"id": "Microsoft.DotNet.UpgradeAssistant.Steps.Backup.BackupStep",
"fullDescription": {
"text": "Back up the current project to another directory"
}
}
]
}
},
"results": [
{
"ruleId": "Microsoft.DotNet.UpgradeAssistant.Steps.Backup.BackupStep",
"level": "note",
"message": {
"text": "Complete: Project backed up to D:\\AppicLogics\\KuduLite.backup\\Kudu.Services.Web"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "file:///D:/AppicLogics/KuduLite.backup/Kudu.Services.Web"
},
"region": {}
}
}
]
}
],
"columnKind": "utf16CodeUnits"
},
{
"tool": {
"driver": {
"name": "Add package 'Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers'",
"semanticVersion": "",
"informationUri": "https://github.com/dotnet/upgrade-assistant#usage",
"rules": [
{
"id": "Microsoft.DotNet.UpgradeAssistant.Steps.Packages.PackageUpdaterStep+PackageManipulationStep`1[[Microsoft.DotNet.UpgradeAssistant.NuGetReference, Microsoft.DotNet.UpgradeAssistant.Abstractions, Version=0.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]"
}
]
}
},
"results": [
{
"ruleId": "Microsoft.DotNet.UpgradeAssistant.Steps.Packages.PackageUpdaterStep+PackageManipulationStep`1[[Microsoft.DotNet.UpgradeAssistant.NuGetReference, Microsoft.DotNet.UpgradeAssistant.Abstractions, Version=0.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]",
"level": "note",
"message": {
"text": "Complete: Add package 'Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers'"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "file:///D:/AppicLogics/KuduLite/Kudu.Services.Web/Kudu.Services.Web.csproj"
},
"region": {}
}
}
]
}
],
"columnKind": "utf16CodeUnits"
},
{
"tool": {
"driver": {
"name": "Update TFM",
"semanticVersion": "",
"informationUri": "https://github.com/dotnet/upgrade-assistant#usage",
"rules": [
{
"id": "Microsoft.DotNet.UpgradeAssistant.Steps.ProjectFormat.SetTFMStep",
"fullDescription": {
"text": "Update TFM for current project"
}
}
]
}
},
"results": [
{
"ruleId": "Microsoft.DotNet.UpgradeAssistant.Steps.ProjectFormat.SetTFMStep",
"level": "note",
"message": {
"text": "Complete: Updated TFM to net7.0"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "file:///D:/AppicLogics/KuduLite/Kudu.Services.Web/Kudu.Services.Web.csproj"
},
"region": {}
}
}
]
}
],
"columnKind": "utf16CodeUnits"
},
{
"tool": {
"driver": {
"name": "Add package 'Microsoft.AspNetCore.Mvc.NewtonsoftJson'",
"semanticVersion": "",
"informationUri": "https://github.com/dotnet/upgrade-assistant#usage",
"rules": [
{
"id": "Microsoft.DotNet.UpgradeAssistant.Steps.Packages.PackageUpdaterStep+PackageManipulationStep`1[[Microsoft.DotNet.UpgradeAssistant.NuGetReference, Microsoft.DotNet.UpgradeAssistant.Abstractions, Version=0.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]",
"fullDescription": {
"text": "Reference to Newtonsoft package (Microsoft.AspNetCore.Mvc.NewtonsoftJson, version 7.0.5) needs to be added"
}
}
]
}
},
"results": [
{
"ruleId": "Microsoft.DotNet.UpgradeAssistant.Steps.Packages.PackageUpdaterStep+PackageManipulationStep`1[[Microsoft.DotNet.UpgradeAssistant.NuGetReference, Microsoft.DotNet.UpgradeAssistant.Abstractions, Version=0.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]",
"level": "note",
"message": {
"text": "Complete: Add package 'Microsoft.AspNetCore.Mvc.NewtonsoftJson'"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "file:///D:/AppicLogics/KuduLite/Kudu.Services.Web/Kudu.Services.Web.csproj"
},
"region": {}
}
}
]
}
],
"columnKind": "utf16CodeUnits"
}
]
}
Loading