PDA

View Full Version : VC7.1: sln vs. vcproj


Peter Schregle
10-08-2004, 06:16 AM
I've changed my builds from using the sln file to using the vcproj file. Why do I have to change the build configuration then? For example I had to change the build configuration from Debug (worked for sln) to Debug|Win32 (works for vcproj).

Also, choosing All for build configuration does not work with vcproj.

I'm using Visual Build 5.5

Regards,
Peter

kinook
10-08-2004, 03:13 PM
When building an individual project, you specify the project configuration to build; when building a solution file, you specify the solution configuration to build. The names of project and solution configurations aren't necessarily the same (although you could modify them to be the same if you wanted to).

Currently using the All configurations option or regular expressions for the configuration is not supported when building via a project file (instead of using the .sln file).

Since the solution typically has different configuration names than the individual projects, you can often encounter naming configuration naming differences between the two.

We have put adding support for the All configurations option and regular expression support for building individual projects on our list of issues for a future release.

There are several reasons why we feel it is not recommended to build a project file directly:
1) When compiling a project file directly with the VS.Net compiler, it will often randomly determine a related solution file to build instead anyway (uncommanded, behind the scenes) which may or not be an appropriate solution file in your situation (and you have no control over the choice)
2) Whenever you compile in the IDE, the IDE insists on creating a solution file anyway.
3) Project references are maintained in solution files and a typical build will build all the projects in the solution which relies on these references to determine build order and dependencies.

Peter Schregle
10-10-2004, 04:54 AM
Thanks.

We changed from sln to vcproj, because we've had problems with the solution files in SourceSafe, so we decided to have only the vcproj in SourceSafe.

Thus, whenever the whole stuff (a few hundred projects) is moved to another machine, we wanted to avoid the necessity to load every project at least once into the IDE to be able to build with Visual Build.

Peter