-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Mvc.Analyzers are no longer imported in 3.0 projects #4373
Comments
@danroth27, assigning this to you to define which way should we go here. |
I think we shoudl have a single package reference in the templates for the analyzers that we think should be enabled by default. |
FYI @davidfowl |
To summarize the discussion we had with @danroth27 and @glennc, we're moving forward with the following approach here:
|
Um what? why? |
I thought we'd said we'd look to get them integrated with the SDK? |
Spoke offline, here's the plan. We'll add ASP.NET Core analyzer binaries to the WebSdk and use the |
Doesn’t this mean that we need these packages in cache for offline storage? It also means we need a way to turn it off and change the version? And all of other things that come when you have implicit package references. |
There aren't packages - just binaries that ship in the SDK. Psuedo code: <ItemGroup Condition="$(TargetFramework) > 'netcoreapp3.0'' AND '$(DisableImplicitAspNetCoreAnalyzers)' != 'true'">
<Analyzer Include="analyzers/$(TargetFramework)/*.dll" />
</ItemGroup> |
Ahhh clever. How do you turn them off? |
We would do a flag - see updated psuedo code. |
Some thoughts as I was working on this: when we ship One way to go about this would be to do a version detection in the analyzers i.e. look for the version of AspNetCore.App \ Mvc before lighting up a change. Using |
* Add AspNetCore analyzers to Web.Sdk Fixes dotnet/aspnetcore#4373
Since these analyzers are now available via the WebSDK, we no longer need to ship these. Follow up to #4373
Since these analyzers are now available via the WebSDK, we no longer need to ship these. Follow up to #4373
As a part of #4061 and #3612, we removed Microsoft.AspNetCore.Mvc.Analyzers from Microsoft.AspNetCore.App since we do not plan to continue to ship AspNetCore.App as a metapackage. We should find a way to re-add these analyzers to netcoreapp3.0 projects.
Ideas
cc @davidfowl @pranavkm @mkArtakMSFT
The text was updated successfully, but these errors were encountered: