2
votes

I got the following error message from Visual Studio at deploy stage to the mobile device:

An operation was attempted on something that is not a socket

The only solution that worked was removing entire application folder from the Program Files on the device - described in http://mobileworld.appamundi.com/blogs/petevickers/archive/2010/06/30/vs2008-an-operation-was-attempted-on-something-that-is-not-a-socket.aspx.

Can anybody suggest a better solution as remove-redeploy harms productivity.

Details:

  • Visual Studio 2008 (9.0.30729)
  • Device is PDA, PSION EP10 running Windows Mobile 6.5
  • The problem happened abruptly after some time of normal deployment

Another related thread I found didn't help - http://social.msdn.microsoft.com/Forums/en-US/windowsmobiledev/thread/18e06e4f-f5b3-4e6f-a5a6-ff2ba26c69d7/

2
Ilia you have accepted the below answer, but it does not give any solution. Have you come up with anything better than deleting files?Rumi
It's been a while ago :). I believe the solution was to remove or disable copy of the content files, as the answer points out. Possibly, you should delete the application data, as in the link. Unfortunately I don't remember the details and have no setup to check it.Ilia Barahovski

2 Answers

2
votes

I had the same problem. After looking at:

http://social.msdn.microsoft.com/Forums/en-US/windowsmobiledev/thread/18e06e4f-f5b3-4e6f-a5a6-ff2ba26c69d7/

I found out that when I'm deploying an application to the PDA using Visual Studio, it deploys also a folder I have in my project that don't contains code but some content files that I asked Visual Studio to copy to the output directory. I guess Visual Studio don't have permissions to override it, therefore the deploy fails, but not in the first time you are deploying this application.

To solve the problem you need to delete the directory. Maybe try to do it using a post build event.

-1
votes

I have seen similar issues in the past.

  • They had to do with the deployment directory path. I changed the deployment dir (from %Program Files%) and then the issue was gone.

  • Possibly, if something has been corrupted with the project/solution files, just start a new project and copy over all files/code from the original one and then start-over with the new solution/project.

  • In another case the application was still running on the device. And so the deployment failed.

  • When debugging DLL projects you have to set an exe for the debug session.