'How do i use Ressources embedded into the application without visual studio

I have a GUI project using winforms, and want to use some icons inside it. I don't use Visual Studio for this, but build it with dotnet cli. While it is working when they are loaded from seperate files, i want them inside the executable as a resource. I added the whole folder via this entry in the csproj:

<EmbeddedResource Include="Resources\*.png" />

But how would i reference them and e.g. load them into an Image object? All examples i have found are using the GUI of Visual studio for it.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source