Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Error With Resources And Codedom - Resources is not a member of My

I am using some Ethernals Codeom Compiling class and there is an option for me to add a resource to the program that is being compiled. When I try to write the resource file onto the disk I get the following error:
Code
Resources is not a member of My

This is the code that I am using to write the file:
Code
File.WriteAllBytes("C:\Plugin.dll", My.Resources.Plugins)
[Image: giphy.gif]
You need to reference the library Microsoft.VisualBasic.dll. But I wouldn't really do that, just write your own resource function to extract resource data by name. It's actually pretty easy, do a little searching and you can find it.
(May 17, 2013 05:01 PM)tweety Wrote:  You need to reference the library Microsoft.VisualBasic.dll. But I wouldn't really do that, just write your own resource function to extract resource data by name. It's actually pretty easy, do a little searching and you can find it.

I am using Ethernals compiler class and I added this:
Code
Compiler.References = {"Microsoft.VisualBasic.dll"}

Am I doing it wrong because I am getting the same error.
[Image: giphy.gif]
(May 17, 2013 05:08 PM)FatBurrito Wrote:  I am using Ethernals compiler class and I added this:
Code
Compiler.References = {"Microsoft.VisualBasic.dll"}

Am I doing it wrong because I am getting the same error.

I think you need to add something on the Compiler options as well, I'm not familiar with dealing with the My Namespace using CodeDOM. It will be better if you just write your own function to return a resource instead. You won't have the bulky My Namespace.
OP, have you fixed the issue? I am having the same problem right now.
L2Search.

https://hackforums.net/showthread.php?tid=836316


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by sara_221540Jun 27, 2020 11:08 AM 4 172 Jun 27, 2020 11:08 AM
Last Post: Anemone¹
[.NET] by CacheIsAFagOct 21, 2017 08:55 AM 0 98 Oct 21, 2017 08:55 AM
Last Post: CacheIsAFag
[C#] by NimrodSep 18, 2017 01:06 PM 11 263 Sep 18, 2017 01:06 PM
Last Post: Nimrod