Solved

Visual Studio 6: How to set default workspace directories?

Posted on 2000-05-15
10
477 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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
 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need some help with listview limit text 20 112
FMX StringGrid1->Canvas->FillRect Problem 3 171
How can i compile this github project?? 2 91
FMX TCameraComponent Problem 2 84
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

838 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