Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom Job Processor Configuration File

2 REPLIES 2
Reply
Message 1 of 3
steveplatz
766 Views, 2 Replies

Custom Job Processor Configuration File

Is there any way to read from an assembly configuration file (xxx.dll.config) from a Vault Job Processor using the standard method of Properties.Settings.PropertyName?

 

I attempted to use a config file for NLog in a previous processor that I wrote, but none of the options were read (and thus logging did not work). Before I go down the path of rolling my own configuration, I wanted to check to see if I was doing something wrong or if the options need to be added to the JobProcessor config file instead.

2 REPLIES 2
Message 2 of 3
Redmond.D
in reply to: steveplatz

I've only used .exe.config files.  I'm not sure if there is such a thing as .dll.config files.  You will have to look at the .NET documentation from Microsoft to find out more.

 

I don't suggest adding your own content to JobProcessor.exe.config.  That's a component installed with the Vault client.  An update or hotfix may overwrite your change.  In my plug-ins, I usally just load the settings file directly from my code.



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 3 of 3
Nhall123
in reply to: Redmond.D

If you have an addin called addin.dll, you can access its configuration file (addin.dll.config) like this

 

var executingAssembly = System.Reflection.Assembly.GetExecutingAssembly();
var location = executingAssembly.Location;
var config = ConfigurationManager.OpenExeConfiguration(location);
var sections = config.Sections;
string tempPath = config.AppSettings.Settings["OutputFolder"].Value.ToString();


Hope it helps

Nick

 

 

 

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report