Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / February 2005

Tip: Looking for answers? Try searching our database.

.NET project properties don't take

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jonathan Rynd - 24 Feb 2005 16:31 GMT
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
Studio .NET?
Kyle Alons - 24 Feb 2005 17:01 GMT
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.

Signature

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

> Hi,
>
[quoted text clipped - 23 lines]
> Is there someplace else to set up C++ preprocessor definitions in Visual
> Studio .NET?
red floyd - 24 Feb 2005 17:39 GMT
> VC++.NET has a nasty habit of adding per-file configuration settings when
> converting VC6 project files.  Some of them are necessary (like precompiled
[quoted text clipped - 4 lines]
> attributes).  Then your configuration-level settings will take effect for
> all files.

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
to mind, and a bunch of stuff in the properties dialog).
Kyle Alons - 24 Feb 2005 17:48 GMT
> 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 to
> mind, and a bunch of stuff in the properties dialog).

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.

Signature

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

Jonathan Rynd - 25 Feb 2005 18:01 GMT
> VC++.NET has a nasty habit of adding per-file configuration settings
> when converting VC6 project files

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

What's the "official" way to set per-file configuration settings?
Tarek Madkour [MSFT] - 25 Feb 2005 19:48 GMT
> What's the "official" way to set per-file configuration
> settings?

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

Tarek Madkour, Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers
no rights.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.