What the MyApplication.application file?

A

Author

This is regarding VS2005-generated files.

I've searched a little and found out that *.vshost.* files are VS2005
generated for debugging purpose and should not be published to the end
user. However, it's sorta hard to dig out any article about the
MyApplication.application file.

(Think about what you'll get if you search for "visual studio 2005
application file". I even searched for "visual studio 2005 generated
files", but still could not get any).

(1) So, can any guru here please explain what it is?

(2) BTW, I don't think MyApplication.application and
MyApplication.exe.manifest should be published to the end user,
correct?

Another question: I have App.config for my console application. After
I compile, VS-2005 generates MyApplication.exe.config, which is the
same as App.config.

But, to deliver MyApplication to the end user, I would like the config
file to be something like config.xml or MyApplication.config.

(3) So, how can I change the file name and not crash the application?

Thank you.
 
I

Ignacio Machin ( .NET/ C# MVP )

This is regarding VS2005-generated files.

I've searched a little and found out that *.vshost.* files are VS2005
generated for debugging purpose and should not be published to the end
user.  However, it's sorta hard to dig out any article about the
MyApplication.application file.

(Think about what you'll get if you search for "visual studio 2005
application file".  I even searched for "visual studio 2005 generated
files", but still could not get any).

(1)  So, can any guru here please explain what it is?

(2)  BTW, I don't think MyApplication.application and
MyApplication.exe.manifest should be published to the end user,
correct?

Another question: I have App.config for my console application.  After
I compile, VS-2005 generates MyApplication.exe.config, which is the
same as App.config.

But, to deliver MyApplication to the end user, I would like the config
file to be something like config.xml or MyApplication.config.

(3) So, how can I change the file name and not crash the application?

Thank you.

why you want an especific name?
That file is not intended to be used by th user.
 
A

Author

why you want an especific name?
That file is not intended to be used by th user.- Hide quoted text -

- Show quoted text -

Thank you. But, are you talking about MyApplication.exe.config file
or MyApplication.application file?
 
J

Jeff Winn

I've searched a little and found out that *.vshost.* files are VS2005
generated for debugging purpose and should not be published to the end
user. However, it's sorta hard to dig out any article about the
MyApplication.application file.

I usually just turn off the vshost process. As for the
MyApplication.application file you're seeing, I don't have any idea what
you're talking about there. It's a bit too late for me to start researching
what it's for as well.
(2) BTW, I don't think MyApplication.application and
MyApplication.exe.manifest should be published to the end user,
correct?

I'm pretty sure the manifest is usually embedded within the application
resources somewhere. Check your project properties, I believe there's
something on the general settings for the project that deals with the
manifest file.
Another question: I have App.config for my console application. After
I compile, VS-2005 generates MyApplication.exe.config, which is the
same as App.config.

But, to deliver MyApplication to the end user, I would like the config
file to be something like config.xml or MyApplication.config.

(3) So, how can I change the file name and not crash the application?

You won't be able to change the name of that file and have everything still
work properly. When the appdomain is loaded that your executable gets hosted
in - the .NET framework sets the name of the configuration file it's
supposed to look for automatically. Unless you're managing the appdomain
your application is running in yourself you won't have any choice in the
matter about the file name. This is completely normal for .NET applications,
we all use them. I wouldn't worry too much about it. Eventually you'll learn
to love the config files, sure beats the heck outta those old ini files we
all used to deal with.

However, if you really want the config stored in a different filename -
write the xml file yourself and don't use the app.config file. Though you
won't have access to anything in the
System.Configuration.ConfigurationManager class which a lot of the other
pieces of .NET use to access configuration information.
 
M

Morten Wennevik [C# MVP]

Author said:
This is regarding VS2005-generated files.

I've searched a little and found out that *.vshost.* files are VS2005
generated for debugging purpose and should not be published to the end
user. However, it's sorta hard to dig out any article about the
MyApplication.application file.

(Think about what you'll get if you search for "visual studio 2005
application file". I even searched for "visual studio 2005 generated
files", but still could not get any).

(1) So, can any guru here please explain what it is?

The <Application>.exe.vshost file is a host file Visual Studio uses to
enhance performance when debugging, as well as adding debug support for
partially trusted domains. It can be disabled in the Debug tab of the
project properties, but doing so will lower performance.
(2) BTW, I don't think MyApplication.application and
MyApplication.exe.manifest should be published to the end user,
correct?

I'm not familiar with <Application>.Application files as I have never seen
it (how did you create it?), but the only way I found to attach a manifest
file to a VS2005 generated application was by directly attaching it to the
<Application>.exe file described in this article

http://support.microsoft.com/kb/944276

Not sure if you would consider this publishing the manifest to the end user.
Another question: I have App.config for my console application. After
I compile, VS-2005 generates MyApplication.exe.config, which is the
same as App.config.

But, to deliver MyApplication to the end user, I would like the config
file to be something like config.xml or MyApplication.config.

(3) So, how can I change the file name and not crash the application?

Create a completely new file instead of adding an application config file to
your project. Make sure this file is deployed with your executable and in
your code use the overloaded configuration methods to access the custom
configuration file.

ConfigurationManager.OpenMappedExeConfiguration
Thank you.

You're welcome.
 

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