all groups > visual studio .net ide > february 2005 >
You're in the

visual studio .net ide

group:

.NET project properties don't take


.NET project properties don't take Jonathan Rynd
2/24/2005 8:31:27 AM
visual studio .net ide:
Hi,

We have a project that was originally developed in VC++ 6.0. It had a dsw,
a dsp, and a number of c, cpp, and h files.

We upgraded to .NET (Microsoft Development Environment 2003 7.1.3088) and
opened the DSP file. It was converted into a vcproj and a sln. After
making necessary changes we got it to compile and link.

Then it turned out we needed to modify some preprocessor definitions. In
VC++ 6 we had set them in Project/Settings/C-C++/Preprocessor Definitions.
Those settings carried over into .NET in the Project/Myproj Properties/C-
C++/Preprocessor/Preprocessor Definitions.

So we modified them there, recompiled, and found that our changes had no
effect. The new preprocessor definitions showed up as undefined, and old
preprocessor definitions that we had removed showed up as defined. We
closed MSDE and re-opened it; our changes still showed up in the
Preprocessor Definitions section but had no effect on the code.

We can make other changes to the project properties and they do take effect
-- the preprocessor definitions are the only ones that don't take.

Is there someplace else to set up C++ preprocessor definitions in Visual
Re: .NET project properties don't take red floyd
2/24/2005 9:39:04 AM
[quoted text, click to view]

Where were the vaunted MS usability labs when they were developing the
VS.NET (and VS.NET 2K3) UIs? It seems that they broke a bunch of stuff
in the VS6 UI that worked a lot better (class wizard immediately comes
Re: .NET project properties don't take Kyle Alons
2/24/2005 10:01:08 AM
VC++.NET has a nasty habit of adding per-file configuration settings when
converting VC6 project files. Some of them are necessary (like precompiled
header settings for stdafx.cpp, for instance), but many of them are often
superfluous (like preprocessor settings). One way to resolve it is to
manually open the .vcproj file and remove any unnecessary
<FileConfiguration> elements (and/or its PreprocessorDefinitions
attributes). Then your configuration-level settings will take effect for
all files.

--
---------------------------------------------------
Automate your software builds with Visual Build Pro
http://www.visualbuild.com/

[quoted text, click to view]

Re: .NET project properties don't take Kyle Alons
2/24/2005 10:48:43 AM
[quoted text, click to view]

Like not being able to select all configurations and add a preprocessor def
or something without blowing away all the configuration-specific info?
Yeah, there are a few of those that can really make your day.

--
---------------------------------------------------
Automate your software builds with Visual Build Pro
http://www.visualbuild.com/


Re: .NET project properties don't take Jonathan Rynd
2/25/2005 10:01:12 AM
"Kyle Alons" <reply@to.newsgroup> wrote in
news:OtemxJpGFHA.1528@TK2MSFTNGP09.phx.gbl:

[quoted text, click to view]

Thanks! Suspected it was something like that, didn't know where it would
be set though.

Re: .NET project properties don't take Tarek Madkour [MSFT]
2/25/2005 11:48:19 AM
Jonathan Rynd <q7a3ofvtcm502@atsneakemail.com.invalid> wrote in
news:Xns9608846F4A709jrr7hotmailcom@207.46.248.16:

[quoted text, click to view]

You should set per-file properties if you need to override a
project-level property at the file level. For example, build that
file with a specific define, or compile that file /clr or
something else.

The bug that was referenced earlier in the thread unnecessarily
replicated the project level properties at the file level. It was
unnecessary because the values did not need to be overriden. We
were actually overriding them to the same value that they were.

One workaround for that bug was to upgrade the projects to VS2002
first and then upgrade from VS2002 to VS2003 (where you wouldn't
get that nasty bug).

Thanks,
--
Tarek Madkour, Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers
AddThis Social Bookmark Button