Visual Studio: Unable to check out the current file

I’ve received the following error message in Visual Studio right after I’ve tried to add a new service reference:

Unable to check out the current file.  The file may be read-only or locked, or you may need to check the file out manually.

The message was really strange because the Add Service Reference dialog seemed to recognize the service perfectly, and although the project was under source control, we have Git on the server so “check out” did not seem to be the right term here.

The sad truth is that the above error message is completely wrong and the issue has nothing to do with source control. The solution is to click the Advanced button in the Add Service Reference dialog, then click the Add Web Reference button and use the old Add Web Reference dialog to add that particular service to your project even if the URL points to a .svc file.

 

Technorati-címkék: ,,
Advertisements

2 thoughts on “Visual Studio: Unable to check out the current file

  1. Pingback: test code

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s