When setting up a minimal .NET Console application and changing TargetFramework to net6.0-macos and trying to get a list of windows or displays, the application hangs on awaiting the result of GetShareableContentAsync method.
The "same" code works in a minimal Swift xcode project.
Simply clone and run dotnet restore followed by starting it in Visual Studio or Rider. When running the same dotnet code in the Terminal, no output is given at all, neither "Hello world!" nor a list of applications, nothing. The application also hangs in the Activity Monitor and needs to be quit from there (I guess that is because of the awaiting the results of GetShareableContentAsync).
@icanos can you please re-open this issue under the repository that owns this feature, unfortunately we cannot transfer it to the xamarin org:
https://github.com/xamarin/xamarin-macios
Description
When setting up a minimal .NET Console application and changing TargetFramework to net6.0-macos and trying to get a list of windows or displays, the application hangs on awaiting the result of GetShareableContentAsync method.
The "same" code works in a minimal Swift xcode project.
Here is the code I'm running, when running using the debugger in Rider, I get "Hello world!" and then nothing more. https://github.com/icanos/screencapturekit-issue
Simply clone and run
dotnet restore
followed by starting it in Visual Studio or Rider. When running the same dotnet code in the Terminal, no output is given at all, neither "Hello world!" nor a list of applications, nothing. The application also hangs in the Activity Monitor and needs to be quit from there (I guess that is because of the awaiting the results of GetShareableContentAsync).When running this code, I get "Hello, World!" followed by a complete list of windows: https://github.com/icanos/screencapturekit-swift
Configuration
Other information
Output of my
dotnet --info