Solved

Mobile application configuration file

Posted on 2011-03-24
1
300 Views
Last Modified: 2013-12-27
Hello,

I want to application configuration file to my mobile device application developed with Visual C# 2008. The file can be XML or TXT. How can I add this file type and force Visual Studio 2008 to deploy it with application executable? Whhat will be the path to access this file from code?

Platform: Windows 6.1, dorNet CE 3.5
0
Comment
Question by:smetechit
1 Comment
 
LVL 24

Accepted Solution

by:
alexey_gusev earned 500 total points
Comment Utility
- mark it as "Content" in file properties and also select one of the "Copy ..." options

- for the path to the file, it is copied to the same folder as your binaries, so you can do as in the code snippet

public string GetFullPath(string filename)
{
    string appDir = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);

    return System.IO.Path.Combine(appDir , filename);
}

Open in new window

0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator (https://www.appcelerator.com/). This article presumes a wor…
You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now