Skip to content

Do not use obsolete constructor #1247

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

Closed
wants to merge 3 commits into from
Closed

Conversation

kant2002
Copy link

@kant2002 kant2002 commented Dec 8, 2021

Fixes #153

@kant2002
Copy link
Author

kant2002 commented Dec 8, 2021

It seems to be issue with DotnetDocsTools.LocateProjects which does not set <UseWPF>true</UseWPF> for .NET 6 projects

@adegeo
Copy link
Contributor

adegeo commented Jan 5, 2022

@kant2002 Thank you for contributing to the docs! We have requirements to code edits that must be addressed, and it fixes those errors the LocateProjects tool is giving you.

First, the repo is split into two areas: .NET Framework and everything else. The article referenced in the issue is a .NET Framework article and thus the code would be written for .NET Framework, not upgraded to .NET 6.

Second, our repo has been redesigned and the .NET Framework code you're working with is an older design from 10+ years ago. With fixing code from these old articles, the code being referenced lives in the dotnet-desktop-guide\samples\snippets\ folder, which is the old-old-old snippet framework. We've upgraded our design to be a lot more cleaner, and when we edit code here it needs to be migrated out of that old dotnet-desktop-guide\samples\snippets\ folder and into a new folder along side the article itself. This structure is documented at https://docs.microsoft.com/en-us/contribute/dotnet/dotnet-contribute#example-folder-structure I'll explain it though to save you time from reading that article, but if it sounds confusing, check out the article because it gives some examples.

In this case the article referencing the code you edited is framework/wpf/advanced/how-to-draw-text-to-a-control-background.md. It's parent folder, framework/wpf/advanced, needs to have (if it doesn't exist) a set of child folders for the code to be migrated to. this is in the following format: snippets/article-name giving you a folder of framework/wpf/advanced/how-to-draw-text-to-a-control-background/. In here a csharp and vb folder is created and the project code is put in there and modified to fix the issue. You end up with two final folders for the code to live in:

framework/wpf/advanced/how-to-draw-text-to-a-control-background/csharp
framework/wpf/advanced/how-to-draw-text-to-a-control-background/vb

@adegeo adegeo added the needs-more-info Needs more info from OP. Auto-closed after 2 weeks if no response. [org][resolution] label Jan 5, 2022
@adegeo
Copy link
Contributor

adegeo commented Jan 21, 2022

I'll close this for now. If you get a chance to get back to this, feel free to reopen this. Thanks again!

@adegeo adegeo closed this Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-more-info Needs more info from OP. Auto-closed after 2 weeks if no response. [org][resolution]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Example uses obsolete API
2 participants