A: 

Have you tried setting the build action to None?

Ikaso
thanks for the suggestion, but that doesn't seem to work.
Ben McCormack
I have tried the same scenario in VS2010 Beta 2 and it works. Seems like a bug in the express edition.
Ikaso
+1  A: 

It seems to work also in Visual Studio 2008 Team System - must be Expression edition specific, so cannot repro...

OK, my original guess was not true - it is about XML file being in the referenced library. Can repro it now.

I think the most natural way would be to embed the XML as resource and then read it with GetManifestResourceStream(). This way, the XML file would follow your dll as you reference it without copying it separately even if you reference the dll directly and not through project reference.

...or then you could use Pre-build event? (Project properties - Build Events):

copy $(ProjectDir)test.xml $(SolutiontDir)projectFolder\bin\debug\test.xml

I would think it will always run even if VS thinks no source files have changed. At least in full VS2008 this is the case - just tested.

Ope
It might have something to do with the fact that the "schemas" folder is part of *LogicParser*, whereas Program.cs, the class from which `LogicSchema` is being instantiated, is in *LogicParser.ConsoleApp*.
Ben McCormack
True: I was too lazy to do the separate class library when I tested this. Did it now and it happens in the full version of Visual Studio as well. So not Expression edition specific.So I suppose your options are to add the pre-build event with $(SolutionDir) or then embed the xml as resource and read it with GetManifestResourceStream(). I think the latter is better - if you are creating a dll, it would be nicer if you can use it by referencing it without adding other (xml) files.
Ope