msbuild whackiness

F

Frank Rizzo

Hello, I am trying to use msbuild to try and automate the building
process. It does compile fine, but I get the following warning:

CSC : warning CS1668: Invalid search path 'C:\Program Files\Microsoft
Visual Studio .NET 2003\VC7\ATLMFC\LIB' specified in 'LIB environment
variable' -- 'The system cannot find the path specified. '

Now I do have VS 2003 installed on the box as well. However the warning
says that the following path is specified in the LIB environment
variable (which it isn't - I checked both system and user environment
variable).

What is the problem here?
Thanks.
 
N

Nicholas Paldino [.NET/C# MVP]

Frank,

Check in the project file. Variables can be defined there, I believe.
 
F

Frank Rizzo

Nicholas said:
Frank,

Check in the project file. Variables can be defined there, I believe.

I did. There is absolutely nothing there that refers to that directory.
 
W

Willy Denoyette [MVP]

| Nicholas Paldino [.NET/C# MVP] wrote:
| > Frank,
| >
| > Check in the project file. Variables can be defined there, I
believe.
|
| I did. There is absolutely nothing there that refers to that directory.

Are you sure LIB is not in the environment? Did you run a set command from
the command line?

Willy.
 
T

tbirdsall

Hi Frank,

Make sure that you check both your User Variables and System Variables.
Both LIB variables have a value of:

C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Lib\
 
F

Frank Rizzo

Willy said:
| Nicholas Paldino [.NET/C# MVP] wrote:
| > Frank,
| >
| > Check in the project file. Variables can be defined there, I
believe.
|
| I did. There is absolutely nothing there that refers to that directory.

Are you sure LIB is not in the environment? Did you run a set command from
the command line?

Willy.
I am absolutely sure. I've checked and rechecked because I couldn't
believe it. I didn't run anything from the command line. Simply opened
the command line, went to the solution directory and typed in msbuild.
 
W

Willy Denoyette [MVP]

| Willy Denoyette [MVP] wrote:
| > | > | Nicholas Paldino [.NET/C# MVP] wrote:
| > | > Frank,
| > | >
| > | > Check in the project file. Variables can be defined there, I
| > believe.
| > |
| > | I did. There is absolutely nothing there that refers to that
directory.
| >
| > Are you sure LIB is not in the environment? Did you run a set command
from
| > the command line?
| >
| > Willy.
| >
| >
| I am absolutely sure. I've checked and rechecked because I couldn't
| believe it. I didn't run anything from the command line. Simply opened
| the command line, went to the solution directory and typed in msbuild.

Sorry if I wasn't clear, but my question was.... did you run "set" from the
command line without arguments, this will output the actual environment
params. I can't see why else the warning message would mention this:
..... specified in 'LIB environment ...

Willy.
 
F

Frank Rizzo

Gabriel said:
Yeh, or running "echo %lib%" from the command line should work too...

Ok, I figured it out. If you run msbuild from a generic cmd.exe window,
for some reason msbuild itself adds vs2003 directories to the lib
variable. So I simply went to vsvars32.bat file in the vs2003 folder
structure and removed the ...VC7\ATLMFC\LIB folder from it (since I
don't even have it) and it all compiles fine no warnings.

The LIB env var in various command windows is thus:

cmd.exe
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\

vs2005 command prompt
C:\Program Files\Microsoft Visual Studio 8\VC\LIB;
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib;
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\

vs2003 command prompt (i have that installed as well)
C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\ATLMFC\LIB;
C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\LIB;
C:\Program Files\Microsoft Visual Studio .NET
2003\VC7\PlatformSDK\lib\prerelease;
C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\lib;
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\lib;
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top