views:

56

answers:

2

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 time?

A: 

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

Hun1Ahpu
I have already tried Resource, Compile, None and Embedded Resource, the latter is the only one that works.
themaninthesuitcase
+1  A: 

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 or Copy if newer
Darin Dimitrov
I am trying to use My.Resources.
themaninthesuitcase
`My.Resources` is used to read embedded resources in the assembly. It is not designed to read files on the disk.
Darin Dimitrov