Gaston Milano's WebLog

About something...

News

General

Usability

VS Automation

VSIP

How to add a reference to a website project by automation

In a previous post I explained how to add a reference to a project by automation.

http://weblogs.asp.net/gmilano/archive/2004/09/23/233494.aspx

This method is not going to work with a website project, for website projects you should:

  • Add a reference to VsWebSite.Interop dll
  • Now you can do something like this:

Imports VsWebSite

Dim project As Project

Dim site As VsWebSite.VSWebSite

project = DTE.Solution.Projects.Item(1)  ' I suppose it is a website project

site = CType(project.Object, VsWebSite.VSWebSite)

site.References.AddFromGAC("System.Data.dll")

This sample add a reference to the first project in the solution to System.Data.dll.

Posted: May 18 2005, 03:42 PM by GMilano | with 5 comment(s)
Filed under:

Comments

Javier Luna said:

I believe that any DataLayer must be a simple code block, that they allow operations against DB.

That code block would not have to know on the Business Entities. Single to specialize it is to execute the operations (Store Procedures and SQL Sentences) against the engine DB (SQL, Oracle, DB2, etc.), with which this setting.

Finally, I invite to you to download the DataLayer.Primitives Public Version.

This is very cool Data Layer :)

DataLayer.Primitives - Readme!
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=1389

Cheers,

Javier Luna
http://guydotnetxmlwebservices.blogspot.com/
# May 25, 2005 10:40 PM

olesja said:

<a href= http://index1.greathal.com >pre teen pageant gown</a>

# February 2, 2008 2:32 AM

Semil said:

<a href= spiritez.com ></a>

# December 5, 2008 8:17 PM

Larcik-ca said:

<a href= membres.lycos.fr/maffals >genetic disorters</a>

# December 26, 2008 11:15 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)