Hi there,
I was looking for some help/advice regarding the auto generated class that wraps an assemblies settings.
We are currently building an application using VS 2005 but are using MSBee to build a 1.1 version assembly.
We have hit a problem in that any Web References added through the IDE have cause this Settings class to be generated. As this class is a partial class this cannot be compiled sucessfully under framework 1.1
Is there any way to avoid the use of this code and still add the Web References via the IDE or will we have to go down some other more manual route to add our web references
Thanks
Andy

Auto Generated Settings Class
jon don
Hi!
I don't think Settings class can live without "partial" keyword, so you must not use it to export code into 1.1.
Settings used to describe web service location, VS2005 mark it automatically as "dynamic" in service reference propreties, so Settings get line with actual reference. Turn off dynamic web service and Settings won't be needed.
Actually your case is a little strange, porting apps from 1.1 to 2.0 takes not too long time (mostly few minutes), so upgrade to 2.0 is a good idea. And if you want to stay in 1.1 - you can ask VS2003 reference web services.
KillJones
Hi Jeroen,
I added a settings file to a project and I am unsure what property you are referring to, I think it maybe the SettingsSingleFileGenerator setting of the CustomTool Property.
Unfortunately I could not see what alternatives I can set this too, so not sure if this makes what I want to achieve possible or not.
Maybe I am missing someting though.
Thanks
Andy
MainePaco
Hi Andy,
I was indeed refering to the CustomTool property. From what i know, if this setting is empty no files will be autogenerated. This means that if you are pretty sure that your web reference will not change, you can have the autogenerated file only generate once. Then clear this property, and have your way with the autogenerated file without it being overwritten every time you compile.
I must say i have only tried this with app.config autogenerated files. I can imagine that the web reference autogenerated file is somewhat more complex so this might not be such a good idea.
Hope this clarifies some stuff.
krahd
Thanks Sergy,
The reason my request is a little strange is that we are starting a new project and need to deploy on linux and solaris.
in order to achieve this we were aiming to use Mono, currently the Mono support for 2.0, while being fairly comprehensive is not quite at the level we require.
We were therefore hoping to be able to use VS 2005 and generate 1.1 compatible code and use MSBee to comile our code.
Looks like this might not be the case though.
If we did use the static URL behaviour for our web service references, is there any way to change the URL at runtime
Thanks for your help
Andy
WernerP
Hi Andy,
sorry for delay. Static URL will inject URL into generated code, so no way to change it later.
Issa salama
Hi Jeroen,
Thats does clarrify some stuff, I never tried setting cutom tool to empty! :-)
Looks like this may help me get around the issues I had, thanks a lot for you help, I will need to change some of the generated code for the web service client but I can cope with that.
Thanks
Andy
scott t
I do not have my development environment at the ready here so what i am about to say might be wrong.
If you make application settings (with a app.config file or the like) you can set in the settings of this file, the application that generates code behind. I can imagine this is the same with a web reference where it has an setting that specifies the application that generates its code behind.
This might me an setting worth looking at.