Hello all,
Currently, I have a Jenkins multibranch pipeline. It clones my git repo and builds the solution via a Jenkinsfile. The Jenkinsfile has 5 stages:
- checkout scm
- restore nugets (using nuget.exe)
- Build Debug config of solution using msbuild from command line --> bat “”${tool ‘VS2017’}"\MsBuild.exe %WORKSPACE%\mysolution.sln /p:Configuration=Debug /p:Platform=“x64"”
- Build Release config of solution using msbuild from command line
- Build Custom config of solution using msbuild from command line
Intermittently, the builds fail. The error I get:
(MarkupCompilePass1 target) ->
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(268,9): error MC1000: Unknown build error, ‘Object reference not set to an instance of an object.’
Not sure wy this happens. But as mentioned it only happens sometimes. Other times the build passes successfully. I have a feeling this has to do with an update as this never hapened before. Has anyone come across this?