-
Notifications
You must be signed in to change notification settings - Fork 5.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
Update snippets to dotnet8 #41013
Update snippets to dotnet8 #41013
Conversation
docs/core/extensions/snippets/configuration/console-basic-builder/console-basic-builder.csproj
Show resolved
Hide resolved
…ts deprecated later
Hey @IEvangelist, I have some more work to do on this and review if I hadn't updated something by mistake, but I need some guidance with the snippets build task; namely
I suppose they were removed as they were not referenced anywhere. Should I backtrack and re-add them? |
...rialization/snippets/binaryformatter-event-source/csharp/binaryformatter-event-source.csproj
Outdated
Show resolved
Hide resolved
I wouldn't re-add them, no. Perhaps remove their projects, if those aren't referenced anymore either. Thanks for doing this, looks great thus far! I viewed EVERY SINGLE change 🤣. |
I tried to remediate some Snippets 5000 issues in this commit which seems to have fixed the errors I had in the prior runs. Then I encountered a new boss: the schrödinger's solutions - they don't exist at the target location, yet they throw an error. Now I am in awe, have doubts about said commit and question my life choices. Jokes aside, I am unsure how to proceed and am open to suggestions. |
I'll investigate the snippets tool to see where that bug is. It seems it does flip out because of the deleted SLN, and not on anything actually valid. One thing to do though, the security snippets folders were moved around and their current folder structure doesn't follow our guidelines. You have:
Which is
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Snippets check should be fixed now. Once you add the commit to swap those folders around and then adjust the dependabot config, that will trigger a recheck. Thanks!
Looking... |
Ahh OK, so I think those two solution files (readded via the revert) were added before we had perfected some of our detection. There should be 0 or 1 solution files in that folder. You can put all projects in the same solution and see if that works, but in the past I've seen it complain when the projects are named the same and only the language is different. Hopefully .NET/Visual Studio has solved that problem lol. I would suggest deleting the solution files. |
Snippets are clean! Can you see the details of the OpenPublishing.Build action? |
That worked, thank you! I can re-add all the necessary files to make it build, but if detecting unused snippets is automated it would delete files again in this specific case. Alternatively, I could inline the code referred in the after regions of type forwarding. What would be the preferred approach? |
Considering how small those "after" files are, and the code doesn't really demonstrate much, I would be fine with copying that code directly into the article. |
Thanks for your help with this folks! |
Summary
Fixes #40684
Updated projects from .NET 6 & .NET 7 to .NET 8. Keeping in draft mode to review myself, but will leave a few questions.
<LangVersion>
tags/samples folder is excluded from the
versionsweeper.json
, but I think it's a good idea to update samples there as well (unless it's a specific sample for older .NET version). Maybe a new task for that?Internal previews