Visual Studio에서 다른 폴더로 프로젝트 이동
Visual Studio에서 프로젝트를 다른 폴더로 어떻게 이동합니까? 내 프로젝트 에서이 구조에 익숙합니다.
-- app
---- Project.Something
---- Project.SomethingElse
전체 네임 스페이스 SomethingElse의 이름을 SomethingNew로 바꾸고 싶습니다. 수동으로 .sln 파일로 이동하지 않는 가장 좋은 방법은 무엇입니까?
솔루션 탐색기 창에서 마우스 오른쪽 버튼으로 클릭하고 제거를 선택하여 솔루션에서 프로젝트를 제거하십시오. 하위 디렉토리를 포함하여 전체 프로젝트 폴더를 원하는 곳으로 이동하십시오. 솔루션에 프로젝트를 다시 추가하십시오.
네임 스페이스 이름은 완전히 다른 것입니다. 소스 코드 만 편집하면됩니다.
프로젝트를 제거하고 다시 추가하라는 제안을 시도했지만 종속성을 수정하는 것이 어려울 수 있습니다.
나는이 접근법을 사용한다 :
- 프로젝트 폴더를 이동하십시오.
- 프로젝트가 소스 제어에있는 경우 소스 제어 명령을 사용하여 이동하십시오.
- 텍스트 편집기에서 솔루션 파일을 편집하십시오. 변경해야 할 경로는 하나만 있어야합니다.
- VS2012에서 솔루션을 닫으십시오
- 프로젝트를 새 위치로 이동
- 솔루션을 엽니 다
- 로드하지 못한 프로젝트를 선택하십시오
- 속성 도구 창에는 새 프로젝트 위치를 선택할 수있는 편집 가능한 "파일 경로"항목이 있습니다.
- 새로운 경로를 설정
- 프로젝트를 마우스 오른쪽 버튼으로 클릭하고 다시로드를 클릭하십시오.
실제로 나를 위해 일한 것은 다음과 같습니다.
- 솔루션에서 프로젝트를 제거하십시오.
- 텍스트 편집기로 프로젝트 파일을 편집하십시오.
- 모든 관련 경로를 "패키지"로 업데이트하십시오. 제 경우에는 프로젝트를 더 깊은 폴더로 옮겼 기 때문에 ".. \ packages"를 "...... \ packages"로 변경해야했습니다.
- 프로젝트를 솔루션에 다시로드하십시오.
도움이 되었기를 바랍니다.
나는 같은 문제가 있었다. 나는 참조를 변경하지 않고 참조를 이동하고 15 분 이내에 해결했습니다.
나에게 해결책은 간단했다.
- 필요한 곳으로 파일을 이동하십시오.
- 이름이 .vs 인 폴더를 삭제하십시오. 보이지 않는 폴더 여야합니다.
- note 또는 notepad ++와 같은 간단한 편집기를 사용하여 솔루션 파일 (.sln)을 엽니 다.
- 다음 구조를 사용하여 파일이있는 참조를 변경하십시오. 프로젝트를 같은 폴더에 넣으면 이전 폴더 또는 참조 ".. \"를 제거하십시오. 위의 폴더에 넣으면 참조 ".. \"또는 폴더 이름을 추가하십시오.
- 변경 사항이있는 파일을 저장하십시오.
- 프로젝트 파일 (.csproj)을 열고 동일한 작업을 수행하거나 참조를 제거하거나 추가하십시오.
- 변경 사항을 저장하십시오.
- 솔루션 파일을여십시오.
예 :
솔루션 파일 (.sln)
원본 : Project ( "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PATH1.UI", " 스캐너 PDF \ PATH1.UI \ PATH1.UI.csproj", "{A26438AD-E428-4AE4-8AB8-A5D6933E2D7B } "프로젝트 ("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} ") ="PATH1.DataService "," ScannerPDF \ PATH1.DataService \ PATH1.DataService.csproj ","{ED5A561B-3674-4613-ADE5-B13661146E2E } "
신규 : Project ( "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PATH1.MX.UI", "PATH1.MX.UI \ PATH1.UI.csproj", "{A26438AD-E428-4AE4-8AB8 -A5D6933E2D7B} "프로젝트 ("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} ") ="PATH1.DataService ","PATH1.DataService \ PATH1.DataService.csproj ","{ED5A561B-3674-4613-ADE5-B13661146E2E } "
프로젝트 파일에서 :
기발한:
새로운:
원본 참조 : .... \ lib \ RCWF \ 2018.1.220.40 \ TelerikCommon.dll
새로운 참조 : .. \ lib \ RCWF \ 2018.1.220.40 \ TelerikCommon.dll
VS2012에서는 쉽습니다. 변경 매핑 기능을 사용하십시오.
- 솔루션을 이동할 폴더를 작성하십시오.
- 모든 프로젝트 파일을 체크인하거나 (변경 사항을 유지하려는 경우) 체크 아웃 된 파일을 롤백하십시오.
- 솔루션을 닫습니다.
- Open the Source Control Explorer.
- Right-click the solution, and select "Advanced -> Remove Mapping..."
- Change the "Local Folder" value to the one you created in step #1.
- Select "Change".
- Open the solution by double-clicking it in the source control explorer.
in visual studio comunity 2019, i did what Victor David Francisco Enrique says, but needed only to delete the .vs invisbile folder
In VS 2015
- Unload your project in the solution explorer
- Create a new solution
- Copy the projects to the new solution's folder
- Right click the solution, add existing project.
- If you use some framework such as
MVC
, you may need to add the reference in the reference manager.
I figured out this try this it worked for me.
In visual studio 2017 community edition it creates a project at this path "C:\Users\mark\source\repos\mipmaps\mipmaps" This will create a access to file is denied issue
Now, you can fix that this way.
close your visual studio process. Then, find your project and copy the project folder But, first make a Sub-folder Named Projects inside of your visual studio 2017 folder in documents. Next, paste the project folder inside of your visual studio 2017 Project folder not the main visual studio 2017 folder it should go into the Sub-folder called Projects. Next, restart Visual studio 2017 Then, choose Open project Solution Then, find your project you pasted in your visual studio 2017 Projects folder Then clean the Project and rebuild it , It, should build and compile just fine. Hope, this Helped out anybody else. Not to sure why Microsoft thought building your projects in a path where it needs write permissions is beyond me.
I wanted the changes in Git to be shown as moves/renames instead of delete & adds. So I did a combo of the above and this post.
mkdir subdirectory
git mv -k ./* ./subdirectory
# check to make sure everything moved (see below)
git commit
And adjust the paths of the projects and of the assemblies from the nuget Pkg's in the sln file via a text editor.
- Copy the project folder to new destination
- Remove your project from solution (Right-click the project in "Solution Explorer" and choose "Remove")
- Then add existing project to solution (Right-click the project in "Solution Explorer" and choose "Add" then "Existing project")
- Change path to "packages" folder in "YourProjectName.csproj" file (Open in notepad and change paths for linked packages)
Group related projects together using solution folders
See http://msdn.microsoft.com/en-us/library/vstudio/c6c756s6(v=vs.100).aspx
참고URL : https://stackoverflow.com/questions/2620027/visual-studio-move-project-to-a-different-folder
'IT' 카테고리의 다른 글
Node.js를 사용하여 JSON 파일로 데이터 쓰기 / 추가 (0) | 2020.05.28 |
---|---|
Junit Test의 기본 Spring-Boot application.properties 설정 재정의 (0) | 2020.05.28 |
Xcode에서 벡터 이미지는 어떻게 작동합니까 (예 : pdf 파일)? (0) | 2020.05.28 |
mongodb에서 ISODate를 사용한 날짜 쿼리가 작동하지 않는 것 같습니다. (0) | 2020.05.28 |
javax.faces.application.ViewExpiredException :보기를 복원 할 수 없습니다 (0) | 2020.05.28 |