I have a problem changing a dynamic web reference in the config file. Changing the url in the config file doesn't have any effect. I have to change the url in .settings and compile for it to change.
I added the web reference using the wizard. Set the URL behavior to dynamic, which added the relevant XML tags in config file.
In my solution I have the web API (web reference) in a separate project (class lib), so I referenced the project and copied the <applicationSettings>
over.
<applicationSettings>
<Runner.Properties.Settings>
<setting name="WebReference" serializeAs="String">
<value>http://someurl/somefile.asmx</value>
</setting>
</Runner.Properties.Settings>
</applicationSettings>
Note that it's <Runner.Properties.Settings>
and not <WebAPI.Properties.Settings>
.
My solution is set up as follows:
Solution:
- WebAPI (class lib, has the web reference)
- Runner (console app, references WebAPI)
Are there some limitations I'm not aware of or am I doing something wrong?