473,382 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Dynammically adding project references into the webproject.

Hi,

I am creating a visual studio template in VS.Net 2005. It contains
webproject or website as one of the project.
I am successfully abele to add the references into the other project. using
this following lines of code.
foreach (Project proj in projs){

if (!proj.Name.Contains("BusinessObjects") && !proj.Name.Contains("http"))

{

VSProject2 vsProj = (VSProject2)proj.Object;

vsProj.References.AddProject(boProj);

}

}

As I am trying to add the project reference into webproject I will get an
error as "unable to casat the object of type System.__ComObject into the
type VSLangProj.VSProject2".

Actually I am getting error in the line

VSProject2 vsProj = (VSProject2)proj.Object;

When proj>Object is other than webproject this casting works fine but it
gives error when proj.Object contains the reference of the website project.

Thanks in Advance
Regards,
Anubhav Jain
MTS
Persistent Systems Pvt. Ltd.
Ph:+91 712 2226900(Off) Extn: 2431
Mob : 094231 07471
www.persistentsys.com
Persistent Systems -Software Development Partner for Competitive Advantage.
Persistent Systems provides custom software product development services.
With over 15 years, 140 customers, and 700+ release cycles experience, we
deliver unmatched value through high quality, faster time to market and
lower total costs.

Apr 17 '06 #1
0 909

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: gerry | last post by:
single machine - W2Kserver , IIS5 , VS.NET 2003 I spent some time struggling with what looked like the dreaded asp.net debugging configuration problem but none of the solutions for this did any...
2
by: Stan | last post by:
My project folder path is c:\Projects\FinWeb. I set up FinWeb virtual folder in IIS and pointed it to that path. I can access the web site via http://localhost/FinWeb. However, when I try to add...
1
by: Greg Cyrus | last post by:
"How to organize a Web-Project with DLL-Projects and Forms-Authentication" Hi, i would like to create a multi-tier solution with many projects using ASP.NET such like presentation, biz-logic,...
0
by: MarkusPoehler | last post by:
I have several classic ASP projects running on Webserver. I would like to implement some .net functionalities. Because I need the references I have to "upgrade" the existing ones wit a new .net...
3
by: MIGUEL | last post by:
Hi all, I'm quite lost with how adding web references to a project creates proxy classes. I've developed a web service with two classes inside and that contains three references to three...
1
by: Brian Henry | last post by:
My main project really only has one reference in it that is needed outside of the System references. It references a DLL Class Library which has references in that DLL library to other references...
1
by: Friso Wiskerke | last post by:
Hi All, We've got an VS.2003 ASPNET (VB) webproject which we would like to convert to VS.2005 so that we can make use of the Master Page feature. Converting the initial pages to 2005 is not such...
3
by: _DS | last post by:
The two obvious methods for ref'ing assemblies are: Add a reference and 'Browse' for the actual DLL OR Add existing project to the solution, then add a ref to 'Project'. 1: I'd like to...
0
by: Anubhav Jain | last post by:
Hi, I am creating a visual studio template in VS.Net 2005. It contains webproject or website as one of the project. I am successfully abele to add the references into the other project. using...
5
by: Michael Russell | last post by:
Hi all, Using C#, I've created a simple wrapper class for using Excel. I have Office Pro 2003 installed on my devel machine. The wrapper class works great, reading and writing to/from Excel. ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.