TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Danish Habib
NA
694
247.1k
I have add a service reference into my WPF application
Nov 17 2015 7:46 AM
I have add a service reference into my Application with service name BingRoutingService now in the code of my Mainwindow.xmal.cs i am when writing this line it says the type or namespace BingRoutingService cannot be found you are missing a using directive or assembly
i have these using statement
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using DevExpress.Map.BingServices;
namespace DevelopersApp
my project name is DevelopersAPP
check the attached document for checking the hierarchy
http://tinypic.com/r/sgriop/9
Reply
Answers (
6
)
1
Danish Habib
0
694
247.1k
Nov 17 2015 8:09 AM
Dear sourabh Thanks for prompt response actually i am new to services and wpf I have a requirement to make a wpf application which must conusme a web service to calculate the distance between two places using Bing API or Google so i am following that below link
https://koenmetsu.wordpress.com/2010/01/18/calculating-routes-in-net-5-minutes-tutorial/
according to you what is className in my case
0
Danish Habib
0
694
247.1k
Nov 17 2015 8:22 AM
still the BingRoutingService it has red squegly line beneath it and also on build it gives these error
1-DevelopersApp 21 15 c:\users\dhabib\documents\visual studio 2010\Projects\C SHARP FROM 67\DevelopersApp\DevelopersApp\MainWindow.xaml.cs The type or namespace name 'BingRoutingService' does not exist in the namespace 'DevelopersApp' (are you missing an assembly reference?) 7 Error
2-
DevelopersApp 13 35 c:\users\dhabib\documents\visual studio 2010\Projects\C SHARP FROM 67\DevelopersApp\DevelopersApp\MainWindow.xaml.cs The type or namespace name 'BingRoutingService' could not be found (are you missing a using directive or an assembly reference?) 8 Error
3-
DevelopersApp 1 1 c:\users\dhabib\documents\visual studio 2010\Projects\C SHARP FROM 67\DevelopersApp\DevelopersApp\Service References\BingRoutingService\Reference.svcmap Custom tool error: Failed to generate code for the service reference 'BingRoutingService'. Please check other error and warning messages for details. 6 Error
0
Sourabh Somani
Tech Writer
47.6k
10.8m
Nov 17 2015 8:12 AM
Hello Add Namespace
Using
BingRoutingService
0
Danish Habib
0
694
247.1k
Nov 17 2015 8:03 AM
Dear somani check this link
http://tinypic.com/r/sgriop/9 and tell me the exact line of code i have tried alot but could not get success till now
0
Sourabh Somani
Tech Writer
47.6k
10.8m
Nov 17 2015 8:03 AM
After rebuilding project use like as following
BingRoutingService.ClassName
obj=new
BingRoutingService.ClassName();
0
Sourabh Somani
Tech Writer
47.6k
10.8m
Nov 17 2015 8:01 AM
First Build Your Project
then use like this
ServiceReferenceNamespace.ClassName
obj=new
ServiceReferenceNamespace.ClassName();
WPF Application for calculating distance between two places
Files not downloading the correct file using WebClient