I cannot seem to access my Web References after upgrading a VS.Net 2003 Web Project to VS.Net 2005 using the released version of Web Application Projects.
I get "Custom tool error: Unable to import WebService/Schema. Object reference not set to an instance of an object."
when I try to Update a Web Reference I get the error "The custom tool 'MSDiscoCodeGenerator' failed. Object reference not set to an instance of an object".
There is a known issue where you can get into this state if the settings.settings file ever gets deleted, or is missing, and dynamic urls are used. The fix is to open the Settings.settings file (just double-click it). You should see entries similar to the
following for you dynamic urls.
Notice the type field - it needs to be set to "(WebService URL)" - one of the choices in the type dropdown. Most likely it is set to be of type String and this what causes the error.
Can you try this? We are looking at getting this fixed for SP1 of Visual Studio (it is an issue in the core VS code base so WAP cannot fix it directly.)
All the dynamic web references from my 2003 project are still in my web.config in the <appSetting> element?
Do I have to manually move them? I would have thought the conversion would have dealt with this?
In my web.config I had entries like this
<add key="Cust-Conn.WSAccount.Account" value="http://localhost/i-conn/wwcd/WSLedger/Account.asmx"/> for my web reference.
I cannot seem to add this key to the settings.settings file, i get the error "Cust-Conn.WSAccount.Account is not a valid identifier"
What happens if you delete the settings file and re-update your web references? They will probably generate the same error, but you should be able to open the settings file and fix up the type. At least, this seemed to work for me when I tried it here. If
not please reply to the post and I'll follow up with the owners of the code to see if there is something else you can try.
When you opened your settings file, did it tell you that new values from app.config (actually web.config) will be added? Try one more thing. Dynamic url information is stored in web.config as well. You will see an entry like the following:
richbaker
Member
132 Points
27 Posts
Web References - Custom tool warning
May 09, 2006 02:34 PM|LINK
I get "Custom tool error: Unable to import WebService/Schema. Object reference not set to an instance of an object."
when I try to Update a Web Reference I get the error "The custom tool 'MSDiscoCodeGenerator' failed. Object reference not set to an instance of an object".
Thanks
Richard.
billhie
Participant
1659 Points
335 Posts
Microsoft
Re: Web References - Custom tool warning
May 09, 2006 05:10 PM|LINK
There is a known issue where you can get into this state if the settings.settings file ever gets deleted, or is missing, and dynamic urls are used. The fix is to open the Settings.settings file (just double-click it). You should see entries similar to the following for you dynamic urls.
Name Type Scope Value
MyApp_localhost_Service (Web Service URL) User http://localhost:2305/WebSite8/Service.asmx
Notice the type field - it needs to be set to "(WebService URL)" - one of the choices in the type dropdown. Most likely it is set to be of type String and this what causes the error.
Can you try this? We are looking at getting this fixed for SP1 of Visual Studio (it is an issue in the core VS code base so WAP cannot fix it directly.)
Visual Studio Web Tools
richbaker
Member
132 Points
27 Posts
Re: Web References - Custom tool warning
May 09, 2006 07:53 PM|LINK
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles />
<Settings />
</SettingsFile>
All the dynamic web references from my 2003 project are still in my web.config in the <appSetting> element?
Do I have to manually move them? I would have thought the conversion would have dealt with this?
In my web.config I had entries like this
<add key="Cust-Conn.WSAccount.Account" value="http://localhost/i-conn/wwcd/WSLedger/Account.asmx"/> for my web reference.
I cannot seem to add this key to the settings.settings file, i get the error "Cust-Conn.WSAccount.Account is not a valid identifier"
Thanks
Richard.
billhie
Participant
1659 Points
335 Posts
Microsoft
Re: Web References - Custom tool warning
May 09, 2006 09:36 PM|LINK
Visual Studio Web Tools
BradleyB
Participant
1197 Points
230 Posts
Microsoft
Re: Web References - Custom tool warning
May 09, 2006 10:23 PM|LINK
btw: this post highlights some of the differences is proxy generation and web.config settings between VS03 WAP and Web Sites.
http://weblogs.asp.net/bradleyb/archive/2006/05/04/445133.aspx
Hope this helps,
Brad.
richbaker
Member
132 Points
27 Posts
Re: Web References - Custom tool warning
May 10, 2006 09:31 AM|LINK
"The custom tool "MSDiscoCodeGenerator' failed. Object reference not set to an instance of an object"
I also tried changing the web reference to Static (which it does ok) and back to dynamic and I get the error
"Property value is not valid" and in the detail box the above error again about MSDiscoCodeGenerator.
Thanks
Richard.
billhie
Participant
1659 Points
335 Posts
Microsoft
Re: Web References - Custom tool warning
May 10, 2006 06:51 PM|LINK
Visual Studio Web Tools
richbaker
Member
132 Points
27 Posts
Re: Web References - Custom tool warning
May 10, 2006 07:40 PM|LINK
"The custom tool "MSDiscoCodeGenerator' failed. Object reference not set to an instance of an object"
and the Settings.Settings file just contains the following, no mention of web reference to fix up?
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
</SettingsFile>
Thanks
Richard.
billhie
Participant
1659 Points
335 Posts
Microsoft
Re: Web References - Custom tool warning
May 10, 2006 09:03 PM|LINK
When you opened your settings file, did it tell you that new values from app.config (actually web.config) will be added? Try one more thing. Dynamic url information is stored in web.config as well. You will see an entry like the following:
<
sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" ><
section name="WebApplication2.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /></
sectionGroup>Back up your web.config and then do the following:
1) Delete settings.settings
2) Open web.config and Delete the entry that look like: <section name="WebApplication2.Properties.Settings"
3) Further down in the web.config you should will see the following, with one <Setting> per web reference. Remove all the web references from there.
<
applicationSettings><
WebApplication2.Properties.Settings><
setting name="WebApplication2_localhost_Service" serializeAs="String"><
value>http://localhost:4677/WebSite2/Service.asmx</value></
setting></
WebApplication2.Properties.Settings></
applicationSettings> 4). Now do an Update Web Reference. Does it work now?Visual Studio Web Tools
richbaker
Member
132 Points
27 Posts
Re: Web References - Custom tool warning
May 11, 2006 08:29 AM|LINK
I also tried what you said but when I try to update the web reference I get the error
"The custom tool 'MSDiscoCodeGenerator' failed. Object reference not set to an instance of an object."
I do get a new Settings.Settings file but it only contains the following
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
</SettingsFile>
I
Many thanks for looking at this for me.
Richard.