-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Enable IDE0005 analyzer in the build #47912
Comments
@eerhardt given that the SDK update was unblocked already, how urgent is this? |
Not urgent. Just know that we aren't getting the IDE0005 diagnostic working in all projects because of this.
Yes. The work is as I describe above. |
I'm seeing the same thing after updating Visual Studio for Mac as well. |
What do you mean "this analyzer"? It would be unfortunate to enable IDE0005 at warning level by default. In team use, it has been observed to increase the frequency of merge conflicts. Eventually we just turned it off in Roslyn and there appears to be no downside to leaving it that way. |
The compiler requires one of the following two states:
Note that it is trivial to meet the second requirement by using the XML If you attempt to "work around" this issue by trying to disable the
If |
If you set |
That issue was marked as fixed. If you are still using an older version of the SDK, it should be possible to update the XML file item in the build to include the expected metadata, though I'm not exactly sure where that update would need to be placed (it would have to be after the location where the SDK converts |
It may have been marked as fixed, but I’m on the latest version of 7 and it still exists. |
Still present in 17.7.2 |
Setting |
@VictorioBerra If those warnings were CS1573, CS1591, and/or CS1712, the solution is given in the very first post of this thread. If it was other warnings starting with CS, it means the project contained documentation comments containing some sort of syntax error which is almost certainly not intended. If it was another error, I would need more information to better understand. |
That's how Microsoft sees the issue: https://developercommunity.visualstudio.com/t/EnableGenerateDocumentationFile-Error/10448023?viewtype=solutions |
It is very annoying - all our projects started showing this error after updating .net sdk. I would like to have IDE0005 enabled, but I don't want to enable "GenerateDocumentationFile", as it starts generating errors in old code, plus I think generating this file will make builds slower. I don't see how IDE0005 and "GenerateDocumentationFile" are related, it should be perfectly fine to enable just one and not other. |
To keep the previous behavior we use |
Hi Patrick, Thank you! |
Hi @LiviuD, I would strongly discourage using
This is not possible today, but there is an open feature request to make it possible:
Note that this is literally the reason why the |
Thank you very much @sharwell for your suggestion. Thank you! |
Add this to a [*.cs]
dotnet_diagnostic.IDE0005.severity = suggestion The suggestions won't show up during a build/dotnet-format though. You can use |
* Replace AppVeyor build definition with GitHub workflows * Enable GitHub workflow manual trigger and introduce ability to select environment and package * Use windows agents to support old .NET Framework * Update expected dotnet version from 6 to 7 * Update analyzers * Ignore S6608 rule in tests * Address IDE0005 analyzer on the build issue: dotnet/aspnetcore#47912 * Use gitversion for automatic Versioning * Automate pushing tags when publishing packages --------- Co-authored-by: krzysztofkaczorowski <[email protected]> Co-authored-by: Krzysztof Kaczorowski <[email protected]>
@LiviuD The default severity of IDE0005 is either suggestion or hidden. The correction would need to be made in the location where IDE0005 was customized in your build to have a non-default value. |
Hi @sharwell, |
Thanks for contacting us. We're moving this issue to the |
* Replace AppVeyor build definition with GitHub workflows * Enable GitHub workflow manual trigger and introduce ability to select environment and package * Use windows agents to support old .NET Framework * Update expected dotnet version from 6 to 7 * Update analyzers * Ignore S6608 rule in tests * Address IDE0005 analyzer on the build issue: dotnet/aspnetcore#47912 * Use gitversion for automatic Versioning * Automate pushing tags when publishing packages --------- Co-authored-by: krzysztofkaczorowski <[email protected]> Co-authored-by: Krzysztof Kaczorowski <[email protected]>
I'm also having issues with this. |
See the conversation in #47540 (comment). In order to unblock updating the SDK, I needed to add
dotnet_diagnostic.EnableGenerateDocumentationFile.severity = none
to the.globalconfig
file. The new SDK was breaking the build for projects that don't haveGenerateDocumentationFile=true
.We should figure out how to enable
GenerateDocumentationFile=true
for non product assemblies.@sharwell suggested adding:
I think we should only set those
NoWarn
for non-product level assemblies. So we need to do some build logic to ensure those doc warnings still occur for product projects that have public API.More info at:
The text was updated successfully, but these errors were encountered: