views:

67

answers:

2

How can I make a project file (VS 2008) that just has some data files in and has no built output?

I can make an empty project and add my data files to it (which get copied to the output folder ), but it produces an EmptyProject.dll after I do a build. I want just my data files in the output directory and not some empty DLL or EXE.

I want the data files to be the only thing in this project as the project will be shared in a couple of solutions.

Our application is C#. All of our normal code projects are C#.

The data files are schemas (XSD). I want these schemas to be in the output folder, but I don't want them included with an existing project. I would like a project named "Schemas" that has nothing in except the XSD files and does nothing except copy the XSD files to the output folder. I would like this in a project file so that the same schemas project can be referenced in multiple solutions.

A: 

What do you need a project for if you're not building it?

  1. You can use solution folders to "store" files...
  2. Why not just disable building this project for all configurations (use the Configuration Manager) - that way it won't build.
Assaf Lavie
A: 

I don't know of a way to suppress the creation of the .dll file. BUT... here's an easy workaround. In the project properties, Build Events tab, write a Post-build event command line that will delete the file. Something like:

del path\filename.dll

Scott Ewers
I thought of that, but I would guess that deleting the output would make the project build every time the solutions was built. not horrible, but not very elegant either.
NascarEd