Deploying XML

J

JezB

I've added an XML file to my project, with data in it, but when I BUILD the
project the xml file seems to be compiled into the executable or one of the
DLLs. I want the XML file itself placed into the assembly so that when
deployed it can be edited by the end-users - a kind of application
configuration file. The various "Build Action" property values of the xml
file seem to have no effect. Could anyone help me on this ?
 
E

EMonaco

JezB,

Highlight the XML config file in the Solution Explorer, In properties,
there is a "Build Action" property, I would guess since this is a config
file and you do not wish it to be included/embedded in your assembly that
you'd ensure the build action is set to "None". Alternatively, you can
remove the XML file from the solution and just add select is as a file to be
included in your deployment solution.


Regards,
Erin.
 
E

EMonaco

JezB,

Sorry, I misread your post. When I wanted to have configuration settings
that the user could adjust and I could persist in my .NET apps I asked
around and was informed that including these in the assembly would mean that
my program could not modify them. (ala: they would be read only) I ended up
creating a settings class and serializing to/from a seperate XML file. I
assumed thats what you were trying to do. I for one would love to be able to
include these types of things in the assembly so deployment could be as
simple as copying over 1 file! So if it CAN be done- I'd love to know how
too.


Regards,
Erin.
 
E

Elizabeth Newman [MS]

You could also set the BuildAction to 'Content' and include the Content Group in your setup project.

--------------------
 
J

JezB

It can only be done via a Deployment project ? I was hoping that it would
work during the normal build process.

Elizabeth Newman said:
You could also set the BuildAction to 'Content' and include the Content Group in your setup project.

--------------------
From: "EMonaco" <[email protected]>
References: <[email protected]>
Subject: Re: Deploying XML
Date: Mon, 29 Mar 2004 19:13:13 -0500
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups:
microsoft.public.dotnet.framework,microsoft.public.dotnet.framework.windowsf
orms
NNTP-Posting-Host: bgp01114046bgs.westln01.mi.comcast.net 68.42.93.214
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:64632
microsoft.public.dotnet.framework:68342
 

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