Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource 'moonwallpaper.bmp' not found! #3111

Closed
powerty989 opened this issue Dec 9, 2024 · 4 comments
Closed

Resource 'moonwallpaper.bmp' not found! #3111

powerty989 opened this issue Dec 9, 2024 · 4 comments

Comments

@powerty989
Copy link

Have you checked Github Issues for similar errors?
yes
Exception
Exception: System.Exception: Resource 'moonwallpaper.bmp' not found!

Visual Studio Output Logs
Exception: System.Exception: Resource 'moonwallpaper.bmp' not found!
Loading plugs from assembly: Cosmos.Core_Asm, Version=10.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983
Loading plugs from assembly: Cosmos.Core_Plugs, Version=10.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983
Loading plugs from assembly: Cosmos.Debug.Kernel.Plugs.Asm, Version=10.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983
Loading plugs from assembly: Cosmos.System2_Plugs, Version=10.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983
Invalid plug method! Target method not found. : A0SystemObjectA2CosmosCore_PlugsSystemActivatorImplCreateInstanceA2CosmosCoreCosmosRuntimeTypeA0SystemBooleanA0SystemBoolean
Invalid plug method! Target method not found. : A0SystemInt64A3CosmosSystem_PlugsSystemIOOSFileStreamStrategyImplSeekA0SystemInt64A0SystemObject
Invalid plug method! Target method not found. : A0SystemVoidA3CosmosSystem_PlugsSystemIOStreamWriterImplWriteFormatHelperA0SystemStringA0A0SystemObjectarrayA0SystemBoolean

How To Reproduce
public static VBECanvas canvas = new VBECanvas(new Mode(800, 600, ColorDepth.ColorDepth32));
[ManifestResourceStream(ResourceName = "moonwallpaper.bmp")] public static byte[] moon_image;
public static Bitmap bmp = new Bitmap(moon_image);
[ManifestResourceStream(ResourceName = "cursor.bmp")] public static byte[] cursor;
public static Bitmap curs = new Bitmap(cursor);

Context
Before posting please confirm that the following are in order
[] Both Cosmos VS Extensions are installed
[ ] In the NuGet Package Manager "Include prerelease" is selected
[ ] The Cosmos NuGet package store is selected (NOT nuget.org) in 'Manage NuGet Packages'
[ ] The Cosmos NuGet packages are installed

Add any other context about the problem which might be helpful.

When i try to build my project it outputs this error, i tried changing it to embed resource already, still not working

@Szymekk44
Copy link
Contributor

Szymekk44 commented Dec 9, 2024

You have to give it full path.

[ManifestResourceStream(ResourceName = "YourProjectName.Folder.File.txt")] public static byte[] ...

for example

[ManifestResourceStream(ResourceName = "Waterfall.Resources.Fonts.PSF.zap-ext-light16.psf")] public static byte[] zap_ext_light16;

@powerty989
Copy link
Author

You have to give it full path.

[ManifestResourceStream(ResourceName = "YourProjectName.Folder.File.txt")] public static byte[] ...

for example

[ManifestResourceStream(ResourceName = "Waterfall.Resources.Fonts.PSF.zap-ext-light16.psf")] public static byte[] zap_ext_light16;

What if i didn't put them in any folders?

@Szymekk44
Copy link
Contributor

@9xbt
Copy link
Contributor

9xbt commented Dec 13, 2024

You have to give it full path.
[ManifestResourceStream(ResourceName = "YourProjectName.Folder.File.txt")] public static byte[] ...
for example
[ManifestResourceStream(ResourceName = "Waterfall.Resources.Fonts.PSF.zap-ext-light16.psf")] public static byte[] zap_ext_light16;

What if i didn't put them in any folders?

then you haven't put the file anywhere

@MishaProductions MishaProductions closed this as not planned Won't fix, can't repro, duplicate, stale Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants