Go to file
Pranav K 1027e5372f
Use the analyzer from the SDK when available (#18885)
* Use the analyzer from the SDK when available

This prevents a build warning when building a project that contains a reference to
Microsoft.AspNetCore.Components and a netcoreapp3.0 or newer targeting Web project.

The Web SDK implicitly adds the Components.Analyzer for netcoreapp3.0 or newer targeting projects.
If the project additionally referenced this package (directly or transitively), the package would
set up a property that prevented the implicit analyzer reference. This prevented the analyzer from
being referenced twice.

There were two issues with the current approach:

a) The props file wasn't propogated via buildTransitive. Consequently transitive project references
would reference two copies of the analyzer. When these were different versions, it resulted in a compiler
warning.

b) Forward looking, this prevents newer versions of the analyzer shipped from the SDK from ever being used.
This is particularly problematic since apps are likely to reference component libraries that were previously
compiled against 3.x.

This change attempts to mitigate both of these issues:

a) We add a buildTransitive so our build targets flow
b) We knock out the analyzer added by the package if the SDK's already added it.

Fixes https://github.com/dotnet/aspnetcore/issues/18563

* Update Microsoft.AspNetCore.Components.Analyzers.targets

* Update Microsoft.AspNetCore.Components.Analyzers.targets

* Add a description

* Update Microsoft.AspNetCore.Components.Analyzers.targets
2020-02-14 08:34:23 -08:00
.azure/pipelines Merged PR 4703: [internal/release/3.1] Update dependencies from 1 repositories 2019-12-15 17:23:03 +00:00
.config
.github
.vscode
docs Mark AspNetCore projects that aren't packaged explicitly (#18767) 2020-02-13 15:51:27 -08:00
eng Mark AspNetCore projects that aren't packaged explicitly (#18767) 2020-02-13 15:51:27 -08:00
src Use the analyzer from the SDK when available (#18885) 2020-02-14 08:34:23 -08:00
.editorconfig
.gitattributes
.gitignore
.gitmodules
CONTRIBUTING.md
Directory.Build.props Use checked-in platform manifest in 3.1.2 (#18250) 2020-01-15 11:01:16 -08:00
Directory.Build.targets Mark AspNetCore projects that aren't packaged explicitly (#18767) 2020-02-13 15:51:27 -08:00
LICENSE.txt
NuGet.config [release/3.1] Update dependencies from dotnet/efcore dotnet/aspnetcore-tooling (#18434) 2020-01-18 09:17:26 -08:00
README.md
SECURITY.md
THIRD-PARTY-NOTICES.txt
activate.ps1
activate.sh
build.cmd
build.ps1 Merged PR 4703: [internal/release/3.1] Update dependencies from 1 repositories 2019-12-15 17:23:03 +00:00
build.sh Merged PR 4703: [internal/release/3.1] Update dependencies from 1 repositories 2019-12-15 17:23:03 +00:00
clean.cmd
clean.ps1
clean.sh
dockerbuild.sh
global.json Merge branch 'release/3.1' into merge/release/3.0-to-release/3.1 2019-12-11 20:03:03 -08:00
restore.cmd
restore.sh
startvs.cmd

README.md

ASP.NET Core

ASP.NET Core is an open-source and cross-platform framework for building modern cloud based internet connected applications, such as web apps, IoT apps and mobile backends. ASP.NET Core apps can run on .NET Core or on the full .NET Framework. It was architected to provide an optimized development framework for apps that are deployed to the cloud or run on-premises. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions. You can develop and run your ASP.NET Core apps cross-platform on Windows, Mac and Linux. Learn more about ASP.NET Core.

Get Started

Follow the Getting Started instructions in the ASP.NET Core docs.

Also check out the .NET Homepage for released versions of .NET, getting started guides, and learning resources.

How to Engage, Contribute, and Give Feedback

Some of the best ways to contribute are to try things out, file issues, join in design conversations, and make pull-requests.

Reporting security issues and bugs

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

These are some other repos for related projects:

Code of conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.