Thanks for your response Zafer,
As for suppress the popup dialog, IMO it will be hard to do that since the
steps are determined by the vstemplate and that template is used for both
creating and add existing one.... Anyway, I'll consult some other VS IDE
experts to see whether there is any other means to achieve this... I'll
update you as soon as possible.
Thanks for your patience,
Steven Cheng
Microsoft Online Support

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Zafer Orenlili" <zaferorenlili@hotmail.com>
| References: <uXHeGX7CGHA.1312@TK2MSFTNGP09.phx.gbl>
<q1#108DDGHA.832@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: how to add existing web site into solution
| Date: Thu, 29 Dec 2005 17:00:08 +0200
[quoted text clipped - 17 lines]
| Regards,
| Zafer
Steven Cheng[MSFT] - 04 Jan 2006 02:32 GMT
Hi Zafer,
I've got the answer for your question from our VS IDE developers, here is
the updated AddWEbSite and RemoveWebSite method:
===================================
Sub AddWebSite()
Dim dte2 As EnvDTE80.DTE2
Dim sln2 As Solution2
Dim proj As EnvDTE.Project
Dim tmpFile As String
Dim webPackage As VsWebSite.VSWebPackage
Dim webSites As Projects
Dim sitepath As String =
"http://localhost/StevenRoot/Whidbey/WebSites/IISSite/"
dte2 = DTE
sln2 = dte2.Solution
webPackage = dte2.GetObject("WebPackage")
proj = webPackage.OpenWebSite(sitepath,
VsWebSite.OpenWebsiteOptions.OpenWebsiteOption_None, True)
MsgBox("done")
End Sub
Sub RemoveWebSite()
Dim dte2 As EnvDTE80.DTE2
Dim sln2 As Solution2
Dim proj As EnvDTE.Project
Dim tmpFile As String
Dim webPackage As VsWebSite.VSWebPackage
Dim webSites As Projects
Dim sitepath As String =
"http://localhost/StevenRoot/Whidbey/WebSites/IISSite/"
dte2 = DTE
sln2 = dte2.Solution
webPackage = dte2.GetObject("WebPackage")
webSites = dte2.GetObject("WebSites")
proj = webSites.Item(sitepath)
sln2.Remove(proj)
MsgBox("done")
End Sub
==================================
Also, to use the WebSite related object and collection, you need to add a
reference to the following assembly to have access to the VsWebSite
namespace:
C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\PublicAssemblies\VsWebSite.Interop.dll
You can easily add the reference through VS 2005's Macro IDE....
Hope helps. Thanks,
Steven Cheng
Microsoft Online Support

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 161027794
| References: <uXHeGX7CGHA.1312@TK2MSFTNGP09.phx.gbl>
<q1#108DDGHA.832@TK2MSFTNGXA02.phx.gbl>
<OSAFugIDGHA.2300@TK2MSFTNGP15.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain
[quoted text clipped - 54 lines]
| | Regards,
| | Zafer
Zafer Orenlili - 04 Jan 2006 11:17 GMT
Thank You.
Regards,
Zafer
> Hi Zafer,
>
[quoted text clipped - 133 lines]
> | | Regards,
> | | Zafer
Steven Cheng[MSFT] - 04 Jan 2006 12:06 GMT
You're welcome Zafer,
Feel free to post here when you need our assistance :)
Regards,
Steven Cheng
Microsoft Online Support

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Zafer Orenlili" <zaferorenlili@hotmail.com>
| References: <uXHeGX7CGHA.1312@TK2MSFTNGP09.phx.gbl>
<q1#108DDGHA.832@TK2MSFTNGXA02.phx.gbl>
<OSAFugIDGHA.2300@TK2MSFTNGP15.phx.gbl>
<$balXcSDGHA.1240@TK2MSFTNGXA02.phx.gbl>
<crdthcNEGHA.1240@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: how to add existing web site into solution
| Date: Wed, 4 Jan 2006 13:17:33 +0200
[quoted text clipped - 8 lines]
| NNTP-Posting-Host: host-62-244-194-241.borusantelekom.com 62.244.194.241
| Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP0
9.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.vstudio.extensibility:3617
| X-Tomcat-NG: microsoft.public.vstudio.extensibility
[quoted text clipped - 141 lines]
| > | | Regards,
| > | | Zafer