Reputation: 2397
Is it possible to use a visual studio macro within a .config file? For example, can create a appSetting like this, where $(ProjectDir) maps to the directory where my .csproj file is located?
<appSettings>
<add key="myDirectory" value="$(ProjectDir)\App_Data\myDirectory"/>
</appSettings>
Upvotes: 1
Views: 374
Reputation: 2397
After searching around, the short answer to this question is 'no'.
Having macros within a .config file would mean that the web.config file would not be able to be properly interpreted when deployed somewhere other than the debug environment.
Upvotes: 1