How can I use Mono's xbuild to build a TypeScript project on Linux? - mono

I'm developing this project with Visual Studio on Windows, but I've had no problems compiling it with xbuild on Linux until I added some files that need to be built with TypeScript. Specifically, a set of .ts files are compiled to produce app.js, which is then included as an embedded resource. The build works in VS, but with xbuild I get this:
$ xbuild Guncho.sln
XBuild Engine Version 12.0
Mono, Version 3.10.0.0
Copyright (C) 2005-2013 Various Mono authors
Build started 12/23/2014 13:00:53.
__________________________________________________
Project "/home/guncho/test-guncho/Guncho.sln" (default target(s)):
Target ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Target Build:
Project "/home/guncho/test-guncho/Guncho.Site/Guncho.Site.csproj" (default target(s)):
Target PrepareForBuild:
Configuration: Debug Platform: AnyCPU
Target CopyNonResxEmbeddedResources:
/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets: error : Cannot copy /home/guncho/test-guncho/Guncho.Site/app/app.js to /home/guncho/test-guncho/Guncho.Site/obj/Debug/Guncho.Site.app.app.js, as the source file doesn't exist.
/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets: error : Cannot copy /home/guncho/test-guncho/Guncho.Site/app/app.js.map to /home/guncho/test-guncho/Guncho.Site/obj/Debug/Guncho.Site.app.app.js.map, as the source file doesn't exist.
Task "Copy" execution -- FAILED
Done building target "CopyNonResxEmbeddedResources" in project "/home/guncho/test-guncho/Guncho.Site/Guncho.Site.csproj".-- FAILED
Done building project "/home/guncho/test-guncho/Guncho.Site/Guncho.Site.csproj".-- FAILED
Task "MSBuild" execution -- FAILED
Done building target "Build" in project "/home/guncho/test-guncho/Guncho.sln".-- FAILED
Done building project "/home/guncho/test-guncho/Guncho.sln".-- FAILED
Build FAILED.
It's not even attempting the TypescriptCompile step. The build works if I manually run tsc to generate app.js, but what do I need to do to get it working automatically?

Related

oneApi 2021.4 xilink: : error : Assertion failed (shared/driver/drvutils.c line 312)

Using newly installed oneAPI 2021.4 + VisualStudio 16.11.3.
Create new project - Console App -
#include <iostream>
int main() {std::cout << "Hello World!\n";}
After rebuilding I get:
Rebuild started...
1>------ Rebuild All started: Project: xilink, Configuration: Debug
Win32 ------ 1>xilink: : error : Assertion failed
(shared/driver/drvutils.c, line 312) 1>Done building project
"xilink.vcxproj" -- FAILED.
Tried on many other projects, x32 and x64, other VS versions - the error is the same.
I have found workaround - I copied file xilink.exe from older version 2021.2 to 2021.4 folder - and linking start working!
C:\Program Files
(x86)\Intel\oneAPI\compiler\2021.2.0\windows\bin\intel64\xilink.exe
was copied to
C:\Program Files
(x86)\Intel\oneAPI\compiler\2021.4.0\windows\bin\intel64\xilink.exe
(and intel64_ia32 was copied too..)
The issue raised by you has been fixed in Intel oneAPI 2022.1 version. Please download and let us know if this resolves your issue.
As a workaround you can copy a file clang.exe (by default it is located in C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\bin) to the folder with xilink (for x64 configuration it is in C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\bin\intel64).

CMake ExternalProject_Add on Visual Studio receiving error MSB1009 (but library builds)

I am attempting to add glad to a build using ExternalProject_Add. Everything is downloading correctly and seems to be building as expected as the library is built and placed into the correct directory...However...
For some reason I'm receiving the following error message during build time using visual studio:
3>MSBUILD : error MSB1009: Project file does not exist.
3>Switch: install.vcxproj
3>Done building project "glad.vcxproj" -- FAILED.
It would seem that this is happening because glad does not generate an INSTALL.vcxproj file (cmake only generating ALL_BUILD and ZERO_CHECK projects but not INSTALL).
Therefore, how might one go about circumventing this situation? Below is relevant cmake section:
set(libGLAD glad)
ExternalProject_Add(${libGLAD}
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/dep/${libGLAD}
GIT_REPOSITORY https://github.com/Dav1dde/glad.git
GIT_TAG origin/master
GIT_SHALLOW ON
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/dep/${libGLAD}
-DGLAD_PROFILE:STRING="core"
-DGLAD_ALL_EXTENSIONS:BOOL=ON
-DUSE_MSVC_RUNTIME_LIBRARY_DLL:BOOL=OFF
)

Continuous Integration with .Net Core App and Database Project (VS2017)

I have a .net Core app in VS2017 that also has a Database Project in the solution as well.
I want to set up continuous integration within Visual Studio Team Services to Build and Publish both the app and the database project. I have been able to get either the database project or app in the Publish Artifacts, but can't get them both at the same time. I am assuming I have set up my paths up wrong, but I have not had an luck with any of the combinations I have tried and there is very little documentation that I can find on having both an .net core app and a database project build and deploy together. How do I build and publish both the .net core app and the database project together in VSTS?
Below is the current set up I have in VSTS for the Build. I currently was trying to put the database project in one folder ($(build.artifactstagingdirectory)) and the app in another folder since resulted in
List of current steps
Below is the output from the current setup as seen in the image above
Starting: Build
******************************************************************************
Task : .NET Core
Description : Build, test and publish using dotnet core command-line.
Version : 1.0.2
Author : Microsoft Corporation
"C:\Program Files\dotnet\dotnet.exe" build d:\a\1\s\DatabaseDeploymentTest.web\DatabaseDeploymentTest.web.csproj --configuration release
Microsoft (R) Build Engine version 15.1.1012.6693
Copyright (C) Microsoft Corporation. All rights reserved.
DatabaseDeploymentTest.web -> d:\a\1\s\DatabaseDeploymentTest.web\bin\release\netcoreapp1.1\DatabaseDeploymentTest.web.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:07.50
Finishing: Build
Starting: Build solution **/*.sln
******************************************************************************
Task : MSBuild
Description : Build with MSBuild
Version : 1.120.0
Author : Microsoft Corporation
"D:\a_tasks\MSBuild_c6c4c611-aa2e-4a33-b606-5eaba2196824\1.120.0\ps_modules\MSBuildHelpers\vswhere.exe" -version [15.0,16.0) -latest -format json
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe" "d:\a\1\s\DatabaseDeploymentTest.sln" /nologo /nr:false /dl:CentralLogger,"D:\a_tasks\MSBuild_c6c4c611-aa2e-4a33-b606-5eaba2196824\1.120.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=|SolutionDir=d:\a\1\s"*ForwardingLogger,"D:\a_tasks\MSBuild_c6c4c611-aa2e-4a33-b606-5eaba2196824\1.120.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /t:build /p:CmdLineInMemoryStorage=True /p:_MSDeployUserAgent="VSTS_8786b412-4ab0-4ae3-aa96-af0394363b64_build_32_835"
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 8/7/2017 6:40:49 PM.
Project "d:\a\1\s\DatabaseDeploymentTest.sln" on node 1 (build target(s)).
ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Project "d:\a\1\s\DatabaseDeploymentTest.sln" (1) is building "d:\a\1\s\DatabaseDeploymentTest\DatabaseDeploymentTest.sqlproj" (2) on node 1 (default targets).
PrepareForBuild:
Creating directory "bin\Debug\".
Creating directory "obj\Debug\".
CoreCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Roslyn\csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\mscorlib.dll" /debug+ /debug:full /optimize- /out:obj\Debug\DatabaseDeploymentTest.dll /ruleset:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Static Analysis Tools\Rule Sets\MinimumRecommendedRules.ruleset" /subsystemversion:6.00 /target:library /warnaserror- /utf8output "d:\a_temp.NETFramework,Version=v4.5.2.SqlClrAttributes.cs"
Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Roslyn
SqlBuild:
Creating a model to represent the project...
Loading project references...
Loading project files...
Building the project model and resolving object interdependencies...
Validating the project model...
Writing model to d:\a\1\s\DatabaseDeploymentTest\obj\Debug\Model.xml...
DatabaseDeploymentTest\dbo\Stored Procedures\LoadEmployees.sql(1,1): Warning SQL71558: The object reference [dbo].[Employees].[HKSEmployeeId] differs only by case from the object definition [dbo].[Employees].[HKSEmployeeID].
d:\a\1\s\DatabaseDeploymentTest\dbo\Stored Procedures\LoadEmployees.sql(1,1,1,1): Build warning SQL71558: The object reference [dbo].[Employees].[HKSEmployeeId] differs only by case from the object definition [dbo].[Employees].[HKSEmployeeID]. [d:\a\1\s\DatabaseDeploymentTest\DatabaseDeploymentTest.sqlproj]
CopyFilesToOutputDirectory:
Copying file from "obj\Debug\DatabaseDeploymentTest.dll" to "bin\Debug\DatabaseDeploymentTest.dll".
DatabaseDeploymentTest -> d:\a\1\s\DatabaseDeploymentTest\bin\Debug\DatabaseDeploymentTest.dll
Copying file from "obj\Debug\DatabaseDeploymentTest.pdb" to "bin\Debug\DatabaseDeploymentTest.pdb".
SqlPrepareForRun:
DatabaseDeploymentTest -> d:\a\1\s\DatabaseDeploymentTest\bin\Debug\DatabaseDeploymentTest.dacpac
Done Building Project "d:\a\1\s\DatabaseDeploymentTest\DatabaseDeploymentTest.sqlproj" (default targets).
Project "d:\a\1\s\DatabaseDeploymentTest.sln" (1) is building "d:\a\1\s\DatabaseDeploymentTest.web\DatabaseDeploymentTest.web.csproj" (3) on node 1 (default targets).
PrepareForBuild:
Creating directory "bin\Debug\netcoreapp1.1\".
Creating directory "obj\Debug\netcoreapp1.1\".
PreComputeCompileTypeScript:
C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.2\tsc.exe --noEmitOnError --listEmittedFiles
CompileTypeScript:
C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.2\tsc.exe --noEmitOnError --listEmittedFiles
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Roslyn\csc.exe /noconfig /unsafe- /checked- /nowarn:1701,1702,1705 /nostdlib+ /errorreport:prompt /warn:4 /define:TRACE;DEBUG;NETCOREAPP1_1 /reference:C:\Users\buildguest.nuget\packages\microsoft.applicationinsights.aspnetcore\2.0.0\lib\netstandard1.6\Microsoft.ApplicationInsights.AspNetCore.dll /reference:C:\Users\buildguest.nuget\packages\microsoft.applicationinsights\2.2.0\lib\netstandard1.5\Microsoft.ApplicationInsights.dll /reference:C:\Users\buildguest.nuget\packages\microsoft.aspnetcore.antiforgery\1.1.1\lib\netstandard1.3\Microsoft.AspNetCore.Antiforgery.dll /reference:C:\Users\buildguest.nuget\packages\microsoft.aspnetcore.authorization\1.1.1\lib\netstandard1.3\Microsoft.AspNetCore.Authorization.dll /reference:C:\Users\buildguest.nuget\packages\microsoft.aspnetcore.cors\1.1.1\lib\netstandard1.3\Microsoft.AspNetCore.Cors.dll /reference:C:\Users\buildguest.nuget\packages\microsoft.aspnetcore.cryptography.internal\1....
Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Roslyn
GetTypeScriptCopyToOutputDirectoryItems:
Adding items with BuildAction=TypeScriptCompile to the same collections that will be populated (with items of other BuildActions) by the GetCopyToOutputDirectoryItems target
CopyFilesToOutputDirectory:
Copying file from "obj\Debug\netcoreapp1.1\DatabaseDeploymentTest.web.dll" to "bin\Debug\netcoreapp1.1\DatabaseDeploymentTest.web.dll".
DatabaseDeploymentTest.web -> d:\a\1\s\DatabaseDeploymentTest.web\bin\Debug\netcoreapp1.1\DatabaseDeploymentTest.web.dll
Copying file from "obj\Debug\netcoreapp1.1\DatabaseDeploymentTest.web.pdb" to "bin\Debug\netcoreapp1.1\DatabaseDeploymentTest.web.pdb".
Done Building Project "d:\a\1\s\DatabaseDeploymentTest.web\DatabaseDeploymentTest.web.csproj" (default targets).
Done Building Project "d:\a\1\s\DatabaseDeploymentTest.sln" (build target(s)).
Build succeeded.
"d:\a\1\s\DatabaseDeploymentTest.sln" (build target) (1) ->
"d:\a\1\s\DatabaseDeploymentTest\DatabaseDeploymentTest.sqlproj" (default target) (2) ->
(SqlBuild target) ->
d:\a\1\s\DatabaseDeploymentTest\dbo\Stored Procedures\LoadEmployees.sql(1,1,1,1): Build warning SQL71558: The object reference [dbo].[Employees].[HKSEmployeeId] differs only by case from the object definition [dbo].[Employees].[HKSEmployeeID]. [d:\a\1\s\DatabaseDeploymentTest\DatabaseDeploymentTest.sqlproj]
1 Warning(s)
0 Error(s)
Time Elapsed 00:00:12.94
Finishing: Build solution **/*.sln
Starting: Copy Files to: $(build.artifactstagingdirectory)
******************************************************************************
Task : Copy Files
Description : Copy files from source folder to target folder using match patterns (The match patterns will only match file paths, not folder paths)
Version : 2.117.0
Author : Microsoft Corporation
found 0 files
Finishing: Copy Files to: $(build.artifactstagingdirectory)
Starting: Publish
******************************************************************************
Task : .NET Core
Description : Build, test and publish using dotnet core command-line.
Version : 1.0.2
Author : Microsoft Corporation
"C:\Program Files\dotnet\dotnet.exe" publish d:\a\1\s\DatabaseDeploymentTest.web\DatabaseDeploymentTest.web.csproj --configuration release --output d:\a\1\a\DatabaseDeploymentTest.web
Microsoft (R) Build Engine version 15.1.1012.6693
Copyright (C) Microsoft Corporation. All rights reserved.
DatabaseDeploymentTest.web -> d:\a\1\s\DatabaseDeploymentTest.web\bin\release\netcoreapp1.1\DatabaseDeploymentTest.web.dll
Finishing: Publish
Starting: Publish Artifact
******************************************************************************
Task : Publish Build Artifacts
Description : Publish Build artifacts to the server or a file share
Version : 1.120.1
Author : Microsoft Corporation
Async Command Start: Upload Artifact
Uploading 1 files
File upload succeed.
Upload 'd:\a\1\a' to file container: '#/677588/DatabaseDeploymentTest'
Associated artifact 724 with build 835
Async Command End: Upload Artifact
Finishing: Publish Artifact
Specify $(build.sourcesdirectory) in Source Folder and **\*.dacpac in Contents of Copy files task.

Deploy to azure error

I've tried to deploy virtocommerce to azure following the steps available at http://docs.virtocommerce.com/display/vc1devguide/Source+Code+Azure+Deployment , but I'm getting some errors during the build...
MSBUILD 4.0 Path = C:\Windows\Microsoft.NET\Framework\v4.0.30319\
03/03/2015 17:21:12 - Solution Build: In progress
Version: 1.0.62.1721
Microsoft (R) Build Engine version 4.0.30319.33440
[Microsoft .NET Framework, version 4.0.30319.34014]
Build started 03/03/2015 17:21:12.
1>Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\VirtoCommerce.sln" on node 1 (clean target(s)).
1>ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
ValidateProjects:
The project "Performance.FunctionalTests" is not selected for building in solution configuration "Release|Any CPU".
The target "MSDeployPublish" listed in a BeforeTargets attribute at "C:\code\github\VirtoCommerceCommunity\vc-community-master\packages\Microsoft.Web.WebJobs.Publish.1.0.2\tools\webjobs.wap.targets (89,11)" does not exist in the project, and will be ignored.
The target "MSDeployPublish" listed in an AfterTargets attribute at "C:\code\github\VirtoCommerceCommunity\vc-community-master\packages\Microsoft.Web.WebJobs.Publish.1.0.2\tools\webjobs.wap.targets (156,11)" does not exist in the project, and will be ignored.
1>Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\VirtoCommerce.sln" (1) is building "C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WorkerRoles\Scheduler\AzureScheduler\AzureScheduler.ccproj" (61) on node 7 (Clean target(s)).
C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WorkerRoles\Scheduler\AzureScheduler\AzureScheduler.ccproj(68,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.4\Microsoft.WindowsAzure.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
61>Done Building Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WorkerRoles\Scheduler\AzureScheduler\AzureScheduler.ccproj" (Clean target(s)) -- FAILED.
1>Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\VirtoCommerce.sln" (1) is building "C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WebRoles\Frontend\CommerceSite\CommerceSite.ccproj" (62) on node 2 (Clean target(s)).
62>C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WebRoles\Frontend\CommerceSite\CommerceSite.ccproj(71,3): error MSB4019: The imported project "**C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.4\Microsoft.WindowsAzure.targets**" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
62>Done Building Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WebRoles\Frontend\CommerceSite\CommerceSite.ccproj" (Clean target(s)) -- FAILED.
1>Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\VirtoCommerce.sln" (1) is building "C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WorkerRoles\Search\ElasticSearch\ElasticSearch.ccproj" (66) on node 6 (Clean target(s)).
66>C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WorkerRoles\Search\ElasticSearch\ElasticSearch.ccproj(70,3): error MSB4019: The imported project "**C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.4\Microsoft.WindowsAzure.targets**" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
66>Done Building Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WorkerRoles\Search\ElasticSearch\ElasticSearch.ccproj" (Clean target(s)) -- FAILED.
1>Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\VirtoCommerce.sln" (1) is building "C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Extensions\Jobs\SchedulerConsole\SchedulerConsole.csproj" (69) on node 1 (Clean target(s)).
69>C:\code\github\VirtoCommerceCommunity\vc-community-master\packages\Microsoft.Web.WebJobs.Publish.1.0.2\tools\webjobs.console.targets(25,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Extensions\Jobs\SchedulerConsole\SchedulerConsole.csproj]
69>Done Building Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Extensions\Jobs\SchedulerConsole\SchedulerConsole.csproj" (Clean target(s)) -- FAILED.
1>Done Building Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\VirtoCommerce.sln" (clean target(s)) -- FAILED.
Build FAILED.
"C:\code\github\VirtoCommerceCommunity\vc-community-master\VirtoCommerce.sln" (clean target) (1) ->
"C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WorkerRoles\Scheduler\AzureScheduler\AzureScheduler.ccproj" (Clean target) (61) ->
C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WorkerRoles\Scheduler\AzureScheduler\AzureScheduler.ccproj(68,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.4\Microsoft.WindowsAzure.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
...
Build Failed
At C:\code\github\VirtoCommerceCommunity\vc-community-master\src\extensions\Setup\VirtoCommerce.PowerShell\azure-deploy.ps1:445 char:11
+ throw "Build Failed"
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Build Failed:String) [], RuntimeException
+ FullyQualifiedErrorId : Build Failed
I've tried from different machines (Windows 8.1 and Windows Server 2012), both with Visual Studio 2013, and found the same error...
Interesting that on both machines the directory C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools does not exists...
The Azure Tools only exists at the \VisualStuion\v12.0 directory...
How could we solve this?
Thanks in advance!
The issue seems to be related how msbuild is packaged with VS.NET 2013 (http://blog.maskalik.com/msbuild/2014/03/04/changes-in-msbuild-with-visual-studio-2013/). In order for powershell deploy to work out of the box, VS.NET 2012 needs to be installed. The workaround is to modify azure-deploy.ps1 to point to the MSBuild from VS.NET 2013 instead of .NET SDK.
So change line 426 from
$global:buildexe_path = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" -Name MSBuildToolsPath).MSBuildToolsPath
to (simply changed 4.0 to 12.0)
$global:buildexe_path = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\12.0" -Name MSBuildToolsPath).MSBuildToolsPath
It will be included in the next patch once it passes our CI.

Visual C++ Express 2010: "attempting to build a Win32 application from an x64-environment"

1) ran "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd /x64 /Debug" to set environment variables.
2) ran "vcexpress" from that command prompt. The reason for starting from the command prompt is so that the correct compiler and linker are detected. Otherwise they defaulted to x86_amd64 when vcexpress is run from the start menu.
3) attempted to build my project, a SuperBuild generated by CMake which calls msbuild to compile some static solution files. Received this error:
You are attempting to build a Win32 application from an x64-environment.
If using the Windows 7.1 SDK build environment, type setenv / x86
The solution was to change the TARGET_CPU variable. When setenv /x64 /debug was run, it set:
C:\Temp\cmakeex\build>echo %TARGET_CPU%
x64
I changed this to amd64, and the project now builds successfully:
>set TARGET_CPU=amd64