How do I include an xml file to my setup?

T

trant

I use an xml file in a Windows Service to allow certain configuration.

I expect this xml file to be in the same working directory as the service's
executable. The setup should know to place this xml file there but I cannot
seem to figure out how to do this.

I tried adding it to the Install of Custom actions but when I browsed for my
xml file it rejects it saying it is invalid type.

What is the "proper" way to do this?
 
F

Family Tree Mike

trant said:
I use an xml file in a Windows Service to allow certain configuration.

I expect this xml file to be in the same working directory as the service's
executable. The setup should know to place this xml file there but I cannot
seem to figure out how to do this.

I tried adding it to the Install of Custom actions but when I browsed for my
xml file it rejects it saying it is invalid type.

What is the "proper" way to do this?

I've done this with windows forms apps, and presume it is the same for
services. Add the xml file to the service project, and set the build action
property to content. In your setup and deployment project, in addition to
adding the project output from the service project, add the project content
from the service project. It then adds this file to the install setup.

Mike
 
T

trant

Thanks for your help!

Yeah I was trying to do it in the wrong section of the setup! I shouldn't be
doing it in the Custom Actions, but in the more general area that has File
System.

Now it works great!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top