<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: User.Config file location in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/user-config-file-location/m-p/2535774#M69505</link>
    <description>The save() method works but saves the config file in the directory I posted.  I have tried the save method in various parts of code with the same result. It will only read from the crazy directory for the config file.  I have tried puting the generated dl.config, app.config, and usre config file with the net loaded dll but it will only use the one in the crazy directory.  I was wondering how to control the location from which the appconfig file is read and where it saves.  The save method does not support a directory path and I can't seem to find a way to force it to read from any other.&lt;BR /&gt;
&lt;BR /&gt;
I have yet to experiment with a custom properties config file and would prefer the default unless that is the only answer.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
--cbertschy</description>
    <pubDate>Thu, 06 Aug 2009 18:35:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-08-06T18:35:17Z</dc:date>
    <item>
      <title>User.Config file location</title>
      <link>https://forums.autodesk.com/t5/net-forum/user-config-file-location/m-p/2535772#M69503</link>
      <description>I have begun using the awesome power of the user.config file for form control data and general setting; However, I have been led to believe that the user.config file is always saved either internally with the app.config file or in its own user.config file.  When I run the compiled project internally in autocad, it places this config file in  &lt;BR /&gt;
&lt;BR /&gt;
"C:\Documents and Settings\CBertschy\Local Settings\Application Data\Autodesk,_Inc\DefaultDomain_Path_t1bctulb1i5ssljxkt3ct1iwqz15swl2\R17.1.219.3".&lt;BR /&gt;
&lt;BR /&gt;
I am not down with this and would like the file to be saved in the location of my DLL.  I would not mind it storing in the user document and settings file but would like it under my projects name and not the current location.  I can not find anything to control this behavior and I think it has to do with the file having to be in run in autocad's namespace.  I am using the default config file and not a custom config.&lt;BR /&gt;
&lt;BR /&gt;
Is there any way around this, should I change back to a custom config file?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
--cbertschy</description>
      <pubDate>Thu, 06 Aug 2009 13:17:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/user-config-file-location/m-p/2535772#M69503</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-06T13:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: User.Config file location</title>
      <link>https://forums.autodesk.com/t5/net-forum/user-config-file-location/m-p/2535773#M69504</link>
      <description>The config files are not automatically saved in DLL projects,&lt;BR /&gt;
only in .EXE's, so you have to do it yourself manually.&lt;BR /&gt;
&lt;BR /&gt;
You can save your appsettings from an IExtensionApplication's&lt;BR /&gt;
Terminate() method.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;CTBERTSCHY&gt; wrote in message news:6232376@discussion.autodesk.com...&lt;BR /&gt;
I have begun using the awesome power of the user.config file for form &lt;BR /&gt;
control data and general setting; However, I have been led to believe that &lt;BR /&gt;
the user.config file is always saved either internally with the app.config &lt;BR /&gt;
file or in its own user.config file.  When I run the compiled project &lt;BR /&gt;
internally in autocad, it places this config file in&lt;BR /&gt;
&lt;BR /&gt;
"C:\Documents and Settings\CBertschy\Local Settings\Application &lt;BR /&gt;
Data\Autodesk,_Inc\DefaultDomain_Path_t1bctulb1i5ssljxkt3ct1iwqz15swl2\R17.1.219.3".&lt;BR /&gt;
&lt;BR /&gt;
I am not down with this and would like the file to be saved in the location &lt;BR /&gt;
of my DLL.  I would not mind it storing in the user document and settings &lt;BR /&gt;
file but would like it under my projects name and not the current location. &lt;BR /&gt;
I can not find anything to control this behavior and I think it has to do &lt;BR /&gt;
with the file having to be in run in autocad's namespace.  I am using the &lt;BR /&gt;
default config file and not a custom config.&lt;BR /&gt;
&lt;BR /&gt;
Is there any way around this, should I change back to a custom config file?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
--cbertschy&lt;/CTBERTSCHY&gt;</description>
      <pubDate>Thu, 06 Aug 2009 18:11:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/user-config-file-location/m-p/2535773#M69504</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-06T18:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: User.Config file location</title>
      <link>https://forums.autodesk.com/t5/net-forum/user-config-file-location/m-p/2535774#M69505</link>
      <description>The save() method works but saves the config file in the directory I posted.  I have tried the save method in various parts of code with the same result. It will only read from the crazy directory for the config file.  I have tried puting the generated dl.config, app.config, and usre config file with the net loaded dll but it will only use the one in the crazy directory.  I was wondering how to control the location from which the appconfig file is read and where it saves.  The save method does not support a directory path and I can't seem to find a way to force it to read from any other.&lt;BR /&gt;
&lt;BR /&gt;
I have yet to experiment with a custom properties config file and would prefer the default unless that is the only answer.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
--cbertschy</description>
      <pubDate>Thu, 06 Aug 2009 18:35:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/user-config-file-location/m-p/2535774#M69505</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-06T18:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: User.Config file location</title>
      <link>https://forums.autodesk.com/t5/net-forum/user-config-file-location/m-p/2535775#M69506</link>
      <description>User.config is PER USER based configuration. That is why it is automatically saved in ...\document and sessions\username\...... and with "crazy" path name, because Windows (.NET runtime) has to figure it out according to the user, application... to make sure it is used by certain user for certain application.&lt;BR /&gt;
&lt;BR /&gt;
What you really want (according to your description) is application level configuation, which would be shared by all users who use your application in the computer. So, you really should use xxx.exe.config. In the case of AutoCAD, it is acad.exe.config. &lt;BR /&gt;
&lt;BR /&gt;
Or you can use other means to determine where you store/find your own custom configurable data, as Tony suggests, implementing IExtensionApplication's Initilize()/Terminate() to get and save your settings. For example, you can use System.Reflection.Assembly to determine where the DLL is loaded from, and then read/save your own setting file from there. Of course, the setting is on application level, not per user.</description>
      <pubDate>Thu, 06 Aug 2009 18:54:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/user-config-file-location/m-p/2535775#M69506</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2009-08-06T18:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: User.Config file location</title>
      <link>https://forums.autodesk.com/t5/net-forum/user-config-file-location/m-p/2535776#M69507</link>
      <description>Thanks, I will look at implementing the IExtensionApplication.  I was tired of beating a dead horse trying to implement the visual studio boiler plate stuff.  I am okay with the application level for now but might as well implement user support if I am going to choose a place for the file and it will not have to be next to the DLL.  I guess I will need to create a custom installer for this as well. &lt;BR /&gt;
&lt;BR /&gt;
Thanks again &lt;BR /&gt;
&lt;BR /&gt;
--cbertschy</description>
      <pubDate>Thu, 06 Aug 2009 20:23:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/user-config-file-location/m-p/2535776#M69507</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-06T20:23:57Z</dc:date>
    </item>
  </channel>
</rss>

