Target OS and Target OS version must be set for Windows.
Can't using Windows.Devices.Bluetooth namespace in worker service based application
longevity uyl
285
Reputation points
I created a new worker service base application project named WorkerService1. And then I updated Program.cs as follows. But Visual Studio Community 222 build failed with "CS0246 can't find namespace Windows".
using WorkerService1;
using Windows.Devices.Bluetooth;
var builder = Host.CreateApplicationBuilder(args);
builder.Services.AddHostedService<Worker>();
var host = builder.Build();
host.Run();
Developer technologies | Visual Studio | Other
5,451 questions
Developer technologies | C#
11,570 questions
Accepted answer
-
gekka 12,206 Reputation points MVP Volunteer Moderator
2023-12-22T03:55:36.4833333+00:00