Microsoft MVP성태의 닷넷 이야기
VS.NET Addin - 프로젝트 닫기 [링크 복사], [링크+제목 복사]
조회: 6113
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

How do I programmatically unload a project from a solution?
; http://blogs.msdn.com/quanto/archive/2008/01/07/how-do-i-programmatically-unload-a-project-from-a-solution.aspx

대강 발췌해 보면,,,

---------------------------------------------

DTE dte = GetService(typeof(SDTE)) as DTE;

Debug.Assert(dte != null);


//Get the selected project

Project selectedProject = null;

if (dte.SelectedItems.Count > 0)

{

selectedProject = ((SelectedItem)dte.SelectedItems.Item(1)).Project;

}

if (selectedProject != null)

{

IVsSolution solutionService = GetService(typeof(SVsSolution)) as IVsSolution;

Debug.Assert(solutionService != null);


IVsHierarchy selectedHierarchy;

ErrorHandler.ThrowOnFailure(solutionService.GetProjectOfUniqueName(selectedProject.UniqueName, out selectedHierarchy));

Debug.Assert(selectedHierarchy != null);


ErrorHandler.ThrowOnFailure(solutionService.CloseSolutionElement((uint)__VSSLNCLOSEOPTIONS.SLNCLOSEOPT_UnloadProject, selectedHierarchy, 0));


}








[최초 등록일: ]
[최종 수정일: 1/8/2008]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-동일조건변경허락 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.

비밀번호

댓글 작성자
 




1  2  3  4  5  6  7  [8] 
NoWriterDateCnt.TitleFile(s)
18정성태7/17/20034003RegistryEx 클래스 (VC++6.0, Win32) 2000.02.28파일 다운로드1
17정성태9/22/20054866Crypto 클래스 (VC++6.0, Win32) [1]파일 다운로드1
16정성태7/17/20034423Win32 Control Spy (Win32)파일 다운로드1
15정성태7/17/20035103RichEdit Control 클래스 (VC ++ 6.0)파일 다운로드1
1  2  3  4  5  6  7  [8]