I'm trying to have MSBuild for Visual Studio 2017 run in my PATH on Windows 10. I recently completed this task on another machine that was using Visual Studio 2015 no problem using this command:
"%comspec% /k""C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsMSBuildCmd.bat""
I noticed that for Visual Studio 2017, VsMSBuildCmd.bat is within C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools
So I tried running the %comspec% command above with this folder but it's not working.
Any help would be greatly appreciated!
I was able to get MSBuild up and running even after I typed the comspec statement above with the error appearing my command prompt. I'm not really sure if that is a Windows 10 bug.
I installed the VS 2017 TeamExplorer which added a separate VS 2017 install folder. Now when I try to build a nuget package, I get an error saying
The imported project "C:\Program Files (x86)\Microsoft Visual
Studio\2017\TeamExplorer\MSBuild\15.0\bin\Roslyn\Microsoft.CSharp.Core.targets"
was not found. Confirm that the path in the declaration is
correct, and that the file exists on disk. C:\Program Files
(x86)\Microsoft Visual
Studio\2017\TeamExplorer\MSBuild\15.0\bin\Microsoft.CSha
rp.CurrentVersion.targets
So it appears now it is trying to use MSBuild from the TeamExplorer install path instead of the Enterprise path.
MSBuild auto-detection: using msbuild version '15.3.409.57025' from
'C:\Program Files (x86)\Microsoft Visual
Studio\2017\TeamExplorer\MSBuild\15.0\bin'.
Is there a way to make the original path (Enterprise) the default for MSBuild?
UPDATE
I will mark this as the answer until a better solution comes along!
This isn't a GOOD answer but I uninstalled the VS 2017 Team Explorer and it now works properly. I still would like to know how we can control this.
I've been trying to use Apache Cordova in Visual Studio 2015 CTP, but I'm getting error: "WebSocket4Net, The software is missing from your system. You may also have to configure it after installation.". I've tried:
Reinstall Visual Studio 2015 (and deleted previous version - 2013). In the setup I've marked Cordova tools.
I found some suggestion to download WebSocket4Net(0.9).Binaries.zip from CodePlex and copy it to specified folder. However, the file WebSocket4Net.dll I've already there in the folder c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\WebClient\Diagnostics\ToolWindows and looks it doesn't matter.
Environment: Windows 7 Professional
Any idea what can be done yet to fix this problem?
If you're installing Visual Studio 2015 copy it to:
C:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\IDE\CommonExtensions\Microsoft\WebClient\Diagnostics\ToolWindows.
Microsoft Visual Studio 12.0
I'm using TFS XAML to run my builds. (TFS 2012).
Part of the process is running MSTest to run the unit tests. The MSTest.exe is called from Visual Studio path on the build server.
The problem is that the MSTest is being called from the wrong version of Visual studio. It is calling:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\MSTest.exe
I'd like it to call:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MSTest.exe
Where do / can I specify the version location of the MSTest.exe executable that I want to use.
"C:\Program Files (x86)\Microsoft Visual Studio 11.0" is Visual Studio 2012 folder.
Do you have the "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MSTest.exe" directory in the server?
EDIT: Possible duplicate of this (check lordkain's answer and comments).
You'll need to change the build template's MSTest activity which may
be located in several locations depending on your template. In the
default template the activity is labelled "Run MSTest for Metadata
File" or "Run MSTest for Test Assembly".
Go to it's properties and change the ToolPath to C":\Program Files
(x86)\Microsoft Visual Studio 11.0\Common7\IDE"
The MSDN docs state that I can find the WCF Test Client in:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\
but it seems like a lot of stuff is missing from there, including WcfTestClient.exe.
What do I need to install?
C:\Program Files (x86)\Microsoft Visual Studio (Your Version Here)\Common7\IDE
VS 2022 Professional:
C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\WcfTestClient.exe
VS 2022 Community:
C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\WcfTestClient.exe
VS 2022 Enterprise:
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\WcfTestClient.exe
VS 2019 Professional:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\WcfTestClient.exe
VS 2019 Community:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\WcfTestClient.exe
VS 2019 Enterprise:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\WcfTestClient.exe
VS 2017 Community:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\WcfTestClient.exe
VS 2017 Professional:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\WcfTestClient.exe
VS 2017 Enterprise:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\WcfTestClient.exe
VS 2015:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\WcfTestClient.exe
VS 2013:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\WcfTestClient.exe
VS 2012:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\WcfTestClient.exe
The prerequisite to have WcfTestClient is to have Windows Communication Foundation component installed. If WcfTestClient is missing, install it by modifying Visual Studio:
Control Panel > Apps & Features > Visual Studio (your version)
In Visual Studio Installer, click on Modify, choose Individual components tab and then select (see below screenshot):
☑ Windows Communication Foundation
Click on Modify and voilà, application will be on your disk.
If you want to use WcfTestClient with no Visual Studio, see answer(s) on: How can the Wcf Test Client be used without Visual Studio?
In addition, one can add this to the Visual Studio Tools menu.
Tools => External Tools.
And then in the Command box enter the path for WcfTestClient.exe.
In my case
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\WcfTestClient.exe
FYI - I could not find WcfTestClient.exe under any of the listed file paths. It turns out it needed to be installed by Visual Studio Installer. When you launch the installer and modify your version of VS, make sure Windows Communication Foundation is checked under Optional. It may seem obvious, but it wasn't to me and therefore might not be obvious to everyone else.
You won't find the component if it hasn't been installed.
In Visual Studio 2019 go to:
Tools > Get Tools and Features > Select the Individual Components tab > Type wcf in the search box and install it.
This installs the component, and you should be able to load it from the command prompt or other methods suggested in the answer.
If you use "Developer Command Prompt" you can just type WcfTestClient to start it or type where wcftestclient to find the location.
For Visual studio 2013, Windows 8...
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\WcfTestClient.exe
New Direction on VS 2017 (x64 systems)
"C:\Program Files (x86)\Microsoft Visual Studio\2017\*your lic type*\Common7\IDE\WcfTestClient.exe"
Mine was here:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE"
For 64 bit OS, its here (If .Net 4.5) : C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE