Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

[C#][aspnetcore] feat - Upgrade to .NET 6 LTS - #6914

Merged
NateBrady23 merged 20 commits into
TechEmpower:masterfrom
ShreyasJejurkar:net-6
Jan 28, 2022
Merged

NateBrady23 merged 20 commits into
TechEmpower:masterfrom
ShreyasJejurkar:net-6

Conversation

@ShreyasJejurkar

@ShreyasJejurkar ShreyasJejurkar commented Nov 13, 2021 •

Copy link
Copy Markdown
Contributor
  • .NET 6 upgrade.
  • Implicite Usings.
  • Update Packages.
  • File-Scoped namespaces.
  • Ran dotnet-format
  • Target type initialization.

Opening early for review...

cc @sebastienros @roji

@ShreyasJejurkar

Copy link
Copy Markdown
Contributor Author

for aspnetcore-mono getting below error. Seems like it cannot find files for 6.0.

image

@ShreyasJejurkar
ShreyasJejurkar marked this pull request as ready for review November 13, 2021 14:23
@ShreyasJejurkar ShreyasJejurkar changed the title feat - Upgrade to .NET 6 LTS [C#][aspnetcore]feat - Upgrade to .NET 6 LTS Nov 14, 2021
@ShreyasJejurkar ShreyasJejurkar changed the title [C#][aspnetcore]feat - Upgrade to .NET 6 LTS [C#][aspnetcore] feat - Upgrade to .NET 6 LTS Nov 14, 2021
@ShreyasJejurkar

Copy link
Copy Markdown
Contributor Author

ICYMI @sebastienros

@sebastienros

Copy link
Copy Markdown
Contributor

/cc @MichalStrehovsky for core-rt changes

LGTM

@ShreyasJejurkar

Copy link
Copy Markdown
Contributor Author

Thanks for the input @sebastienros. 🙌

@MichalStrehovsky

Copy link
Copy Markdown
Contributor

/cc @MichalStrehovsky for core-rt changes

This is too big to review - the files under aspnetcore-corert should be bit-for-bit identical with aspnetcore except for the NuGet.config and .csproj.

@ShreyasJejurkar could you also fold #6888 into this? Then I can close that one. Otherwise we're just going to conflict. I don't understand the ordering by which pull requests get merged in this repo; the pull request has been open for a while. #6888 just brings RawDbMySqlConnector.cs and RawDbNpgsql.cs in sync, adds a <IlcArg Include="--instructionset:sse4.2" /> line to the csproj and deletes <RdXmlFile Condition=" '$(DatabaseProvider)' == 'Npgsql' " Include="npgsql.rd.xml" /> from the csproj (and deletes the file).

@ShreyasJejurkar

Copy link
Copy Markdown
Contributor Author

Hi @MichalStrehovsky, I have merged your branch into mine. And also upgraded package versions, please have a look.
Thanks.

@ShreyasJejurkar

Copy link
Copy Markdown
Contributor Author

aspnetcore-mono still having issues.
image

@sebastienros

Copy link
Copy Markdown
Contributor

My advice is to split this pr into separate ones per folder. This way one won't block the others, and it will be easier for each owner to review it. It should not be much more work to do that depending on your for experience.

@ShreyasJejurkar

Copy link
Copy Markdown
Contributor Author

it's ok @sebastienros. I will just keep aspnetcore and aspnetcore-corert changes in their PR. Will revert aspnetcore-mono changes.

@ShreyasJejurkar

Copy link
Copy Markdown
Contributor Author

Reverted aspnetcore-mono. This PR contains aspnetcore and aspnetcore-corert changes only and those are building successfully.

@sebastienros can you please enable CI, so that at least we could see the build result?

@MichalStrehovsky MichalStrehovsky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Assuming the *.cs files are now identical between aspnetcore and aspnetcore-corert.

@MichalStrehovsky

Copy link
Copy Markdown
Contributor

@nbrady-techempower Could you please have a look? It looks good to merge if the CI passes but it needs someone's approval for the CI to run.

@MichalStrehovsky

Copy link
Copy Markdown
Contributor

@ShreyasJejurkar looks like the CI triggered.

aspcore-corert-ado-pg-up: /app/BenchmarkApplication.cs(160,37): error CS0246: The type or namespace name 'PipeWriter' could not be found (are you missing a using directive or an assembly reference?) 

Could you please make sure the C# files are identical between aspnetcore and aspnetcore-corert? My signoff is conditioned on that. I just checked manually and 12 *.cs files are different.

@ShreyasJejurkar

Copy link
Copy Markdown
Contributor Author

@MichalStrehovsky Ok let me check.

@ShreyasJejurkar

Copy link
Copy Markdown
Contributor Author

I just ran dotnet build with .NET 6 in codespaces for the core-rt project, it build successfully there!

image

@ShreyasJejurkar

ShreyasJejurkar commented Dec 2, 2021 •

Copy link
Copy Markdown
Contributor Author

I compare the files between aspnetcore and aspnetcore-corert with file compare, found only some styled changes and nothing substantial. Fixed those changes with the latest commit as well! 8f6a0a3

And both projects are building successfully with .NET 6 SDK.

@MichalStrehovsky

Copy link
Copy Markdown
Contributor

I just ran dotnet build with .NET 6 in codespaces for the core-rt project, it build successfully there!

The build failure was specific to when you specify the Database property. Vanilla dotnet build worked in the CI as well (the plaintext and json benchmarks compiled successfully).

There are still differences in 3 C# files.

Could you please just copy over all the *.cs files from aspnetcore\PlatformBenchmarks to aspnetcore-corert\PlatformBenchmarks and commit that?

@ShreyasJejurkar

Copy link
Copy Markdown
Contributor Author

@MichalStrehovsky Latest commit (7c02c52) is a result of the following command.

@ShreyasJejurkar ➜ .../frameworks/CSharp/aspnetcore/PlatformBenchmarks (net-6 ✗) $ cp --parents `find -name \*.cs` ../../aspnetcore-corert/PlatformBenchmarks

Command copies all the *.cs files from aspnetcore to aspnetcore-corert keeping directory structure!
There were 3 files modified, but with just a whitespace difference!

@sebastienros

Copy link
Copy Markdown
Contributor

@ShreyasJejurkar @MichalStrehovsky Is there still something to do on this PR?

@ShreyasJejurkar

Copy link
Copy Markdown
Contributor Author

CI has failed somehow, it's not C# code related! We can merge once CI gets green!

Please re-trigger it!

@NateBrady23

Copy link
Copy Markdown
Member

@ShreyasJejurkar Would you mind pulling in the latest master here to get this to rerun. The mysql image was busted.

@ShreyasJejurkar

Copy link
Copy Markdown
Contributor Author

on it

@ShreyasJejurkar

Copy link
Copy Markdown
Contributor Author

@nbrady-techempower Done merging main!

Thanks,

@NateBrady23
NateBrady23 merged commit 3b1a344 into TechEmpower:master Jan 28, 2022
spizm added a commit to spizm/FrameworkBenchmarks that referenced this pull request Jan 29, 2022
* master: (41 commits)
  [C#][aspnetcore] feat - Upgrade to .NET 6 LTS (TechEmpower#6914)
  Bump aiohttp from 0.16.3 to 3.7.4 in /frameworks/Python/api_hour (TechEmpower#7074)
  Salvo: Add cached query (TechEmpower#6858)
  Bump uvicorn from 0.11.3 to 0.11.7 in /frameworks/Python/apidaora (TechEmpower#7073)
  Bump jinja2 from 2.10.3 to 2.11.3 in /frameworks/Python/apidaora (TechEmpower#7072)
  Bump asyncpg from 0.20.1 to 0.21.0 in /frameworks/Python/apidaora (TechEmpower#7071)
  Bump jinja2 from 2.11.1 to 2.11.3 in /frameworks/Python/blacksheep (TechEmpower#7068)
  Bump uvicorn from 0.11.3 to 0.11.7 in /frameworks/Python/blacksheep (TechEmpower#7069)
  Bump asyncpg from 0.20.1 to 0.21.0 in /frameworks/Python/blacksheep (TechEmpower#7070)
  Bump sqlalchemy from 1.2.2 to 1.3.0 in /frameworks/Python/bottle (TechEmpower#7067)
  Bump django from 3.1.12 to 3.1.14 in /frameworks/Python/django (TechEmpower#7065)
  Bump sqlalchemy from 1.2.2 to 1.3.0 in /frameworks/Python/cherrypy (TechEmpower#7066)
  Bump werkzeug from 0.14.1 to 0.15.3 in /frameworks/Python/eve (TechEmpower#7064)
  Bump flask from 0.12.2 to 1.0 in /frameworks/Python/eve (TechEmpower#7063)
  Bump ujson from 4.0.2 to 5.1.0 in /frameworks/Python/flask (TechEmpower#7058)
  Bump jinja2 from 2.11.1 to 2.11.3 in /frameworks/Python/fastapi (TechEmpower#7059)
  Bump asyncpg from 0.20.1 to 0.21.0 in /frameworks/Python/fastapi (TechEmpower#7060)
  Bump fastapi from 0.54.1 to 0.65.2 in /frameworks/Python/fastapi (TechEmpower#7061)
  Bump sqlalchemy from 1.0.12 to 1.3.0 in /frameworks/Python/klein (TechEmpower#7057)
  Bump ujson from 4.1.0 to 5.1.0 in /frameworks/Python/routerling (TechEmpower#7031)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants