Visual Studio 2005 Beta 2 - Emulator problem
Hi!
I've got a problem and wonder if anyone else has it (and has resolved it

)
My problem is as follows .. I create a new device application and try to run in in emulator.. the emulator starts just fine, but it won't connect to it! At all!
The error is "Connection failed. The system cannot find the path specified."
Thanks in advance,
Tadej
[454 byte] By [
TadejK] at [2008-1-10]
Can you give us some more details on what is happening?
Are you launching the emulator from the IDE? Have you tried connecting to the emulator using the Device Emulator Manager?
TadejK,
I am having the exact same problem. Here are the steps to reproduce:
-Start a new SmartPhone 2003 Project
-Left Menu Item - "Cancel" - mnuCancel
-Right Menu Item - "Say Hello" - mnuSayHello
-mnySayHello_Click event as follows:
| | Private Sub mnuSayHello_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuSayHello.Click Me.Label1.Text = "Hello World" End Sub |
Start debugging and the SmartPhone 2003 SE Emulator appears. VS.Net 2005 beta 2 reports it is deploying the application. VS.Net reports "There were deployment errors" - Continue? Yes No? Click No. VS.Net's error list reports 1 error....Failed to connect to device. If you click yes, a second error dialogue appears - "The operation could not be completed. The system cannot find the path specified." Click 'OK' and VS.Net's error list show's...Failed to connect to device.
I have tried soft/hard resetting the device emulator as well as the Clear Saved State option to no avail. Any assistance would be greatly appreciated.
I should note that this machine has VS.Net 2003 installed on it with the Smartclient SDK and it also had VS.Net 2005 beta 1. I followed the instructions for removal of VS.Net 2003 beta 1.
John Walker
JW at 2007-8-21 >

So, is anyone else experiencing this problem? As it stands now, I cannot debug Smartphone Apps using the emulators. Maybe it's just something hosed on my PC? Any help would be appreciated.
If you have installed a previous version of VS2005 on a computer, you might still have configuration files that are now invalid. Close VS, delete the following directory:
\Documents and Settings\<localuser>\Local Settings\Application Data\Microsoft\CoreCon
and restart VS
Carl,
Ok, I deleted the CoreCon folder, restarted VS and tried to debug again. This time I get an error - Connect to device failed. Under the file column of the error list, it states - Conman HelpText System. Any ideas? Thanks again for your assistance.
Regards,
John Walker
By default, Visual Studio 2005 Beta 2 uses tcpip as the transport to the emulator. I suggest that you verify the ip of the emulator. To do this on a pocket pc, go into settings, connections, network cards, Ne2000 compatible ethernet driver. Try to ping this ip from your desktop computer. If it times out, then you will have to configure the emulator to be able to use your network. You can manually set an IP in the Ne2000 card settings, or verify your network settings to ensure that your DHCP server allows the emulator to get an ip.
Another solution would be to install the loopback adapter. You can find instructions on how to do that at :
http://support.microsoft.com/default.aspx?scid=kb;en-us;839013 
Ok, this corrected the problem and I was able to connect and deploy an app to the Pocket PC Emulator. My network is not using DHCP, so I indeed had to establish an IP address manually.
Now, how about for Smartphone 2003? I am assuming I have to do something similar under Settings - Data Connections, but I am kind of lost in there? Can you point me to any resources?
Finally, thanks for the help. It is very much appreciated.
There is no simple way in the Smartphone Os to specify an ip for its network card. I would suggest that you use the loopback adapter solution. Installation information can be found here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;839013
After installing it, make sure the smartphone emulator selects this loopback adapter in the network options, available in VS in Tools->Options->Devices->Devices options->smartphone emulator->properties->properties->Network->Ne2000. Close and reopen the emulator and that should fix the deployment problem you are getting for the smartphone image.
Ok, this worked great. Thanks very much for the asistance, Carl. I can now start building some cool stuff for my Audiovox SMT5600

John W.
My problem is slightly different:
"Error: The saved state file is from another version of the emulator and is not compatible with the current emulator."
Any idea where the saved state file is stored so I can delete it?
thanks.
There are two possible directory where you might have older save-states. In the global directory:
\Documents and Settings\All Users\Application Data\Microsoft\Device Emulator
or in your user directory:
\Documents and Settings\<your user>\Application Data\Microsoft\Device Emulator
You will want to delete the .dess files in these directory. In the RTM version of Whidbey, we will have a better way of handling this error.
I had the same problem so from a previous tip for vs.net 2005 beta 1 I added the service Virtual Machine Network Services to my network connection. I still got the same error so then I saw this tip and deleted the CoreCon directory and it worked fine. (I tried removing the Virtual Machine Network Services to see if just deleting the corecon directory solved the problem but I was back to the original problem.)
Now if I deploy to an unsaved state emulator the deploy works fine. If I save the state and then deploy it fails the first time but if I leave the emulator up and then try the deploy again it works.
The reason I am trying to save the state is so I don't have to deploy the NETCFV2.ppc.armv4.cab file and the System_SR_enu.cab file. Perhaps there is another technique I can use to always get those on the emulator.
Two other issues that I might as well mention here:
1. When debugging an app in the emulator the cursor is a wait cursor unless I move it over a spot on the emulator which changes it to an arrow. This makes it a little tough to tell when the complete deployment of my app to the emulator is finished.
2. If I close the emulator vs.net 2005 does not stop debugging. I'm pretty sure it used to in vs.net 2003 but I could be mistaken. I go debug->stop debugging and at that point I get the following message:
"A fatal error has occurred and debugging needs to be terminated. For more details .... HRESULT=0x80072746. ErrorCode=0x0."
At that point debugging is stopped and everything is okay but I thought you should know about this.
Brian
Both of these issues are known and will be fixed before RTM is completed.

Hi, I'm trying to deploy a smart phone app. I've already installed the loopback adapter and in the VS under "Tools->Options->DeviceTools->Devices->Properties->Emulator Options->Network->Enable NE2000 PCMCIA network adapter and bind to:" the loopback adapter is selected. But when I try to deploy an error occurs: "Connect to device failed. Command HelpText System".
Thanks for any assistance.
Regards,
Harley Jácome
Hi Vladimir
Thanks for the tip. I installed the connectivity patch and it does improve things but I still get a couple of errors that you may already know about.
When I close the emulator without terminating debugging, debugging does stop without me having to stop it but I do get the same error message as before except this time the HR is 0x80010108.
The wait cursor issue is still there. If I hold my cursor over the emulator window while my app is being deployed it remains a wait cursor even once my app has finished deploying. Once I move the cursor through the title bar of the emulator it changes to the default cursor. This is the same behaviour as behaviour.
The issue I had with deploying my application to a saved state emulator is fixed. I can save the state and deployment still works.
Brian
Hi Brian,
Thanks for trying the patch. We have fixed the error message from the debugger but these binaries are not included in the patch. I've kept the patch as small as possible to decrease chances of destabilizing the rest of the product.
You are right about the wait cursor issue - the binary in the patch didn't pick up that fix. We'll probably make a new binary available via Device Emulator Community Preview download and it will have that fix as well as a couple of others.
Thanks,
Vladimir
I have tried this mechanism. I can see the device emulator on the network. I can ping it. I can even get at microsoft.com from the device emulator, but I still get the problem mentioned.
I have also tried to connect to to my iPaq using the PocketPC 2003 SE connection and I get a message to the effect of that the current version of ActiveSync is not supported and that I should install the latest version from www.microsoft.com. I'm running ActiveSync 3.8 (the very latest version).
I decided this wasn't good enough, so I copied the release version of the .exe out of the release directory onto my iPaq and ran it. It worked.
Somehow this connectivity thing is a bit of a PITA.
Hello,
I have a different problem, when I try to connect to device from VS, the emulator shows the error "Connection Failed. The configuration data for this product is corrupt. Contact you support personnel.". I can't deploy my APPs neither to pocket pc or emulator

Any Sugestion?
I think you may be having a similar issue to the one Carl suggested resolution earlier:
If you have installed a previous version of VS2005 on a computer, you might still have configuration files that are now invalid. Close VS, delete the following directory:
\Documents and Settings\<localuser>\Local Settings\Application Data\Microsoft\CoreCon
and restart VSYou might also want to delete \Documents and Settings\<localuser>\Local Settings\Application Data\Microsoft\Device Emulator
Thanks,
Vladimir
I have delete directory "\Documents and Settings\<localuser>\Local Settings\Application Data\Microsoft\CoreCon" and happen some error. I don't have the directory
"Documents and Settings\<localuser>\Local Settings\Application Data\Microsoft\Device Emulator"

Hi guys, similar problem with the emulator,
I've installed beta 2005 and tried to run a mobile application - which is otherwise running fine onVS 2003 on a different computer. Got an error in the emulator : 'Could not establish connection to network' when tring to access a web service. I've refreshed the web reference.
I've checked the IP of the emulator - it is responding at ping from the same machine.
Any suggestins please - it is driving me crazy !
thanks, Silvia
Silvia wrote: |
 Hi guys, similar problem with the emulator, I've installed beta 2005 and tried to run a mobile application - which is otherwise running fine onVS 2003 on a different computer. Got an error in the emulator : 'Could not establish connection to network' when tring to access a web service. I've refreshed the web reference. I've checked the IP of the emulator - it is responding at ping from the same machine. Any suggestins please - it is driving me crazy ! thanks, Silvia |
|
sorry - solved it in the meantime - I set My network card connects to: The Internet in the emulator - it was set to 'Work' before - I did not noticed the Internet was not working on the emulator.
it's working fine now.
Silvia
Hi Vladimir,
I also tried the patch and all other solutions, and when I programmed an application that says hello, everything worked fine. But...
When I make a reference to an
mysql.data.dll and for this to work the
system.data.dll. I Get an error
0x80070070 There is not enough space on the disk.
These are the file in my release directory:
05-06-2005 12:04 12.288 logindev.exe
05-06-2005 02:55 3.221 logindev.exe.config
05-06-2005 12:04 28.160 logindev.pdb
05-06-2005 12:04 668 logindev.xml
09-04-2005 03:14 3.638.784 System.Data.dll
09-04-2005 03:13 527.872 System.Data.OracleClient.dll
27-01-2005 21:21 288.832 System.Data.OracleClient.xml
27-01-2005 21:21 1.907.148 System.Data.xml
09-04-2005 03:12 253.952 System.EnterpriseServices.dll
08-04-2005 20:24 94.720 System.EnterpriseServices.Wrapper.dll
27-01-2005 21:21 213.031 System.EnterpriseServices.xml
09-04-2005 03:13 240.640 System.Transactions.dll
27-01-2005 21:21 78.887 System.Transactions.xml
09-04-2005 03:13 5.038.080 System.Web.dll
27-01-2005 21:21 4.161.056 System.Web.xml
15 File(s) 16.487.339 bytes
2 Dir(s) 16.270.499.840 bytes freeMy mysql.data.dll is in an other directory and is:
20-01-2005 11:12 139.264 MySql.Data.dll
1 File(s) 139.264 bytes There are some Huge Files for my ppc in the listing and my program is verry small, only a login to mysql database. Do you have a Solution for this one too?
I also tried Under the reference tab copy "local=false" and
when I looked in my PPC windows folder i Saw like 10 mb of msgQueue files, but i heard these were ROM files and not the size they pretend to be...
Best regards Marcel
Marcel,
Try going to \Tools\Options\Devices\Pick the emulator and select Properties\Emulator Options\General\Change the memory size to 256. Make sure your have no saved states (You can use Files\Clear Saved State from running emulator), shutdown the emulator and retry your project.
Thanks,
Vladimir
Carl,
I've setup a standalone workstation for testing VS.Net 2005 Beta 2 and mobile extensions. The workstation has an internal nic that isn't hooked to anything.
I've setup a loopback adapter and set a fixed IP address 192.168.10.1 and is pingable. In the configure TCP/IP Transport screen I've set it to this address, under emulator options I'm pointing to the loopback adapter under "Enable NE2000 PCMCIA network adapter and bind to:". When I try to run the app I'm still getting the Connect to deviced failed error. Any suggestions? I have a PocketPC hooked up through activeSynch USB and that is working but it shouldn't be trying to use that since I'm using the emulator, right? I don't have a choice in VS to choose IRDA as my transport, why?
Thanks,
Don
I experienced the same problem and received help from Sriram, a Microsoft project manager for "Visual Studio for Devices." He said to download the DMA transport update here:
http://www.microsoft.com/downloads/details.aspx?familyid=0E05817F-08D6-48A2-A572-CF77ED72C5BE&displaylang=en
This worked for me.
I blogged about my experience here as well (http://csharponphone.blogspot.com)
CarlBrochu wrote: |
If you have installed a previous version of VS2005 on a computer, you might still have configuration files that are now invalid. Close VS, delete the following directory: \Documents and Settings\<localuser>\Local Settings\Application Data\Microsoft\CoreCon and restart VS |
|
Hi Carl,
I've got the same error message even thou I didn't have beta 1 installed on my computer and have only better 2. I also have EVC4.0 installed. I deleted the content of \Documents and Settings\<localuser>\Local Settings\Application Data\Microsoft\CoreCon and restarted Visual Studio 2005 but I got the same error message again.
Any suggestions?
Thanks a lot,
Natalie.
Hi Vlasdimir, its been a while, i didn't get it to work so I deinstalled everything.
Now I have new hope and am still trying.
I downloaded Mysql.Net connector and it actually does work! with a normal form in vb.net 2005.
I had to add two references: MySQL.data and System.data but when i try the same code as an pocketpc2003 application I get following error:
An unhandled exception of type 'System.TypeLoadException' occurred in System.Windows.Forms.dll
Additional information: Could not load type 'MySql.Data.MySqlClient.MySqlCommand' from assembly 'MySql.Data, Version=1.0.4.20163, Culture=neutral, PublicKeyToken=C5687FC88969C44D'.
This is the code I use:
| |
Imports MySql.Data.MySqlClient Public Class frmMain Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim mySelectQuery As String = "SELECT * FROM tblgebruikers" Dim myConnString As String = "Database=filmmx;Data Source=localhost;User Id=root;Password=*****" Dim myConnection As New MySqlConnection(myConnString) Dim myCommand As New MySqlCommand(mySelectQuery, myConnection) myConnection.Open() Dim myReader As MySqlDataReader myReader = myCommand.ExecuteReader() ' Always call Read before accessing data. Dim i As Integer i = myReader.FieldCount Console.WriteLine(i) ' always call Close when done reading. myReader.Close() ' Close the connection when done with it. myConnection.Close() End Sub End Class |
And I realy like to connect to an mysql server to verify user information.
Manny thanks in advance
Hi,
How do you fix your problem...
Im getting the same message, but i dont undestand where do i have to configure the network
I binded the network adapter of the emulator to the network card in the computer
but it doesnt work.
and where can I check de IP address of the emulator
Thaks a lot.
Problemm solved, I`ve understand that the device need to be configurated itself.
Anyway, your post was very useful
Were you ever able to get a .net 2.0 application to install on your Audiovox 5600? My device says it won't support framework 2.0. :(
Hi.
For the first time I'm actually experiencing this problem on VS.NET 2005 Pro. I've never ever installed the beta.
Everything was fine for a few months then yesterday it started to give me the "The operation could not be completed" message when trying to deploy to my device or even an emulator.
I uninstalled and reinstalled the WM5.0 for Smartphone SDK and this did not seem to make any difference.
What's happening? :(
Running WS2003SP1
just resolved it after replying! I pressed the connect button and seems to deploy now but I dont understand why I have to do this as it always connected automatically....
works...for now :)
well now it appears I cannot recieve any communication from my app within :(
it also appears that its not loading the symbols on the device as the breakpoints dont work, hmmmm :(
I had same problem. So I deleted
CoreCon folder, then run VS2005, it gave a lot of warning dialogs, so I closed it and put saved copy of CoreCon folder back, Then to my surprice the emulator started to work without error.
The project file was corrupted! Replaced it and all is well
live the ne2000 pcmcia uncheck,all the network card configuration ,live it unchek,just go to tcp/ip settings and chose auto.and also the loopback adaptor ip add.,auto. if you still have problem txt me 09202762884 no charge.any problem about emulator.
the ip address for the emullator is auto.