Programing

appharbor에서 웹 서비스를 빌드 할 때 nuget.exe를 찾을 수 없습니다.

lottogame 2020. 9. 22. 21:00
반응형

appharbor에서 웹 서비스를 빌드 할 때 nuget.exe를 찾을 수 없습니다.


codeplex를 사용하여 appharbor에서 내 웹 서비스를 배포하려고합니다. 처음 시도하고 몇 가지 조사를 한 후 NuGet을 사용해야 참조를 찾을 수 있다는 것을 알았습니다 ..

이제 해결 방법을 모르는 오류가 하나만 남았습니다.

   "D:\temp\g3wyilvx.uln\input\WebService\Webservice.sln" (default target) (1) ->
   "D:\temp\g3wyilvx.uln\input\WebService\Webservice\Webservice.csproj" (default target) (2) ->
   (CheckPrerequisites target) -> 
     D:\temp\g3wyilvx.uln\input\WebService\.nuget\nuget.targets(72,9): error : Unable to locate 'D:\temp\g3wyilvx.uln\input\WebService\.nuget\nuget.exe' [D:\temp\g3wyilvx.uln\input\WebService\Webservice\Webservice.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.17

이 오류를 어떻게 해결해야합니까? 미래에 도움이 될만한 유용한 링크도 감사드립니다.


NuGet.targets 파일에서이 줄을 변경하고 true로 설정하여이 문제를 해결했습니다.

<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">true</DownloadNuGetExe>

하지만이 기능 을 적용하려면 Visual Studio를 다시 시작하거나 솔루션을 다시로드해야합니다 ( 참조 ).


솔루션을 마우스 오른쪽 버튼으로 클릭하여 문제를 해결하고

Enable NuGet Package Restore

실행 파일은 다음을 통해 .gitignore에서 무시 될 수 있습니다.

*.exe 

.gitignore에 다음 줄을 추가합니다.

!.nuget/NuGet.exe

  • NuGet 패키지 복원 활성화 여기에 이미지 설명 입력
  • Right click on solution then
  • select Enable NuGet Package Restore

Here's a blogpost on using NuGet package restore with AppHarbor. In your case, the problem might be that you haven't included the .nuget folder in your repository.


I faced this issue, when one of my colleague added a new project in solution. He added new packages from nuget. The above top rated answer was not acceptable for me because once I update nuget packages, it updates all referenced libraries in the project.

How I removed this error, by just removing import statements for nuget package from .csproj files.

To do so, right click on .csproj file, and open it in notepad and remove the statement.

참고 URL : https://stackoverflow.com/questions/13932154/unable-to-locate-nuget-exe-when-building-webservice-on-appharbor

반응형