Open
Description
Tool
Visual Studio extension
Description
Adding Images of the type .bmp , .gif and .jpg as resources make the VS solution uncompilable.
Error CS0234 The type or namespace name 'UI' does not exist in the namespace 'nanoFramework' (are you missing an assembly reference?):
If you play around and practice long enough with deleting and different kinds of adding another error message appears:
The resource System.Drawing was automatically added to the project. Compiling is only possible again once this has been deleted.
How to reproduce
- I am creating a new Blank Application Solution.
- add nanoFramework.ResourceManager as NuGet Package
- add a new Resource File (.NET nanoFramework) to the project
- add some Files (Images: .png, .pcx, .tif and Sound: .wav) to the Resource1.resx (per drag and drop or manuell, makes no difference). The pcx is not recognized as an image (works fine anyway)
- I compile the project. No problem everything perfect.
- Now I add more pictures (.bmp, .gif, .jpg)
- Now the project can no longer be compiled!
My example (before and after the error):
NFImageResscources_working.zip
NFImageResscources_notworking.zip
Expected behaviour
- it would be nice if adding a Resource.resx automatically adds the nanoFramework.ResourceManager reference.
- nanoFramework.UI.Bitmap should be available. Or images should be added as normal files (BinaryResources instead of BitmapResources). Nobody wants to edit images in VS, anyway!
Screenshots
No response
Aditional context
Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.4.4
.NET nanoFramework VS Extension v2022.3.0.18