473,396 Members | 1,792 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,396 software developers and data experts.

Default Project References

If there is a different newsgroup for specific Visual Studio questions then
please let me know - in the meantime perhaps I can post the question here:

It seems that whenever I create new projects, I repeatedly have to add the
same set of References in Solution Explorer. Is there a way of specifying a
default Reference list which will be picked up by all new Projects as a
starting point?

Cheers
Simon
Nov 15 '05 #1
2 1925
Simon,

I don't believe that there is a way to do this. However, I do believe
that you can create your own project types, which you would then specify the
project references that you have to set.

Also, for specific projects, you can modify the references that are
added. I don't know how supported this is, but it should work.

If you look in the directory where VS.NET is installed, you should see
the following directory structure:

<Visual Studio .NET directory>
VC#
VC#Wizards
CSharpAddWinFormWiz
Scripts
1033

1033 I believe is the culture code, and it might be different if you
don't have the US english version installed. In that directory is a file
called "default.js". This is a bit of JavaScript that is run when the
project is created. If you open that up, you should notice a line:

AddReferencesForWinForm(selProj);

This is where the references are added. The code for this method is in
the following directory:

<Visual Studio .NET directory>\VC#\VC#Wizards\1033

Once again, 1033 might be different. Find the "common.js" file. In it,
you should be able to find the function AddReferencesForWinForm. That
function looks like this:

function AddReferencesForWinForm(oProj)
{
var refmanager = GetCSharpReferenceManager(oProj);
refmanager.Add("System");
refmanager.Add("System.Data");
refmanager.Add("System.Drawing");
refmanager.Add("System.Windows.Forms");
refmanager.Add("System.XML");
CollapseReferencesNode(oProj);
}

You should be able to add calls (or remove them if you wish) to the Add
method and add your own references.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Simon" <si****@shalex.co.uk> wrote in message
news:40***********************@mercury.nildram.net ...
If there is a different newsgroup for specific Visual Studio questions then please let me know - in the meantime perhaps I can post the question here:

It seems that whenever I create new projects, I repeatedly have to add the
same set of References in Solution Explorer. Is there a way of specifying a default Reference list which will be picked up by all new Projects as a
starting point?

Cheers
Simon

Nov 15 '05 #2
Nicholas

The "back-door" approach worked well. I wouldn't have worked that one out
though! Shame that there wasn't a more straight-forward approach. I guess
that while I would consider the ability to do this a "must-have", the
requirement is actually more niche in the real world. Oh well, my mind must
work differently to others!

Do you have any more information on creating custom project types?

Many thanks for your help.
Cheers
Simon

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2****************@TK2MSFTNGP11.phx.gbl...
Simon,

I don't believe that there is a way to do this. However, I do believe
that you can create your own project types, which you would then specify the project references that you have to set.

Also, for specific projects, you can modify the references that are
added. I don't know how supported this is, but it should work.

If you look in the directory where VS.NET is installed, you should see
the following directory structure:

<Visual Studio .NET directory>
VC#
VC#Wizards
CSharpAddWinFormWiz
Scripts
1033

1033 I believe is the culture code, and it might be different if you
don't have the US english version installed. In that directory is a file
called "default.js". This is a bit of JavaScript that is run when the
project is created. If you open that up, you should notice a line:

AddReferencesForWinForm(selProj);

This is where the references are added. The code for this method is in the following directory:

<Visual Studio .NET directory>\VC#\VC#Wizards\1033

Once again, 1033 might be different. Find the "common.js" file. In it, you should be able to find the function AddReferencesForWinForm. That
function looks like this:

function AddReferencesForWinForm(oProj)
{
var refmanager = GetCSharpReferenceManager(oProj);
refmanager.Add("System");
refmanager.Add("System.Data");
refmanager.Add("System.Drawing");
refmanager.Add("System.Windows.Forms");
refmanager.Add("System.XML");
CollapseReferencesNode(oProj);
}

You should be able to add calls (or remove them if you wish) to the Add method and add your own references.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Simon" <si****@shalex.co.uk> wrote in message
news:40***********************@mercury.nildram.net ...
If there is a different newsgroup for specific Visual Studio questions then
please let me know - in the meantime perhaps I can post the question here:
It seems that whenever I create new projects, I repeatedly have to add the same set of References in Solution Explorer. Is there a way of

specifying a
default Reference list which will be picked up by all new Projects as a
starting point?

Cheers
Simon


Nov 15 '05 #3

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

Similar topics

2
by: dixie | last post by:
Is there anywhere that I can alter the default reference library files for my access project. Every time I make a new database container for my development, I get stuck with the same group of...
2
by: Joe Wedel | last post by:
I have a Solution with 4 Projects, one of which is not loading. I get the error message: Microsoft Development Environment Unable to read the project file 'CouncilAgenda.vbproj'. The project...
9
by: Anubhav Jain | last post by:
Hi, I am having few .net source files(.cs or .vb) and I want to dynamically generate the corresponding .net project file(.csproj or .vbproj) for them without using visual studio.So that I could...
3
by: Jerad Rose | last post by:
This is regarding Visual Studio 2003 (framework 1.1). We have several projects/libraries. Of course, many of these reference each other. If we only had one solution, we would simply add all of...
2
by: AMDRIT | last post by:
Hello Everyone, I am having an issue with my solution and hoping that you all can suggest a resolution. I have a common library that (A) that three other projects make reference of (B,C,D). ...
3
by: DonJefe | last post by:
Does anyone have experience using project->project references in large solutions? What are the plus/minuses that you have found? Currently, we are using the binary assembly references for our...
3
by: Lance Wynn | last post by:
Hello, I am receiving this error when trying to instantiate a webservice component. I have 2 development machines, both are XP sp2 with VS 2008 installed. On one machine, the code works fine. On...
1
by: Mark Baldwin | last post by:
Steven Thanks for your reply, however the typed datasets are defined in the web service and there seems to way to open the partial class code window - double clicking on the design surface does...
10
by: =?Utf-8?B?SmFtZXMgV29uZw==?= | last post by:
Hi everybody, I'm trying to use the new VB 2008 right now and I want to know how to preset the company name and copyright informtion in Assembly Information. In my current VB 2005, company name...
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: 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?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.