Solved

Visual Studio 6: How to set default workspace directories?

Posted on 2000-05-15
10
472 Views
Last Modified: 2008-03-06
My workspace consists of many projects.  Each project creates a console application.  By default, Visual Studio creates Debug and Release directories as subdirectories of each project.  I want one Debug and Release directory for the entire workspace (elsewhere on the disk).  I also want all the objects and libraries to be built in the same intermediate directory, also elsewhere.

For each project, under Settings, I can override the default assignment.  But I must do this each time I add a new project to the workspace (and I have many projects).

Is there some way to set up "default project options for this workspace" so I don't have to specify these directories (and other options) each time?
0
Comment
Question by:elfield
  • 3
  • 3
  • 3
  • +1
10 Comments
 

Expert Comment

by:sanjeev_rao
ID: 2812722
Do you want it to be done for existing projects also?

Or only for ones you will add from now on?
0
 
LVL 22

Expert Comment

by:nietod
ID: 2812728
As far as I know--no.  Its something I've wanted to.  With all the settings in a project!

The alternative is to use makefiles and/or the command line (batch files) to automate the build.  
0
 

Author Comment

by:elfield
ID: 2813298
sanjeev, either way is okay because this is my first Visual Studio project.  

I've used the Borland IDE for many years, and with it, defining a set of common options is easy.

nietod, regarding makefiles, I already made one that does the job.  But I'd like to take advantage of the features of Visual Studio.
0
 
LVL 4

Expert Comment

by:abancroft
ID: 2814666
If this is for new projects, create an empty console project & give it the settings you require. This will be your 'template' project.

Now copy & rename the template project as you need. You'll need do some search & replace in a text editor once you've renamed it.

Depending on how complex your apps are, this may not gain you anything, but it might be worth a try.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2814842
Where are you doing the search and replace?  what are you searching and replacing?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 4

Expert Comment

by:abancroft
ID: 2814957
The project name isn't just defined by the project filename, it's embedded in the DSP file.

So if I've created a template project (let's call it con_template.dsp) and want to use it to create an actual project (called foo), you have to:
1. Copy con_template.dsp to foo.dsp
2. Open foo.dsp in a text editor (e.g. the DevStudio one)
3. Search for all occurences of "con_template" and replace them with "foo".
0
 

Author Comment

by:elfield
ID: 2815012
abancroft, just to make sure I follow you:

1.   create a default project as a template.

2.   copy <default>.dsp to <newproject>.dsp.

3.   Using a simple text editor, replace all occurences of <default> with <newproject>".

4.   Open Visual Studio.  Open the workspace, right-click on the Workspace, and choose "Insert project into workspace", and pick <newproject>.dsp.

5.   Repeat steps 2-4 for each project.

Is that correct?

     
0
 
LVL 4

Accepted Solution

by:
abancroft earned 50 total points
ID: 2815175
That's it (remember to set your default project setting sin step 1).

Like I said, it may not gain you anything - it's dependent on how many default settings apply to all projects. You'll know if it's worth doing after the 1st couple of projects.

If you have lots of projects, you may be able to automate it further using DevStudio macros. I can't help you there - it not an area I'm too familiar with.
0
 

Author Comment

by:elfield
ID: 2815186
Thanks very much.  (The Borland method is much easier.  I hope this is not the first of a series of disappointments using Visual Studio.)
0
 
LVL 22

Expert Comment

by:nietod
ID: 2815311
I did not realize that the .dsp and .dsw files were ASCII.  I asumed they are binary.  Interestingly however they have comments at the top that explicitly warn against editing them.  I can't imagine why though, other than they don't want you making mistake in them.
'
>>  I hope this is not the first of a series of
>> disappointments using Visual Studio
Both have their advantages and dissadvantages, but I think overall you will find that VC is better.  
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now