Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7021379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:26:32+00:00 2026-05-27T23:26:32+00:00

I need to run MSBuild from the command line using the Visual Studio Command

  • 0

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.

Trying to run the msbuild command after that fails.

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.

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.”

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.

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

I would appreciate any help at all.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:26:33+00:00Added an answer on May 27, 2026 at 11:26 pm

    See this thread.

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

    HTH

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

if I launch the RAD Studio command prompt and run msbuild /t:Rebuild in the
I need to run a Linux CLI command and get its stdout output from
Environment: C# projects, Visual studio 2008, C#, .Net 3.5, MSBuild Objective: Run my own
I need to run a stored procedure from a C# application. I use the
I need to run a RLIKE query on a database mmoved from MySQL to
I need to run some precompile steps before I build my project using FlexBuilder.
I am using msbuild to run an .proj file which reads the file name
I'm about to upgrade to Visual Studio 2010, and I'm learning that there are
I'm trying to setup .NET (C#) build from the command line. What is the
I need to create a batch file that run MSBuild.exe I assumed that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.