This article is a result of a couple of recent support incidents where developers would like to read a config from from a Visual Studio Tools (VSTools) addin. VSTools is a special situation because for one, it is a dll, not an exe, and second it only runs if GP is running. VSTools can automatically access the dynamics.exe.config file, steps on how to do that are outlined in KB Article 933930 . The KB is for 9.0 and references the Dynamics.config file, but it also works for the Dynamics.exe.config on 10.0.
In this case, we don't want to use the dynamics.exe.config, we want to use our own config file. Since we are working with a dll, there is no automatic reading from config files like with an exe. Obviously, there is more than one way to handle this and there may be a better way. This is just one way, that I know works, and it's not too difficult.
This article shows a method to use xml to read the data from a config file. The main VSTools project is called DynamicsGPAddin.dll.
DaveMBS Dev Support
// Copyright © Microsoft Corporation. All Rights Reserved.// This code released under the terms of the // Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.)
Posting from Jivtesh Singh
http://www.jivtesh.com/2009/03/visual-studio-tools-for-dynamics-gp.html
PLEASE READ BEFORE POSTING
Please only post comments relating to the topic of this page.
If you wish to ask a technical question, please use the links in the links section (scroll down, on right hand side) to ask on the Newsgroups or Forums. If you ask on the Newsgroups or Forums, others in the community can respond and the answers are available for everyone in the future.