Porting Visual Studio 2005 sln to 2008, warning with vc98 paths in LIB environment variable, how to fix?

I am moving the solution from visual studio 2005 to visual studio 2008. When I create the solution in 2005, I have no problems. However, after using devenv.exe / Upgrade, and then use msbuild to solve, I get the following warnings:

CSC: warning CS1668: Invalid search path '\ vc98 \ lib' specified in 'LIB environment variable' - 'The system cannot find the specified path.' CSC: warning CS1668: Invalid search path '\ vc98 \ mfc \ lib' specified in 'LIB environment variable' - 'The system cannot find the specified path. 'CSC: warning CS1668: Invalid search path' c: \ program files \ microsoft visual studio 9.0 \ vc \ platformdk \ lib 'specified in' LIB environment variable '-' The system cannot find the specified path. '

I checked http://social.msdn.microsoft.com/Forums/en-US/Vsexpressinstall/thread/3f875480-fee2-4bc3-b829-95e220b22a01 and it does not offer me any help because my LIB and INCLUDE environment variables not set to custom or system ones. I looked at Studio Tools> Options> Projects and Solutions> VC ++ Directories and nothing is referencing anything old:

Library files: $ (VCInstallDir) Lib $ (VCInstallDir) atlmfc \ Lib $ (VCInstallDir) atlmfc \ Lib \ i386 $ (WindowsSdkDir) \ Lib $ (FrameworkSDKDir) Lib $ (VSInstallDir) $ (VSInstallDir) Lib

Include files:

$ (VCInstallDir) include $ (VCInstallDir) atlmfc \ include $ (WindowsSdkDir) include $ (FrameworkSDKDir) include

I used the diagnostic output so that I could see exactly what the LIB variable included in the call:

lib = c: \ Program Files \ Microsoft Visual Studio 9.0 \ VC \ ATLMFC \ LIB; c: \ Program Files \ Microsoft Visual Studio 9.0 \ VC \ LIB; C: \ Program Files \ Microsoft SDK \ Windows \ v6. 0A \ lib; \ vc98 \ lib; \ vc98 \ mfc \ lib; c: \ program files \ microsoft visual studio 9.0 \ vc \ platformdk \ lib; c: \ program files \ microsoft visual studio 9.0 \ vc \ lib; c: \ program files \ microsoft visual studio 9.0 \ vc \ atlmfc \ lib; LIBPATH = c: \ Windows \ Microsoft.NET \ Framework \ v3.5; c: \ Windows \ Microsoft.NET \ Framework \ v2.0.50727; c: \ Program Files \ Microsoft Visual Studio 9.0 \ VC \ ATLMFC \ LIB; c: \ Program Files \ Microsoft Visual Studio 9.0 \ VC \ LIB

So, if this vc98 is NOT in my env vars, or my studio and vc98 settings are not even set (or redist), where does this path come from? What process installs env var lib as?

+6
c # windows visual-studio-2008
source share
5 answers

Found on MSDN :

Yes, this is a known issue that arises for some people. Look carefully at your lib path. Immediately after ATLMFC, V, SDK → \ vc98 \ lib. Delete this entry (and the one that follows). If the LIB is a user variable, then you need to restart VS or possibly log out and back. If this is a system variable, then you will have to reboot. Your mistake should disappear.

+2
source share

Here is the solution

http://msdn.microsoft.com/en-us/library/tcbs315h(v=vs.80).aspx

it is referenced by a LIB entry in environment variables

+1
source share

It looks like you covered most of the things here, so the only thing I can think of is the inherited property sheets.

They are specified in the vcproj XML file (or you can check the Property Manager in the IDE):

<VisualStudioProject> <Configurations> <Configuration InheritedPropertySheets="stuff.vsprops">... 

If you have some inherited property sheets, go to the file and see if you have any vc98 lib paths explicitly set?

0
source share

I am wondering if this could be due to a change in the use of the / MT and / MTd compiler switches from / ML and / MLd that occurred for VS2005 related to C runtime libraries?

See here and see if this helps: http://msdn.microsoft.com/en-us/library/abx4dbyh.aspx

0
source share

I have a very similar problem with C # projects in VS.NET2010. It seems that this only affects projects that import C ++ / CLI projects. Projects are still configured for compilation using the v9.0 toolkit (C ++, C ++ / CLI) and .NET 3.5 (C ++ / CLI, C #). Have you really managed to find the source of the problem?

I worked on this by adding warning 1668 to the list of ignored warnings in the properties of the affected projects. This is not ideal, but better than spam on my alert list.

0
source share

All Articles