Customize Application Data Folder

J

jtbjurstrom

The folder that the framework creates under the Application Data
folder is not consistent.

Instead of:
..\Local Settings\Application Data\My Company\MyApp.exe_Url_<guid>
\1.0.0.0\user.config

I would like to have
..\Local Settings\Application Data\My Company\My App
\1.0.0.0\user.config

Basically I'm trying to remove the guid. If this isn't possible with
the .NET Framework then I'd at least like to know where this guid
comes from.

Thank you,
Jayson B.
 
P

Peter Duniho

Basically I'm trying to remove the guid. If this isn't possible with
the .NET Framework then I'd at least like to know where this guid
comes from.

You can look at the Settings.Designer.cs file to see the implementation of
that part of your application. That should answer both the question of
where the GUID comes from, as well as provide a suggestion for at least
one way to change the behavior.

Pete
 
J

jtbjurstrom

You can look at the Settings.Designer.cs file to see the implementation of
that part of your application. That should answer both the question of
where the GUID comes from, as well as provide a suggestion for at least
one way to change the behavior.

Pete

Thanks Peter,
I've checked that file out and all I see is a few attributes which
specify that the class was generated by a code generator and who that
code generator is.

[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]

[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator",
"8.0.0.0")]

Somewhere in ApplicationSettingsBase.Save() it determines the folders
to create. I know it gets the company folder under "Application Data"
from [assembly: AssemblyCompany("My Company")] in AssemblyInfo.cs and
the version folder name from [assembly: AssemblyVersion("1.0.0.0")],
also in AssemblyInfo.cs. But I cannot find where the the application
folder name comes from (i.e. ".\My Company\MyApp.exe_Url_<guidthing>
\1.0.0.0").

Jayson
 

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