TeamCity Unmet requirements: MSBuildTools14.0_x86_Path exists - build

I have a solution built in VS 2015 and need to set up TeamCity to run it.
I have installed a build agent on a Virtual Machine, but TeamCity marks all the build profiles for this build agent as incompatible and gives the following error:
Unmet requirements:
MSBuildTools14.0_x86_Path exists
I have installed MSBuild Tools 2013. Please advise what to do. Thank you.

You need to download Microsoft Build Tools 2015 from this link -https://www.microsoft.com/en-us/download/details.aspx?id=48159 and make sure path is added in System Variable

Thank you. I used chocolatey tool to install MSBuild Tools packages. It installed the latest version for VS 2017, but my solution was built in VS 2015. So I uninstalled the package and then installed again. It resolved the problem.

Related

Problems installing Crystal Reports with VS 2017

I am something new with Crystal Reports, but I already went through some tutorials but I have the following problem
Install the following:
I am working with VS 2017, but when I try to start working with "Reports", it seems that it was not installed
Am I installing the wrong version?
Looks like you are installing the runtime (the package you should install on the machines where you deploy your application).
Instead, you should install Crystal Reports package for the Visual Studio IDE.

"error MSB8020: The build tools for v141 (Platform Toolset = 'v141') cannot be found" when trying to install npm module scrypt

I´m trying to install the npm module scrypt.
I know scrypt requires node-gyp, i installed it globally (several times). Also I know node-gyp requires python 2.7 and MS Build Tools. I installed the latest python 2.7 build and i installed MS Build Tools. I also tried with VS Community Edition 2017. I tried to repair and reinstall both.
I also installed npm package windows-build-tools (several times) globally successful.
But wenn i try npm i scrypt i got the following errors:
C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5):
error MSB8020: The build tools for v141 (Platform Toolset = 'v141')
cannot be found. To build using the v141 build tools, please install
v141 bu ild tools. Alternatively, you may upgrade to the current
Visual Studio tools by selecting the Project menu or right-click the
solution, and then selecting "Retarget solution".
[c:\project\node_modules\scrypt\build\copied_files.vcxproj] C:\Program
Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5):
error MSB8020: The build tools for v141 (Platform Toolset = 'v141')
cannot be found. To build using the v141 build tools, please install
v141 bu ild tools. Alternatively, you may upgrade to the current
Visual Studio tools by selecting the Project menu or right-click the
solution, and then selecting "Retarget solution".
[c:\project\node_modules\scrypt\build\scrypt_wrapper.vcxproj]
Any tips or suggestions?
After a few more hours, i found out there was an old installation of visual studio 2015. I had to uninstall it first. I have no clue, why not the newest instance of build tools was used.
After this, and downgrading Node to v8, scrypt could be installed and compiled again.
I guess what fixed it for smonkey, who uninstalled an older installation of Visual Studio, was that that uninstall process also removed that old MSBuild path from %PATH%.
Because for me, just removing that old MSBuild.exe from the path fixed it. node-gyp does not need MSBuild on the path, but it gets tripped up if there is one on the path that's too old for the build target.
So either delete your MSBuild path, or make sure it points to the latest version. Unless of course you wanted to uninstall Visual Studio anyway, but that is not an option for some.
Just had this issue. Removing (or unsetting) the VCTargetsPath system variable fixed it for me. I think it was created by a previous VS2015 install, but removing VS2015 did not remove the variable.
(Ken Pespisa already posted this in a comment, but I missed it on a previous visit to this page. I am adding it as an answer so people can find it more easily.)

NuGet restore on a TFS2013 from a VS2017 solutioin not working

I have run into the problem that if I have a VS2017 solution and try to build it on our TFS2013 build server it fails by not restoring the nuget-packages. If I convert this 2017 solution to VS2015 and check it in, and build it, the nuget-packages get restored.
I have tried with packages from both nuget.org and from internal nuget packages sources. So there is something that has changed between VS2017 and VS2015 regarding the automatic restore of nuget-packages. But I can't find the solution for it. Anybody else that has run into this problem...
If you're building a .net core project, it do have difference between VS 2015 and VS 2017. Install nuget packages in the .net core project in VS 2015, it uses packages.config file. But in VS 2017, it does not using packages.config file any more.
You need to create a batch file, to run a dotnet restore command to restore nuget packages for your solution.
code:
dotnet restore %TF_BUILD_SOURCESDIRECTORY%\...\WebApplication1Core
You'd better using VS 2017 on your build agent to build your solution. You could refer to the last reply in this thread about using VS 2017 in XAML build: https://social.msdn.microsoft.com/Forums/vstudio/en-US/f3c4fc0b-d9ee-474a-9d91-9c5810b074a2/how-to-get-vs-2017-working-with-tfs-2017-xaml-builds?forum=tfsbuild
In the end, I do suggest that you could upgrade your TFS to 2017 and using Vnext build to build your project created in VS 2017.

NPM Install on Windows 7 issue, no Microsoft.CPP folder

I'm having troubles with npm install on Windows 7.
I'm using Visual Studio 2013 Express and I've also installed Microsoft Build Tools 2013.
I have the Path variable set and I've tried with the --msvs_version parameter in the npm install
It gives me the
error MSB4019: "C:\Program Files (x86)\MSBuild\12.0\Microsoft.Cpp.Default.props" not found
That folder doesn't exist on my computer, I only have
MSBuild\12.0
and
MSBuild\Microsoft
What do I miss to install?? I would be able to compile Node project without having to install the full version of VS, if possible, and honestly, I would be able to do it by installing the minimum required software.
Thank you!

Node packages not building on Windows 8.1 - Missing Microsoft.Cpp.Default.props

NPM packages are not building on Windows 8.1 - failing with following error,
error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
I have tried the following,
Setting an evironment variable VCTargetsPath to C:\Program Files (x86)\MSBuild\12.0\ (The error changes accordingly but there is no Microsoft.Cpp.Default.props with the 2012 build tools).
Installing a VisualStudio 2010 environment (uninstalled then installed in the correct order) according to this answer
Completely removed VisualStudio 2010 and tried a VisualStudio 2012 instead, which should work according to the Node-gyp wiki
Added registry keys according to this answer
Tried using the Windows 7.1 SDK command prompt according to this answer
Tried setting VisualStudioVersion before running npm according to this answer
Tried passing --msvs_version=2012 to npm according to this answer
None of the above have worked.
I've spent ages on this already. Does anyone have a definite answer that works?
The quick fix for me was this:
set VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120
npm install
Finally Microsoft is providing much better solution to VS.
I just wanted to update this question with the latest answer. You now do not need to install Visual Studio.
Source: https://github.com/nodejs/node-gyp/issues/629#issuecomment-153196245
Instructions below in case the source goes down.
Install VC++ Build Tools Technical Preview using the Default Install option.
[Windows 7 only] requires .NET Framework 4.5.1
Install Python 2.7, and add it to your PATH: npm config set python python2.7
Launch cmd and run:
npm config set msvs_version 2015 --global (this is instead of lnpm install [package name] --msvs_version=2015l every time.)
So it is 2.47am - figured it out.
Although the node-gyp site seems to suggest using Visual Studio 2010 or 2012, instead for Windows 8.1, install Visual Studio Express 2013 for Windows Desktop as discussed in this issue.
Setting the following fixed the problem for me
/property:VCTargetsPath="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120
As mentioned on this forum
A quick note for people who installed:
Visual Studio 2012 (Express)
MSBuild 2012
with the issue of:
MSBuild loads Microsoft.Cpp.Default.props
MSBuild cannot load Microsoft.Cpp.props
The solution is here:
set parameter of MSBuild:
/property:VCTargetsPath="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110"
This is the same issue as described here
NPM native builds with only Visual Studio 2013 installed
If you have a version of VS2013 installed set this environment variable before running the npm command:
set GYP_MSVS_VERSION=2013
or for VS2012
set GYP_MSVS_VERSION=2012
background reading: https://github.com/Automattic/socket.io/issues/1151
Just in case people encounter this issue again, the issue got resolved in my case when I did a
npm install -g --production windows-build-tools
Link for reference
Related question