Custom config file with separate configs sections
Hi, I'm using the version 5.22.2, and I'm referencing a config file with several external configSource (in a subfolder, like "Configs\AppSettings.config") through the option "Custom path".
This was working pretty well until some days ago, but now the query is not able to access the other configSources, and if I check on AppDomain.CurrentDomain.SetupInformation.ConfigurationFile I see this path:
C:\Users\[MY USER]\AppData\Local\Temp\LINQPad5\_dlwmmfdx\faaqrc\LINQPadQuery.dll.custom.config
and not the real path I setted in "Custom path".
Clearly inside the LINQPadQuery.dll.custom.config there are the references to the other configs files but as the references are relative it's not able to find them (the Config folder is not copied in the Temp folder).
Sounds like a bug to me...
This was working pretty well until some days ago, but now the query is not able to access the other configSources, and if I check on AppDomain.CurrentDomain.SetupInformation.ConfigurationFile I see this path:
C:\Users\[MY USER]\AppData\Local\Temp\LINQPad5\_dlwmmfdx\faaqrc\LINQPadQuery.dll.custom.config
and not the real path I setted in "Custom path".
Clearly inside the LINQPadQuery.dll.custom.config there are the references to the other configs files but as the references are relative it's not able to find them (the Config folder is not copied in the Temp folder).
Sounds like a bug to me...
Comments
The reason that LINQPad will create this file is to add extra config that is necessary to make your query work, most commonly to add binding redirects.
The LINQPadQuery.dll.custom.config is identical to the web.config itself and yes, there are binding redirects, but in the temp folder there are just: LINQPadQuery.cs LINQPadQuery.dll, LINQPadQuery.dll.custom.config and LINQPadQuery.pdb.
And as the config is pointing to different external source:
<appSettings configSource="configs\AppSettings.config" />
<cacheSettings configSource="configs\CacheSettings.config" />
<connectionStrings configSource="configs\ConnectionStrings.config" />
<ServiceBusQueueProvider configSource="configs\Messaging.config" />
<imageServerSettings configSource="configs\ImageServer.config" />
<StoreManagerConfiguration configSource="configs\StoreManagerConfiguration.config" />
and no one of them is there, is giving me error...
If needed I can send you all the web.config.
Also I want to point that all this thing stopped to work just with the 5.22.02, before it was pretty ok.
Thanks for take a look into this!
http://www.linqpad.net/download.aspx#beta
Based on which information is LINQPad creating those custom.config redirects?
I've just had a problem that my script was crashing due to System.Net.Http redirect to 4.2.0.0. But it only happened in one script. The other worked but it was loading 4.0.0.0 from GAC.
Fuslogv showed that it was trying to load 4.2.0.0 because of application's config redirect. But I didn't have any in my .config. But it was in the custom.config.
I tried to look for any references that use that version but didn't found any.
I'm on 5.44.02 version.