VS2013 C# .net 4.0 솔루션이 있고 C# 프로젝트 (콘솔 응용 프로그램) 중 하나에 "서비스 참조"라는 폴더가 있습니다. 폴더에서 , 두 개의 하위 폴더 새 솔루션에 새 서비스에 기존 서비스 참조 추가
One is : MyReference1, it has files of
configuration.svcinfo
configuration91.svcinfo
MyApplication1.disco (web service Discovery File)
MyApplication2.wsdl (web service description language)
Reference.cs (Visual C# source file)
Reference.svcmap
Another one is: MyReference2, it has files of
configuration.svcinfo
configuration91.svcinfo
MyApplication3.wsdl
MyApplication4.disco
MyApplication4_1.xsd
MyApplication4_2.xsd
MyApplication4_3.xsd
MyProject.MyReference.JobStatus.datasource (visual studio data source file)
Reference.cs
Reference.svcmap
어떤 이유로, 나는 위의 것과 정확히 동일한 서비스 참조와 새로운 솔루션에서 새 프로젝트를 (VS2013 C# .NET을 4.0) 만들 필요가 지금있다 .
새로운 솔루션과 새 프로젝트 (위와 동일한 속성이 있음)를 만든 후 위의 기존 파일을 위의 하위 폴더에 새 프로젝트에 추가하려고했습니다. "Service References"라는 새 폴더와 위와 같은 이름의 하위 폴더를 만들었습니다. 하지만,이 프로젝트를 빌드 할 때, 내가 가지고 예를 들어, 오류, Reference.svcmap에서
:
Error 1 Custom tool error: Failed to generate file: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) C:\MyPATH\MyProject\serviceReference\MyReference2\Reference.svcmap
Reference.cs에서
Error 5 The type or namespace name 'ServiceModel' does not exist in the namespace 'System' (are you missing an assembly reference?) C:\MyPATH\MyProject\serviceReference\MyReference1\Reference.cs (the file was auto-generated by a tool)
폴더의 차이 " 내 프로젝트와 이전 프로젝트에서 "서비스 참조"는 이전 프로젝트의 "Service References"아래에있는 두 개의 하위 폴더 이름이고 폴더 안에있는 파일은 프로젝트에 표시되지 않습니다. 그러나 프로젝트에서 기존 파일로 추가했기 때문에 모든 파일이 표시됩니다. 내가 VS2013를 실행
There was an error downloading 'C:\MyPath\Service References'.
Access to the path 'C:\djx_2014_6_3\MyPath\Service References' is denied.
If the service is defined in the current solution, try building the solution and adding the service reference again.
: 바로 프로젝트를 클릭하고 "주소"부분 (이하 "서비스 참조가"위치)의 경로를 붙여 서비스 참조를 추가
, 나는 오류가 발생했습니다 관리자로.
서비스 참조를 올바르게 추가하는 방법은 무엇입니까?
서비스 참조 추가의 주소 상자에 .wsdl 파일 경로를 추가하고 "이동"을 누른 다음 확인을 누르면 오류가 발생합니다. 현재 파일을 체크 아웃 할 수 없습니다. 파일을 읽을 수 없습니다. 또는 잠겨있거나 파일을 수동으로 확인해야 할 수도 있습니다. " – Lily
프로젝트에 포함 된'service reference' 폴더가 있고 Visual Studio가 해당 파일에 액세스하지 못하는 것 같습니다 .VS를 닫고 솔루션 카탈로그에서 폴더를 제거한 다음, VS를 열고 솔루션 탐색기에서 폴더를 제거합니다 (.csproj 파일에서 해당 폴더를 지우십시오). 다시 wsdl에 대한 추가 -> 서비스 참조 -> 경로 (솔루션 디렉토리에없는 wsdl입니다.)에서 서비스 코드가 생성됩니다. – Anton
이 서비스에는 주소가 있습니다. 서비스를 마우스 오른쪽 단추로 클릭하고 "서비스 참조 구성 ..."옵션을 선택하여 찾을 수 있습니다. 여기에서 주소를 찾으면이 단계를 따라 수행하십시오. 안톤이 말한 –