You receive error messages when Visual Studio 2005 upgrades MapPoint Web Service SDK 4.1 sample projects (920965)
The information in this article applies to:
- Microsoft Visual Studio 2005 Team System Architect Edition
- Microsoft Visual Studio 2005 Team System Developer Edition
- Microsoft Visual Studio 2005 Team System Test Edition
- Microsoft Visual Studio 2005 Team System Team Foundation:
- Microsoft Visual Studio 2005 Standard Edition
- Microsoft Visual Studio 2005 Professional Edition
- Microsoft Visual Studio 2005 Express Edition
- MapPoint .NET
SYMPTOMSConsider the following scenario. You download Microsoft MapPoint Web Service Software Development Kit (SDK) version 4.1. You open one of the MapPoint Web Service SDK sample projects in Microsoft Visual Studio 2005. In this scenario, when Visual Studio 2005 upgrades the sample project, you receive various error messages. For example, you may receive the following error message: ERROR: Unable to get local copy of file web references\mappointservice\reference.cs. Additionally, if you try to compile the sample project, you receive various compilation error messages. CAUSESome of the error messages occur because Visual Studio 2005 includes new language features for Microsoft Visual C# and for Microsoft Visual Basic. These new language features are not present in earlier versions of Visual Studio. Other error messages occur because the Visual Studio 2005 Upgrade Wizard does not correctly convert the MapPoint Web Service SDK sample projects.RESOLUTIONTo resolve these problems, use one or more of the following methods. Notes- You may have to use several of these methods to make a sample project or solution compile successfully.
- The Visual Studio 2005 Upgrade Wizard does not correctly convert the LineDrive solution or the TrafficIncidents solution. You must build the Visual C# and Visual Basic projects in these solutions separately by using method 2.
Method 1: Update Web referencesYou must update the Web references for the projects that are in the following solutions: - ClickToCenterMap
- DataUploadClient
- DragPushpinOnMap
- IconCollisionAndSuppression
- PointConversion
- Polygons
To do this, follow these steps: - Start Visual Studio 2005.
- On the File menu, point to Open, and then click Project/Solution.
- Locate the solution (.sln) file that you want to open, and then click Open.
- In Solution Explorer, expand Web References for the Visual C# and Visual Basic projects.
- Under Web References, right-click MapPointService, and then click Update Web Reference.
- Right-click the project, and then click Rebuild Solution.
Method 2: Add Web references that are missingYou must add Web references to the Visual C# and Visual Basic projects that are in the following folders: - CoreFunctionality
- ImageMap
- InsetOverviewMap
- LineDrive
- MobileApplications
- PanMapNavigationControl
- StoreLocator
- TrafficIncidents
- TurnByTurnRouteMaps
To do this, follow these steps: - Start Visual Studio 2005.
- On the File menu, point to Open, and then click Project/Solution.
- Locate the project file (.csproj or .vbproj) that you want to open, and then click Open.
- In Solution Explorer, right-click the name of the project, and then click Add Web Reference.
- In the URL box, type the following URL:
http://staging.mappoint.net/standard-30/mappoint.wsdl - Click Go.
- After Visual Studio 2005 locates the Web service, type the correct Web reference name in the Web reference name box. Use the following table to determine the correct Web reference name for the sample project.
|
FindCS | CoreFunctionality.MapPointService | FindVB | CoreFunctionality.MapPointService | FindAddressCS | FindAddressCS.MapPointService | FindAddressVB | FindAddressVB.MapPointService | FindNearbyCS | FindNearbyCS.MapPointService | FindNearbyVB | FindNearbyVB.MapPointService | FindNearRouteCS | CoreFunctionality.MapPointService | FindNearRouteVB | CoreFunctionality.MapPointService | MapWithNavigationButtonsCS | MapWithNavigationButtonsCS.MapPointService | MapWithNavigationButtonsVB | MapWithNavigationButtonsVB.MapPointService | RouteCS | RouteCS.MapPointService | RouteVB | RouteVB.MapPointService | ImageMapCS | ImageMap.MapPointService | ImageMapVB | ImageMap.MapPointService | InsetOverviewCS | InsetOverviewCS.MapPointService | InsetOverviewVB | InsetOverviewVB.MapPointService | LineDriveCS | LineDriveCS.MapPoint | LineDriveVB | LineDriveVB.MapPoint | PocketIECS | PocketIECS.MapPointService | PocketIEVB | PocketIEVB.MapPointService | PanMapNavigationControlCS | PanMapNavigationControlCS.MapPointService | PanMapNavigationControlVB | PanMapNavigationControlVB.MapPointService | StoreLocatorCS | StoreLocatorCS.MapPointService | StoreLocatorVB | StoreLocatorVB.MapPointService | TrafficIncidentsCS | TrafficIncidentsCS.MapPoint | TrafficIncidentsVB | TrafficIncidentsVB.MapPoint | TurnByTurnRouteMapsCS | TurnByTurnRouteMapsCS.MapPointService | TurnByTurnRouteMapsVB | TurnByTurnRouteMapsVB.MapPointService |
- Click Add Reference.
- Right-click the project, and then click Rebuild Solution.
Method 3: Modify function parameters in the Find C# projectWhen you try to compile the Find C# project in the CoreFunctionality folder after you use the previous methods, you receive several error messages that resemble the following: A property or indexer may not be passed as an out or ref parameter. To resolve this problem, follow these steps: - Start Visual Studio 2005.
- On the File menu, point to Open, and then click Project/Solution.
- Locate the Find C# project, and then click Open.
- In Solution Explorer, double-click Find.aspx.cs.
- On the Edit menu, click Go To.
- In the Line number box, type 224, and then click OK.
- Replace the existing code as follows.
Existing codevoid PopulateListBox(ref System.Web.UI.WebControls.ListBox myList BoxControl, ref FindResult[] myResults) Replacement codevoid PopulateListBox(ref System.Web.UI.WebControls.ListBox myList BoxControl, FindResult[] myResults) - By using the procedures in steps 5 and 6, locate the following lines of code, and then replace them as follows.
Line 68: Existing codePopulateListBox(ref listboxFindResults, ref myFindResults.Results); Line 68: Replacement codePopulateListBox(ref listboxFindResults, myFindResults.Results);
Line 123: Existing codePopulateListBox(ref listboxFindResults, ref myFindResults.Results); Line 123: Replacement codePopulateListBox(ref listboxFindResults, myFindResults.Results);
Line 184: Existing codePopulateListBox(ref listboxFindNearbyResults,ref myFindResults.Results ); Line 184: Replacement codePopulateListBox(ref listboxFindNearbyResults, myFindResults.Results );
Line 303: Existing codePopulateListBox(ref listboxFindResults, ref myFindResults.Results); Line 303: Replacement codePopulateListBox(ref listboxFindResults, myFindResults.Results);
Line 352: Existing codePopulateListBox(ref listboxFindResults, ref myFindResults.Results); Line 352: Replacement codePopulateListBox(ref listboxFindResults, myFindResults.Results); - Right-click the project, and then click Rebuild Solution.
Modification Type: | Major | Last Reviewed: | 7/26/2006 |
---|
Keywords: | kbtshoot kbprb KB920965 kbAudDeveloper |
---|
|