===== .NET Farmwork 4.x / Mono 프로그램 원격 디버깅 및 실행 방법 ===== 이 문서는 ComfilePi와 같은 Linux PC 환경에서 .NET Farmwork 4.x / Mono으로 개발된 프로그램을, 원격 설정을 통해 ComfilePi에서 직접 디버깅하고 실행하는 방법을 설명합니다.\\ 이 방식을 사용하면, Visual Studio가 설치된 개발 PC에서 코드를 수정한 후 바로 ComfilePi에서 실행 결과를 확인하며 빠르게 개발할 수 있습니다. * 배포, 실행, 디버그 기능을 원격으로 실행해 가며 사용 할 수 있습니다. * 본문서는 .NET Farmwork 4.x / Mono로 개발된 프로그램의 리모트 환경 설정 방법을 설명합니다. * Visual Studio 2022에서 "F5" 키 입력만으로 ComfilePi(Linux PC)에서 디버깅, 실행, 배포을 수행할 수 있습니다. ===== 설치 및 사양 ===== ^ ^ Date ^ Release Notes ^ | {{ :cfnet:remoteprogramming_mono:comfiletech.remotemonodebugger_v1.1.zip }} | 2025-04-24 | [[http://www.comfilewiki.co.kr/en/doku.php?id=comfilepi:dotnet_core_development:remote_debugger:release_notes:index|Release Note]] | 위 파일을 다운로드한 후 설치합니다. 설치할 때는 Visual Studio가 실행 중이지 않은 상태여야 합니다. ==== 개발PC ==== * Windows 10 이상, 64비트 * 비주얼 스튜디오 2022 ==== Linux PC(Target PC) ==== * SSH Enable / SSH 인증키 발급 * Mono 6.12 이상 ==== 1. SSH 인증키 ==== 보안상의 이유로, Windows에 설치된 "OpenSSH"를 이용한 비밀번호 인증은 허용되지 않습니다.\\ 이러한 이유로, Windows 개발 PC와 ComfilePi(Linux PC)는 원격 장치 간에 Public/Private Key 인증을 사용하여 구성해야 합니다.\\ * Public / Private Key 생성은 OS 이미지 설치 도구인 [[https://www.raspberrypi.com/software/|"Raspberry Pi OS"]]를 이용하여 매우 쉽게 수행할 수 있습니다. * [[http://www.comfilewiki.co.kr/en/doku.php?id=comfilepi:raspbian:index|ComfilePi Os]]를 다운로드 받아[[https://www.raspberrypi.com/software/|"Raspberry Pi OS"]]를 사용하여 Public Key를 생성합니다. * Public Key가 포함된 OS를 ComfilePi에 설치하여 사용합니다. * 인증키 생성 시 Private / Public Key는 Windows 개발 PC에 자동 생성되어 저장됩니다 | {{ :cfnet:remoteprogramming:pi_imager_1.png?nolink |}} | {{ :cfnet:remoteprogramming:pi_imager_2.png?nolink |}} | ※ 더 많은 내용은 [[https://www.raspberrypi.com/documentation/computers/remote-access.html#ssh|Raspberry Pi's documentation ]]에서 확인할 수 있습니다. ==== 2. SSH 인증 확인 ==== 다음 명령어를 이용하여 개발 PC(Windows Pc)와 ComfilePi(Linux Pc)간의 ssh인증을 확인할 수 있습니다. {{ :cfnet:remoteprogramming:test_ssh.mp4?900x506 |}} ==== 3. 프로젝트 업그레이드 ==== Visual Studio에서 작성된 .NET Framework 4.x 프로젝트는 Assistant Upgrade 기능을 사용하여 SDK 스타일 프로젝트로만 업그레이드해야 합니다.\\ 단, .NET 5 이상으로는 업그레이드하지 마십시오. {{ :cfnet:remoteprogramming_mono:upgrade_to_sdk.mp4?900x755 }} ==== 4. Visual Studio 설정 및 사용 ==== 위 과정을 마친 후, Debugger 실행 구성 프로필을 프로젝트에 추가합니다. 프로필 설정은 “Remote Machine”, “Remote User”,“Remote Directory” 만 설정하면 됩니다. * Remote Machine : ComfilePi의 IP 주소 * Remote User : ComfilePi의 User name "pi" * Remote Directory : 파일이 배포되고 실행되는 ComfilePI의 디렉토리 경로(default : /home/pi/. ) {{ :cfnet:remoteprogramming_mono:mono_remote_debugger_add_profile.mp4?900x608 |}} ==== 5. 디버그 확인 ==== 만약 문제가 발생한다면 “Remote .NET Debugger” 확인해 주세요. {{ :cfnet:remoteprogramming:remote_net_debugger_output.png?nolink |}}