error MSB6001: Invalid command line switch for "CL.exe"

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I recently converted a solution and its projects from Visual Studio 2008 to Visual Studio 2010.
The automatic migration wizard did all the magic for me.
When I try to build it through the "devenv ......" command, it fails with
1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0PlatformsWin32Microsoft.Cpp.Win32.Targets(147,5): error MSB6001: Invalid command line switch for "CL.exe". Item has already been added. Key in dictionary: Path
Key being added: PATH
But, if I run the compile command directly, it compiles correctly.
Any ideas?

Here is the log file...
=================================
Build started 7/27/2010 11:23:20 AM.<br/>
1>Project "E:vs2010ITSM4DEV.100614Aagentsexchangebuildwinnttdpexcc.vcxproj" on node 2 (build target(s)).<br/>
1>InitializeBuildStatus:<br/>
Touching ".Debugtdpexcc.unsuccessfulbuild".<br/>
CustomBuild:<br/>
All outputs are up-to-date.<br/>
ClCompile:<br/>
e:Program Files (x86)Microsoft Visual Studio 10.0VCBinCL.exe /c /I.debug /I......commonwinnttsmapi611 /I........sharedprotocol /I........sharedwinnt /I........sharedutil /I........commonba
/I........commoncu /I........commonwinntsupincl /I........commonnls /I........commonsrc /I........commonstring /I........commonthrd /I........commonut /I........commonwinnt /I........commonwinntdsmutil /I........commonopt
/I........commonpol /I........commoncom /I........commonfio /I........commonfilem /I........commonfs /I........commonhsm /I........commonlicense /I........commonmem /I......common /I......commonwinnt /I......commonnls
/I......commonthrd /I......exchangecommon /I......exchangewinnt /I......exchangewinnte2k /I......exchangemapi /I......exchangemapiwinnt /Zi /nologo /W3 /WX- /Od /Oy- /D _DEBUG /D _THREADS /D DSM_STANDALONE_PROGRAM /D DSM_UTILITIES_PROGRAM
/D WIN32 /D _CONSOLE /D DSMAPILIB /D W32 /D EXC /D _WIN32_DCOM /D TSMAPIPROXY /D _LONG_LONG /D _VC80_UPGRADE=0x0710 /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo".Debug/" /Fd".Debug/vc100.pdb" /Gd /TP /wd4996 /analyze-
/errorReport:prompt ........commoncommonlibagentsEliminator.cpp ........commoncuanscmcvt.cpp ........commonlicensealmgr.cpp ........commonlicenseoemLayer.cpp ........commonnlsamsglog.cpp ........commonnlsamsgrtrv.cpp ........commonnlsansnls.cpp
........commonnlsnlsobj.cpp ........commonnlsnlsstr.cpp ........commonstringDStringUtils.cpp ........commonthrdpkthread.cpp ........commonutansutil.cpp ........commonutdateutil.cpp ........commonutdstimer.cpp ........commonutglobaldata.cpp
........commonutinstr.cpp ........commonutlogutils.cpp ........commonutnumutils.cpp ........commonutpkfile.cpp ........commonuttrace.cpp ........commonuttraceplus.cpp ........commonwinntcommutil.cpp ........commonwinntpkint64.cpp
........commonwinntpsStrUtils.cpp ........commonwinntpsdate.cpp ........commonwinntpsdateutil.cpp ........commonwinntpsfile.cpp ........commonwinntpsfutil.cpp ........commonwinntpsnls.cpp ........commonwinntpsstr.cpp
........commonwinntpsthread.cpp ........commonwinntpsutil.cpp ........commonwinntwinvers.cpp ........sharedutiltsmcrc.cpp ......commonadsmutil.cpp ......commonagtlog.cpp ......commonagtmem.cpp ......commonagttrc.cpp
......commonbaseapi.cpp ......commonbasedata.cpp ......commonbaseeri.cpp ......commonbuffring.cpp ......commonconsumer.cpp ......commondsmapi.cpp ......commondsmcperi.cpp ......commondsmqberi.cpp ......commondsmqeri.cpp
......commondsmqferi.cpp ......commondsmqseri.cpp ......commonffrc.cpp ......commonparseutl.cpp ......commonpcm.cpp ......commonproducer.cpp ......commontdpcommutil.cpp ......commontdpthread.cpp ......commontextstor.cpp
......commonvssproxy.cpp ......commonwinntdsmapid.cpp ......commonwinntmngdcapUtils.cpp ......commonwinntpsagtutl.cpp ......commonwinntpssrvuts.cpp ......commonwinntpstdpthread.cpp ......commonwinntpstime.cpp ......commonwinntregistry.cpp
......commonwinnttdppkfile.cpp ....clcclcstatu.cpp ....clctdpexcc.cpp ....commonagtoptions.cpp ....commonbackexch.cpp ....commonbackup.cpp ....commonbackupsg.cpp ....commonerrormsg.cpp ....commonexceri.cpp ....commonexcfgeri.cpp
....commonexclstut.cpp ....commonexcqberi.cpp ....commonexcqeri.cpp ....commonexcqferi.cpp ....commoninactiva.cpp ....commonmbhistory.cpp ....commonparser.cpp ....commonpcmutils.cpp ....commonrestexch.cpp ....commonrestore.cpp
....commonrestorsg.cpp ....mapiIPCClient.cpp ....mapiMAPIFacade.cpp ....mapiMAPIFilter.cpp ....mapiMAPIFrontEnd.cpp ....mapimapiactivity.cpp ....mapimapiappointment.cpp ....mapimapicontact.cpp ....mapimapidesc.cpp ....mapimapientryid.cpp
....mapimapifolder.cpp ....mapimapimailbox.cpp ....mapimapimessage.cpp ....mapimapimessagestore.cpp ....mapimapipersonalfolder.cpp ....mapimapipublicfolder.cpp ....mapimapitask.cpp ....winntclcsignl.cpp ....winnte2kapidl.cpp ....winntpsexcut2.cpp
....winntpsexcuts.cpp ....winntpspcmuts.cpp /AI ../../../exchange/reflibs <br/>
1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0PlatformsWin32Microsoft.Cpp.Win32.Targets(147,5): error MSB6001: Invalid command line switch for "CL.exe". Item has already been added. Key in dictionary: Path
Key being added: PATH<br/>
1>Done Building Project "E:vs2010ITSM4DEV.100614Aagentsexchangebuildwinnttdpexcc.vcxproj" (build target(s)) -- FAILED.<br/>
<br/>
Build FAILED.<br/>
<br/>
Time Elapsed 00:00:00.23<br/>
<br/>

View the full article
 
Back
Top