M
Marcus Ahlberg
I've been coding a C# project in "pure code" and I would now want to import
it into VS.net. I have created a project and imported all sourcefiles and
it's compiling without problems, except for the resources. Before, I built
the program using a batchfile and linked the resources with the
"/resource:MainFrame.resX" option. Then I loaded them with this code:
Assembly myAssembly = Assembly.GetAssembly(this.GetType());
Stream resXStream =
myAssembly.GetManifestResourceStream("MainFrame.resX");
ResXResourceSet resX = new ResXResourceSet(resXStream);
The problem is the way VS manages resources. It can't find MainFrame.resX
and i get an error because resXStream = null. I've tried to change the
"Build Action" -property of the files, but it doesn't seem to make any
difference. It's the same problem with images. Is there any way to change
the way the resources is included? I don't want to rewrite the whole program
because of incompability between VS and the compiler.
it into VS.net. I have created a project and imported all sourcefiles and
it's compiling without problems, except for the resources. Before, I built
the program using a batchfile and linked the resources with the
"/resource:MainFrame.resX" option. Then I loaded them with this code:
Assembly myAssembly = Assembly.GetAssembly(this.GetType());
Stream resXStream =
myAssembly.GetManifestResourceStream("MainFrame.resX");
ResXResourceSet resX = new ResXResourceSet(resXStream);
The problem is the way VS manages resources. It can't find MainFrame.resX
and i get an error because resXStream = null. I've tried to change the
"Build Action" -property of the files, but it doesn't seem to make any
difference. It's the same problem with images. Is there any way to change
the way the resources is included? I don't want to rewrite the whole program
because of incompability between VS and the compiler.