1

For some reason, I can't find "BackroundWorker". It should be under Components but I cannot find it. I have updated my Visual Studio to the latest version and my project type is windows forms apps (.NET core)

Proof my BackgroundWorker isn't there:

Proof my BackgroundWorker isn't there

  • I'm not sure if [this](https://stackoverflow.com/a/41882980/8967612) will work for WinForms, but really you should use tasks and `async/await` instead. See [this amazing blog post](https://blog.stephencleary.com/2013/05/taskrun-vs-backgroundworker-intro.html) by Stephen Cleary for guidance on how to migrate from BackgroundWorker to `Task.Run()`. – 41686d6564 stands w. Palestine Oct 29 '20 at 02:53
  • Im in my repository folder right now and I don't even see my project.json file, sorry if I'm really new, im just trying to follow a basic tutorial as one of my first projects – Parker Prindle Oct 29 '20 at 03:01
  • One of the reasons could be that the component is named `BackGroundWorker`, not `BackroundWorker`. You also need to have the Designer of a Form opened. – Jimi Oct 29 '20 at 03:07
  • Is that tutorial for .NET Core or .NET Framework? – 41686d6564 stands w. Palestine Oct 29 '20 at 03:08
  • @Jimi that was not the problem haha sorry I spelled it wrong for the screenshot – Parker Prindle Oct 29 '20 at 03:09
  • Hmm, @41686d6564 actually now that I look back I see that it was .NET framework, but I only saw .NET core so I assumed it was the same thing. – Parker Prindle Oct 29 '20 at 03:10
  • You spelled it wrong also in the body of the question. Consider what @41686d6564 told you in the first comment. Tasks + `IProgress` work very well and it's as simple as a BGW. – Jimi Oct 29 '20 at 03:11
  • I think the problem may be that I'm using .NET Core instead of the .NET framework how can I get .NET framework? I don't see it when I open a new project – Parker Prindle Oct 29 '20 at 03:13
  • @Jimi ill check Tasks + IProgress out – Parker Prindle Oct 29 '20 at 03:13
  • A few simple examples and some notes [here](https://stackoverflow.com/a/62449011/7444103) – Jimi Oct 29 '20 at 03:18
  • If you're willing to learn a more modern approach for running background tasks, refer to my first comment. If you have to follow this tutorial for some reason, then yes, you should target .NET Framework. I'm not sure if VS can be installed without .NET Framework (if so, you probably would've had to manually unselect it). Perhaps just the template is missing. If you can't find `Windows Forms Application` when starting a new project, you might need to click on the `Install more tools and features` link. – 41686d6564 stands w. Palestine Oct 29 '20 at 03:20
  • Thanks so much for the suggestions! I think I need to learn more basics of c# and Vs before I try anything else. I will make sure to refer back to this when I need it though Thank you both tons! – Parker Prindle Oct 29 '20 at 03:30
  • Is there any way I can leave a rep or upvote your solution? This was super helpful – Parker Prindle Oct 29 '20 at 03:31

0 Answers0