In Visual studio 2008 is it possible to have a resource file that is included as a separate file after compilation rather than as an embedded resource. This is to enable small changes to be rolled out more easily.
I have tried build options of Resource, None, Compile and also copy local on and off for most of these. However when ever I try access the resource at run time I get a cannot find resource exception.
Is this actually possible or am I wasting my ti开发者_高级运维me?
How are trying to access this resource? If you set the copy local to true you could read it as a simple file:
var contents = File.ReadAllBytes("somefile");
- Build Action:
Content
- Copy to Output Directory:
Copy always
orCopy if newer
Try Content option. With this option the file is not compiled, but is included in the Content output group
Take a look on File Properties
精彩评论