-
Bug
-
Resolution: Not A Defect
-
Major
-
None
-
Windows Server 2012 R2 with Microsoft Build Tools 2015 and Jenkins 2.38
We are in the process of attempting to migrate from CruiseControl.NET to Jenkins, and as part of this effort we wrote a new MSBuild based build (project file is attached). Despite the build working fine from the Windows command line outside of Jenkins, when an attempt is made to use the MSBuild plug-in – the following error appears in the build console output:
{{13:01:48 Path To MSBuild.exe: msbuild.exe
13:01:50 Executing the command cmd.exe /C " msbuild.exe /v:detailed .\Autobuild\fusion_auto_build.msbuild " && exit %%ERRORLEVEL%% from D:\Fusion workspaces\Fusion test build 4
13:01:50 [Fusion test build 4] $ cmd.exe /C " msbuild.exe /v:detailed .\Autobuild\fusion_auto_build.msbuild " && exit %%ERRORLEVEL%%
13:01:50 Microsoft (R) Build Engine version 4.6.1085.0
13:01:50 [Microsoft .NET Framework, version 4.0.30319.42000]
13:01:50 Copyright (C) Microsoft Corporation. All rights reserved.
13:01:50
13:01:50 Build started 12/28/2016 6:01:50 PM.
13:01:50 Project "D:\Fusion workspaces\Fusion test build 4\Autobuild\fusion_auto_build.msbuild" on node 1 (default targets).
13:01:50 Building with tools version "4.0".
13:01:50 D:\Fusion workspaces\Fusion test build 4\Autobuild\fusion_auto_build.msbuild(140,11): error MSB4025: The project file could not be loaded. ' ', hexadecimal value 0x1A, is an invalid character. Line 140, position 11.
13:01:50 Done Building Project "D:\Fusion workspaces\Fusion test build 4\Autobuild\fusion_auto_build.msbuild" (default targets) – FAILED.
13:01:50
13:01:50 Build FAILED.
13:01:50
13:01:50 "D:\Fusion workspaces\Fusion test build 4\Autobuild\fusion_auto_build.msbuild" (default target) (1) ->
13:01:50 D:\Fusion workspaces\Fusion test build 4\Autobuild\fusion_auto_build.msbuild(140,11): error MSB4025: The project file could not be loaded. ' ', hexadecimal value 0x1A, is an invalid character. Line 140, position 11.
}}
The issue is that line 140, position 11 is EOF character in our MSBuild project file, so we suspect that the MSBuild plug-in with Jenkins is injecting an unprintable, non-ASCII character to MSBuild which is the problem.
Once again, please note that if we issue the msbuild.exe command outside of Jenkins, this project file works fine.