Skip to content

Conversation

DickBaker
Copy link
Contributor

VS shows squigglies on these 3x CS samples [and probably many others cf. #35172]

@dotnet-bot dotnet-bot added this to the August 2023 milestone Aug 13, 2023
@ghost ghost added the community-contribution Indicates PR is created by someone from the .NET community. label Aug 13, 2023
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @DickBaker

Overall this is good. I added one suggestion. In addition, can you add a default csproj file so that these samples are run through our CI build system.

After that's done, I'll :shipit:

@BillWagner
Copy link
Member

Hi @DickBaker

Can you make the suggested updates?

@DickBaker
Copy link
Contributor Author

sorry Bill I took my eye off this one (hoping that amateur [me] could leave it with the pros!).

more significantly I thought that a large number of samples might be NRT-vintage, and that I might be opening a can of worms
"When you're up to your neck in alligators, it's hard to remember that your initial objective was to drain the swamp"

Substitute Pandora's box if you prefer that analogy and think my comment too rude

your move Moriarty !

@BillWagner
Copy link
Member

@DickBaker

more significantly I thought that a large number of samples might be NRT-vintage

That's probably true. What we've been doing is similar to this PR: Whenever we update a sample, we enable NRT, and fix any warnings. That's why it helps to have the csproj files in place as well. (Historical note: Before moving to GitHub, the samples were stored in an internal system, and the migration tool only pulled the code that was displayed in an article, not the full sample that compiled. That's why some of the oldest samples don't have project files and fail the CI build)

@DickBaker
Copy link
Contributor Author

OK I'm game to give a punt to satisfying your if{} rules and create .csproj files so far having difficulty with ConnectionStringSettingsCollection so I will need to find assemblies to satisfy dependencies so your CI doesn't reject CSC/build fails.
But wife calls me to dinner so don't hold your breath. Sure you're busy on the v8 GA stuff to bother with ancient ADO, so I'll try.

Dick Baker and others added 3 commits November 5, 2023 09:17
DataWorks DataSet.Merge has a DataSet.ReadXml overload warning
but all projects should compile and comply with Bill's CI gates
@DickBaker
Copy link
Contributor Author

DickBaker commented Nov 5, 2023

Bill/David Hi ! As I suspected this ADO swamp was "alligators all the way down" but I persevered to crank out all missing *.csproj and bludgeon errors out of *.cs so compiles happily (under a VS .sln umbrella and minor editorconfig fiddle).
However the snippets5000 build process barfed with error below. Rather than me re-inventing wheels / fighting bots I hope you will know how to get it over the PR-line (or advise me how to poke it if needs to be me).

I spent [far] too long pushing the water uphill, but I hope you will make good use to spuce up this unfashionable neighbourhood (ADO). Please let me know if/when you get to look at it [yes I know .NET-8 GA takes precedence!].

Cheers, Dick

Output all items found, grouped by status...
ERROR: Too many projects found. A single project or solution must exist in this directory or one of the parent directories.
Error: ERROR: Too many projects found. A single project or solution must exist in this directory or one of the parent directories.

Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @DickBaker

Wow, you did a lot here.

The good news is that fixing the CI build will be pretty simple. I had suggestions for those.

I also reviewed the code changes, and all those look good, so once we have a clean CI build, I'll merge this.

Thanks again for all the work here! We really appreciate it! 🎆

@@ -0,0 +1,74 @@
# editorconfig.org
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this file from the PR.

Honestly, I think it mostly matches the global styles, but we'd rather not have to review multiple sources of truth. There's a global editorconfig in the root of the repo, and two others for the special case of turning on all code analysis rules in one area.

Otherwise, we expect all samples to follow the general guidelines.

@BillWagner
Copy link
Member

Hi @DickBaker

If you check the box that says "allow edits by maintainers", I'll make the final changes to this PR and merge it.

BillWagner and others added 6 commits November 20, 2023 13:37
Run snippets 5000 for PR
https://github.com/dotnet/docs/actions/runs/6934430988/job/18862504635?pr=36663#step:6:1389
😭 Compile targets with unresolved issues:
  D:\a\docs\docs\samples\snippets\csharp\VS_Snippets_ADO.NET\DP LINQ to DataSet Examples\CS\LINQtoDataSetExamplesCS.csproj
  D:\a\docs\docs\samples\snippets\csharp\VS_Snippets_ADO.NET\DataWorks SqlClient.CAS\CS\Project.csproj
  D:\a\docs\docs\samples\snippets\csharp\VS_Snippets_ADO.NET\DataWorks SqlDependency.AspNet\CS\Project.csproj

so I deleted those 3 projects [that I had unloaded locally in my VS, but files still in PR to break CI]
- well, still contributing 50+ projects, so Bill/David can fix those 3 (or retire them)

you probably still won't like DataWorks DataSet.Merge with CA5366 but you can nuke that too if bothersome
- BTW "allow edits by maintainers" has always been checked

Otherwise I'm happy with Bill's commits yesterday, so you have the wheel to drive this over the line!
Run dotnet/docs-tools/actions/status-checker@main

so I've dropped that project too (leaving 4 to your senior magic)
- hope this gives a clear round with remaining 53 projs
…iously unloaded so SYSLIB0003 coughed on

'SqlClientPermission' is obsolete: 'Code Access Security is not supported or honored by the runtime.'
'PermissionState' is obsolete: 'Code Access Security is not supported or honored by the runtime.'

hence have nuked that project too [bummer] and trying again
@DickBaker
Copy link
Contributor Author

DickBaker commented Nov 21, 2023

I had trashed various projects that failed to build, i.e. files

  • .csproj (that I had invented anyway)
  • source.cs or project.cs (legacy code that now fails at CSC/analyzer so spat out by CI)

so now of course the various *.md doc files (with refs to those hoary .cs files) now bleat "not found". Rats!

I could reconstitute those .cs files for those .md files to reference
but leave deleted those .csproj files (might incur Bill's "add a default csproj file so samples run through CI build" inf-loop)

however I think I have gone as far as I can, and passing the baton to Bill/David to decide whether to keep/drop docs to cr@p code

  • over to the cavalry to fight the rest of the war - best of luck fellahs!
  • and I'll go back to reading a borrowed copy of David's "Learning Blazor"

@BillWagner BillWagner mentioned this pull request Nov 22, 2023
@BillWagner
Copy link
Member

Closing in favor of #38401

There was a bit too much to do in the interactive editor, so I built a new PR on top of this one.

@BillWagner BillWagner closed this Nov 22, 2023
@DickBaker
Copy link
Contributor Author

yup, happy that YOU reinvented bunch of WinForms .NET4.8 etc stuff [that I'd mostly forgotten]. Seems that #38401 is still chewing on "Run dotnet/docs-tools/actions/status-checker@main" for 2hrs 41min as I write this, but hopefully will eventually resolve successfully to improve the ADO.NET story. Fair warning I'm looking at LINQ next !

@BillWagner
Copy link
Member

@DickBaker

Fair warning I'm looking at LINQ next !

I'm glad that you intend to continue helping us improve. My one request is to make more, smaller PRs. It will be a lot easier to review and merge them. Thanks.

@DickBaker
Copy link
Contributor Author

in case you haven't already spotted it the new [much simpler!] improvement is PR 38457 (successfully passed CI steps)
and no new .csproj files created/needed, so hope you/David suffer no extra indigestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution Indicates PR is created by someone from the .NET community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants