* Convert all possible DllImports to LibraryImport for .NET 7+
* Explicitly declare entry point on Windows P/Invokes with W suffix.
* Mark as "ref struct".
* Consume latest source generator.
* Permit unsafe blocks.
* Fixup whitespace issues from top-level statement change
The top-level statement codefix resulted in the formatting within
nested lambdas to be incorrect in a number of places. As a part of this change,
I enabled the styling diagnostic and re-ran the tool to correct these issues.
* Sync shared code from runtime
* Also exclude tests from file-scoped rules
Co-authored-by: Tratcher <Tratcher@users.noreply.github.com>
Co-authored-by: Pranav K <prkrishn@hotmail.com>
* Update templates to use file-scoped namespace declarations
* Move to SDK version that supports file-scoped namespaces
* Make CA1305 a suggestion rather than error
- New compiler now makes this appear when using a StringBuilder with string interpolation. Logged #34361 to follow up.
Contributes to #33947
* Enable build time warnings for IDE code analysis rules
* Enables build time warnings for readonly, modifier ordering and const
* Fixes all of the warnings
Contributes to https://github.com/dotnet/aspnetcore/issues/24055
A lot of the warnings for this rule appear from logging. Given this is going
to be replaced by a source generator, this change soft enables the rule while
fixing warnings that appear in non-logging code
Contributes to #24055
All rules are currently disabled, except for one that I enabled for
src/Http via a new ".editorconfig" file I added there.
Other changes:
* Allow editorconfigs in MVC and Razor to flow to the root
* Consolidate a few editorconfig settings
* Tweak Ruleset config in Azure/AzureAD where it clashed.
Addresses the beginning of #9620, but it's a fair chunk of work to
enable most rules through the whole repo. That can be done directory by
directory and rule by rule by dropping .editorconfig files though.
* Removes a bunch of trivial usage of Blazor
... in names and comments where we don't specifically mean Blazor.
* Remove obsolete Startup from Components app
* Move UseBlazor into Blazor.Server
Moves UseBlazor and the related features in Blazor.Server - along with
some other general cleanup of misc shared files.
Now Components.Server has a much slimmer set of dependencies (MVC is
gone) and doesn't contain the "double startup" pattern that we
introduced (sorry).
We'll revisit UseBlazor and the dependencies there once the new
MapFallbackToFile support is available from static files.
* minor PR feedback
* Update reference assemblies
* fix broken test
This refactors the targets used to build the shared framework and its .zip files. There are lots of reasons motivating this: Arcade convergence, migration to VSTS, making it easier to build this locally, etc.
Changes:
* Moves move content of build/Sharedfx.{props/targets} into eng/targets/SharedFx.Common.{props/targets}
* Update the build to produce a `runtime.$rid.Microsoft.AspNetCore.App` package (not just the one with symbols in it)
* Refactor the targets which produce .tar.gz/.zip files into separate projects in `src/Installers/`
* Refactor installers, unit tests, and the framework projects to use ProjectReference to flow dependencies between different parts of the build.
* Makes it easier to build the shared framework locally (for the inner dev loop, you can run `dotnet build -p src/Framework/Microsoft.AspNetCore.App/src/ -r win-x64`)