Microsoft MVP성태의 닷넷 이야기
VS.NET Addin - 프로젝트 닫기 [링크 복사], [링크+제목 복사]
조회: 6144
글쓴 사람
정성태 (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)
173정성태4/12/201111210레지스트리 : 11. BHO를 IE와 탐색기에서 선택적으로 로드하고 싶다면?
172정성태4/1/201110164.NET : 44. ContextBoundObject
171정성태3/30/201110032.NET 4.0 : 1. ASP.NET WF4 / WCF and Async Calls
170정성태3/25/20119816.NET 3.0 : 5. WCF How To’s Index [2]
169정성태3/10/201111211.NET : 43. 열려진 소켓 포트를 소유한 Process ID 구하는 방법 [2]
165정성태10/20/201010813레지스트리 : 10. 탐색기의 특정 폴더에 대해 Webdev.WebServer40.exe 로 호스팅을 시작하는 메뉴 추가
164정성태10/11/201010064.NET : 42. Writing Windows Shell Extension with .NET Framework 4 (C#, VB.NET)
163정성태8/27/20108868.NET : 41. Writing Files from Low-Integrity Processes
162정성태8/24/20109030.NET : 40. Self STS
161정성태5/16/201011959.NET : 39. #SNMP - C# Based Open Source SNMP for .NET and Mono
160정성태5/11/20109001.NET : 38. How to get info from client certificates issued by a CA (C#)
159정성태4/30/20108867.NET : 37. How to write a VS2010 Extension using Statement Lambdas
158정성태12/20/200922826명령행 : 6. 배치 파일에서 현재 디렉터리 알아내는 방법 [1]
157정성태11/12/20099580.NET : 36. Dictionary<,> 개체 직렬화
156정성태11/10/200910734.NET : 35. UDP 패킷의 경유 IP 설정 (Source Routing)
155정성태11/4/20099374.NET : 34. MSDeploy 명령행에 대응되는 C# 코드 예제
154정성태7/13/20098908.NET 3.0 : 4. WCF - 연결 개체 닫기
153정성태6/29/20098283.NET : 33. Creating audio signals in .NET
152정성태1/6/20098905.NET 3.0 : 3. WPF - StatefulUserControlBase.cs
151정성태1/1/200911599.NET : 32. Wake-On-Lan C# 코드 [1]
150정성태12/12/20088257.NET 3.5 : 7. ETW / .NET Framework 3.5
149정성태12/3/20088693Win32 : 4. Using Windows Vista Built-In Double Buffering
148정성태11/25/20087641.NET : 31. ThreadPool.UnsafeQueueNativeOverlapped [1]
147정성태11/21/20086908.NET 3.5 : 6. ProcessGeneratedCode
146정성태10/29/20086807레지스트리 : 9. How to detect what .NET Framework X service pack is installed
145정성태5/6/20087050.NET : 30. XML Serializable Dictionary
1  [2]  3  4  5  6  7  8