Visual Studio命令提示符给人" \\共同在这个时候&QUOT意外; [英] Visual Studio Command Prompt gives "\Common was unexpected at this time"

查看:192
本文介绍了Visual Studio命令提示符给人" \\共同在这个时候&QUOT意外;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从使用Visual Studio命令提示符(2010)在命令行运行的MSBuild。它用于正常工作。现在,当我打开窗户,我得到了以下错误消息:

I need to run MSBuild from the command line using the Visual Studio Command Prompt (2010). It used to work fine. Now when I open the window I get the following error message:

\Common was unexpected at this time.

尝试失败后运行的MSBuild 命令。

我很自然地以为这是在我的PATH环境变量不带引号的条目中的问题,可能是从最近的流氓安装。我检查了,但路径似乎是犹太教。

I naturally assumed it was an issue with an unquoted entry in my PATH environment variable, possibly from a recent rogue install. I checked that, but the PATH seems to be kosher.

挖掘到文件系统中,我发现批处理文件正在由提示符下运行的是C:\\ Program Files文件(x86)的\\微软的Visual Studio 10.0 \\ VC \\ BIN \\ VCVARS32.BAT。我编辑,通过投入 ECHO 语句来跟踪错误的位置。这似乎在这行指向一个错误:

Digging into the file system, I discovered that the batch file being run by the prompt is C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat. I edited that by putting in ECHO statements to trace the location of the error. That seemed to point to an error at this line:

@if not "%WindowsSdkDir%" == "" (

如果我删除引号,错误的是不同的:预计不会在文件此时的

If I remove the quotation marks, the error is different: "Files was not expected at this time."

接下来的2号线在此之后,现在是:

The next 2 lines after this are now:

@echo 51
@set "PATH=%WindowsSdkDir%bin\NETFX 4.0 Tools;%WindowsSdkDir%bin;%PATH%"

我认为失败的声明是第二行,但回声语句不产生任何输出,所以我不知道怎么会发生。

I assumed the failing statement was the second line, but the echo statement doesn't produce any output, so I don't know how that could be happening.

我使用Windows 7的64位版本。

I am using a 64-bit version of Windows 7.

我想AP preciate任何帮助都没有。

I would appreciate any help at all.

推荐答案

请参阅this主题。

我的猜测是你的 PATH 最近和现在得到修正包含了内部引号一些文件夹路径。

My guess is your PATH got modified recently and now contains some folder path with quotation marks inside.

心连心

这篇关于Visual Studio命令提示符给人" \\共同在这个时候&QUOT意外;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆