Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't Add Service Reference to New Console App

I am trying to add a Service Reference to my brand new console app and I am getting the following error:

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

Ref. http://msdn.microsoft.com/en-us/library/t3ec2ktk.aspx

I am not even connected to source control; this is a new project and I didn't check the "Include in source control" checkbox.

I have also tried making the entire project NOT read-only by right-clicking it and unchecking the Read Only box under Properties. However, the project's folder is still read-only... It won't change for some reason.

How can I add my service reference to my project?

like image 326
user1477388 Avatar asked Jul 26 '13 15:07

user1477388


1 Answers

The problem is; I was trying to add a Service Reference, but I should have actually tried adding a Web Reference. As per this page:

Its because you picked service reference, which generates a WCF based stub, which uses different classes and a different programming model. You need to make sure you're creating a web reference, not a service reference (unless you want to use the WCF based stuff), In VS.NET 2008, the web reference option IIRC, is hidden under the advanced button on the add service reference dialog.

Ref. http://boards.developerforce.com/t5/forums/forumtopicprintpage/board-id/general_development/message-id/33779/print-single-message/false/page/1

like image 147
user1477388 Avatar answered Sep 16 '22 11:09

user1477388