MSBuild Windows Kits 10 error with objidl.idl - tfs

Trying to build my solution with MSBuild 15.0 from TFS2017 server, I have the following errors:
C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um\objidl.idl (702, 0)
C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um\objidl.idl(702,0): Error MIDL2072: inapplicable attribute : [ Type 'SNB' ( Interface 'IStorage' ) ]
and
C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um\objidl.idl (742, 0)
C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um\objidl.idl(742,0): Error MIDL2072: inapplicable attribute : [ Type 'SNB' ( Parameter 'snbExclude' ) ]
I have tried different versions of \include, \lib, \bin folders such as:
10.0.17134.0
10.0.16299.0
10.0.10586.0
10.0.10240.0
to no avail.
Any ideas or help how to resolve this issue are highly appreciated!
Thanks

First please make sure your local environment is as same as your build agent/server environment.
Besides, also take a look at this similar question, which maybe helpful to you:
error MIDL2072: inapplicable attribute : [annotation] [ Type 'SNB' ( Interface 'IStorage' )
Give a try with the solution mentioned in the link:
Remove all references on older SDK's binary directories in 'Executable
Directories' for 'VC++ Directories' in Properties for
'Microsoft.Cpp.x64.user'; otherwise the wrong (previous) version of
the MIDL compiler (that doesn't understand newer SAL/MIDL syntax) will
run with possible errors.

Related

Test build step in TFS 2017 does not appear to run

I have been setting up build configurations in TFS 2017.
As part of the build configuration I have Test steps.
When the build runs the test steps seems to run without error.
I committed some code in with a test I set to fail, to make sure that TFS stopped the build in the event tests fail. I queued a new build and then surprisingly the build completed with no issue.
I am having this issue on full framework libraries, that are being packaged into NuGet packages and also having it with .net core projects.
On evaluating the log for the test step I see the following messages.
These are from a .Net Core build
The build log
The build step for a core project
These ones are from a full framework build config
The build log for full framework
##[section]Starting: Test Assemblies **\*test*.dll;-:**\obj\**
==============================================================================
Task : Visual Studio Test
Description : Run tests with Visual Studio test runner
Version : 1.0.85
Author : Microsoft Corporation
Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=624539)
==============================================================================
Preparing task execution handler.
Executing the powershell script: c:\agent\_work\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\1.0.85\VSTest.ps1
Testing container: 'REGISTRY::HKEY_CLASSES_ROOT\CLSID\{177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D}'
Exists.
Adding Visual Studio setup helpers.
Getting Visual Studio setup instances.
Found 2 instances.
Description : Supports running automated tests and load tests remotely
DisplayName : Visual Studio Test Agent 2017
Id : 0f053fb9
InstallDate : System.Runtime.InteropServices.ComTypes.FILETIME
Name : VisualStudio/15.2.0+26430.6
Path : C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent
Version : 15.0.26430.6
VersionString : 15.0.26430.6
Description : Microsoft DevOps solution for productivity and coordination
across teams of any size
DisplayName : Visual Studio Enterprise 2017
Id : e4f83d45
InstallDate : System.Runtime.InteropServices.ComTypes.FILETIME
Name : VisualStudio/15.4.0+27004.2002
Path : C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
Version : 15.4.27004.2002
VersionString : 15.4.27004.2002
Testing leaf: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe'
Exists.
Working folder: c:\agent\_work\11\s
Executing C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe "c:\agent\_work\11\s\*******.EDI\*******.EDI.Tests\bin\Release\*******.EDI.Tests.dll" "c:\agent\_work\11\s\*******.EDI\*******.EDI\packages\FluentAssertions.4.19.4\lib\sl5\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\cs\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\cs\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\cs\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\de\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\de\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\de\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\es\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\es\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\es\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\fr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\fr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\fr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\it\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\it\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\it\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ja\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ja\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ja\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ko\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ko\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ko\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pl\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pl\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pl\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pt\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pt\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pt\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ru\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ru\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ru\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\tr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\tr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\tr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\netstandard1.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\uap10.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\dotnet\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\dotnet\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\netcoreapp1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\netcoreapp1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" "c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll" /EnableCodeCoverage /logger:trx /TestAdapterPath:"c:\agent\_work\11\s"
Microsoft (R) Test Execution Command Line Tool Version 15.0.26228.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
Warning: Using Isolation mode to run the tests as diagnostic data adapters were enabled in the runsettings. Use the /inIsolation parameter to suppress this warning.
Warning: Unable to load types from the test source 'c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\uap10.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll'. Some or all of the tests in this source may not be discovered.
Warning: Input string was not in a correct format.
Warning: Input string was not in a correct format.
Warning: Input string was not in a correct format.
Warning: Input string was not in a correct format.
Warning: Input string was not in a correct format.
Warning: Unable to load types from the test source 'c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll'. Some or all of the tests in this source may not be discovered.
Warning: No test is available in c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\tr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ru\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\tr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ru\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ru\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\tr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\uap10.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\netstandard1.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pt\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\dotnet\Microsoft.VisualStudio.TestPlatform.TestFramework.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\dotnet\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\netcoreapp1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\netcoreapp1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pt\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pl\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\cs\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\cs\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\cs\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\de\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\de\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\de\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\es\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\es\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\es\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\fr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\fr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\fr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pt\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\it\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\it\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ja\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ja\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ja\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ko\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ko\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\ko\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.TestFramework.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pl\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\pl\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\it\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestFramework.1.1.11\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll c:\agent\_work\11\s\*******.EDI\*******.EDI.Tests\bin\Release\*******.EDI.Tests.dll c:\agent\_work\11\s\*******.Web\*******.Web\packages\MSTest.TestAdapter.1.1.11\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll c:\agent\_work\11\s\*******.EDI\*******.EDI\packages\FluentAssertions.4.19.4\lib\sl5\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.
Attachments:
c:\agent\_work\11\s\TestResults\e806ae8a-20fe-40d7-956e-90b827a56c83\Dwainwright_ASSODOPDV01 2017-10-23 15_39_33.coverage
Information: Additionally, you can try specifying '/UseVsixExtensions' command if the test discoverer & executor is installed on the machine as vsix extensions and your installation supports vsix extensions. Example: vstest.console.exe myTests.dll /UseVsixExtensions:true
##[warning]No results found to publish.
##[section]Finishing: Test Assemblies **\*test*.dll;-:**\obj\**
The Build Step for full framework
How can i set up TFS so that the tests are actually ran, and more so, the build stops if any test fails.
Further info:
I have VS 2017 installed on the build server too.
The tests are written in NUnit. Not sure if something else needs adding to the build server. Almost looks as though the build server is trying to use MSTest; i see some references to MSTestAdapter
VSTest task cannot run .NET core tests as it uses the Test platform version 1. To run .NET core tests, we recommend using the .NET core task with the test command.
Reference https://github.com/Microsoft/vsts-tasks/issues/5066
As a workaroun you can manually invoke vstest.console.exe from folder C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\TestPlatform\ and provide /Framework:FrameworkCore10.
C:\Program Files (x86)>dir vstest.console.exe /s
Volume in drive C is Windows
Volume Serial Number is 0835-B24B
Directory of C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Com
mon7\IDE\CommonExtensions\Microsoft\TestWindow
10/24/2017 02:55 PM 137,824 vstest.console.exe
1 File(s) 137,824 bytes
Directory of C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Com
mon7\IDE\Extensions\TestPlatform
09/04/2017 12:09 PM 133,240 vstest.console.exe
1 File(s) 133,240 bytes
Reference https://github.com/Microsoft/vstest/issues/579#issuecomment-339263411
UPDATE:
Make sure you are not missing and dependancies.
Check the packages.config, it should be similar as below:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MSTest.TestAdapter" version="1.1.11" targetFramework="net452" />
<package id="MSTest.TestFramework" version="1.1.11" targetFramework="net452" />
</packages>

Delphi Seattle, Compile Error: F2051 Unit System.SysUtils was compiled with a different version of "".GetMappedFileName

since some days, something weird happened.
Problem:
I always get "Compile Error: F2051 Unit System.SysUtils was compiled
with a different version of “”.GetMappedFileName" No precise code line
to mention. Also the same problem if I make a simple project with
only one call to a sysutils command.
Our situation: me and my collegueare developping on the same project. We use JEDI to exchange our sources and to keep track of changes.
LAst, I was downloading his changed sources. Everything went well and I was ready to go on.
I refreshed all my files and tried to compile, build and run the new sources on my computer.
Then it got weird. While compiling, I got this error:
F2051 Unit System.SysUtils was compiled with a different version of "".GetMappedFileName
I checked our versions of delphi standard lib's and also the versions of our other components installed and everything matches.
Then I went on internet-tip-shopping. I found some similar problems, but non of the possible solutions worked for me...
This are some things I tried yet:
setup a smal simple project with only the beep-function from sysUtils
repair of delphi Seattle
Looked at my Library path, browsing path, ...
Cleared the dcu's of my project
I also tried a "dir /s" search to find different (wrong?) versions of System.SysUtils.*
Found .PAS
1 for every installed version, 14, 15, 16, 17 (non of the 14, 15, or
16 in my paths
C:\ProgramData{0DE47792-19BD-4AF4-B9CF-6378FBA44825}\sourcefileswin32\E1F130EB\D08CA8BE
C:\Users\All
Users{0DE47792-19BD-4AF4-B9CF-6378FBA44825}\sourcefileswin32\E1F130EB\D08CA8BE
Found .DCU
For all versions (14, 15, 16, 17)
For every export system (android, ios, ..)
Also in the ProgramData
Also in the All Users
You an find my library and browsing path at the end of this post.
Some of the internet sites I used to try to solve this:
Why are my units "compiled with a different version" of my own files?
F2051: Unit %s was compiled with a different version of %s
https://translate.google.com/translate?hl=en&sl=auto&tl=en&u=http%3A%2F%2Fdelphi4arab.net%2Fforum%2Fshowthread.php%3Fmode%3Dlinear%26tid%3D4700%26pid%3D24332
[DCC Fatal Error]: F2051 Unit ApFileIO was compiled with a different version of ***.{ApCollections}TLinkList<uPublic.TApObject>
Does anyone have an idea or a clue to get out off this. Cause I can't go on with any of my projects since this happened.
This is my Library path for Win32:
$(BDS)\Imports;
$(BDS)\LIB;
$(BDS)\Bin;
$(BDSCOMMONDIR)\Bpl;
$(BDSCOMMONDIR)\Dcp;
$(BDS)\include;
C:\Program Files (x86)\Neos Eureka S.r.l\EurekaLog 7\Lib\Common\;
C:\Program Files (x86)\Neos Eureka S.r.l\EurekaLog 7\Lib\Win32\Release\Studio23\;
C:\Program Files (x86)\Neos Eureka S.r.l\EurekaLog 7\Source\Extras;
$(BDS)\RBuilder\Lib\Win32;
C:\sources\Utilities;
C:\Program Files (x86)\Embarcadero\synaps\source\lib;
C:\Program Files (x86)\Embarcadero\Components;
C:\Program Files (x86)\Embarcadero\EmbeddedWB\Source;
C:\Program Files (x86)\Embarcadero\Ruler;
C:\Program Files (x86)\Embarcadero\paxCompilerXE10\package;
C:\Program Files (x86)\Embarcadero\Studio\17.0\source\rtl\win;
C:\Program Files (x86)\Devart\UniDAC for RAD Studio 10\Lib\Win32;
c:\program files (x86)\embarcadero\tms pack for firemonkey\win32;
C:\Program Files (x86)\Embarcadero\fgx_XE8\Library;$(DXVCL)\Library\RS23;
C:\Program Files (x86)\Embarcadero\RTC;
C:\Program Files (x86)\Embarcadero\Studio\17.0\lib\win32\release
This is my browsing path:
$(BDS)\source\rtl;
$(BDS)\SOURCE\RTL\SYS;
$(BDS)\source\rtl\win;
$(BDS)\source\rtl\common;
$(BDS)\SOURCE\VCL;
$(BDS)\SOURCE\XML;
$(BDS)\source\ToolsAPI;
$(BDS)\SOURCE\PROPERTY EDITORS;
$(BDS)\source\Internet;
$(BDS)\SOURCE\VCL\AppAnalytics;
$(BDS)\SOURCE\IBX;
$(BDS)\source\soap;
$(BDS)\source\Indy10\Core;
$(BDS)\source\Indy10\System;
$(BDS)\source\Indy10\Protocols;
$(BDS)\source\fmx;
$(BDS)\source\databinding\components;
$(BDS)\source\databinding\engine;
$(BDS)\source\databinding\graph;
$(BDS)\source\data;
$(BDS)\source\data\ado;
$(BDS)\source\data\bde;
$(BDS)\source\data\cloud;
$(BDS)\source\data\datasnap;
$(BDS)\source\data\dbx;
$(BDS)\source\data\dsnap;
$(BDS)\source\data\Test;
$(BDS)\source\data\vclctrls;
$(BDS)\source\data\datasnap\connectors;
$(BDS)\source\data\datasnap\proxygen;
$(BDS)\source\DataExplorer;
$(BDS)\source\DUnit\Contrib\DUnitWizard\Source\Common;
$(BDS)\source\DUnit\Contrib\DUnitWizard\Source\Common\dunit;
$(BDS)\source\DUnit\Contrib\DUnitWizard\Source\DelphiExperts\Common;
$(BDS)\source\DUnit\Contrib\DUnitWizard\Source\DelphiExperts\DUnitProject;
$(BDS)\source\DUnit\Contrib\DUnitWizard\Source\DelphiExperts\DUnitProject\dunit;
$(BDS)\source\DUnit\src;
$(BDS)\source\DUnit\tests;
$(BDS)\source\Experts;
$(BDS)\source\indy\abstraction;
$(BDS)\source\indy\implementation;
$(BDS)\source\indyimpl;
$(BDS)\source\LiveTile;
$(BDS)\source\Property Editors\Indy10;
$(BDS)\source\soap\wsdlimporter;
$(BDS)\source\Visualizers;
$(BDS)\source\xtab;
$(BDS)\source\DUnit\Contrib\XMLReporting;
$(BDS)\source\DUnit\Contrib\XPGen;
$(BDS)\source\data\rest;
$(BDS)\source\data\firedac;
$(BDS)\source\tethering;
$(BDS)\source\DUnitX;
$(BDS)\source\data\ems;
$(BDS)\source\rtl\net;
$(BDS)\source\FlatBox2D;
$(BDS)\OCX\Servers;
C:\Program Files (x86)\Neos Eureka S.r.l\EurekaLog 7\Source\;
$(DXVCL)\ExpressCore Library\Sources;
$(DXVCL)\XP Theme Manager\Sources;
$(DXVCL)\ExpressGDI+ Library\Sources;
$(DXVCL)\ExpressCommon Library\Sources;
$(DXVCL)\ExpressLibrary\Sources;
$(DXVCL)\ExpressPageControl\Sources;
$(DXVCL)\ExpressDataController\Sources;
$(DXVCL)\ExpressEditors Library\Sources;
$(DXVCL)\ExpressWizard Control\Sources;
$(DXVCL)\ExpressBars\Sources;
$(DXVCL)\ExpressDocking Library\Sources;
$(DXVCL)\ExpressLayout Control\Sources;
$(DXVCL)\ExpressSpreadSheet\Sources;
$(DXVCL)\ExpressExport Library\Sources;
$(DXVCL)\ExpressQuantumTreeList\Sources;
$(DXVCL)\ExpressQuantumGrid\Sources;
$(DXVCL)\ExpressVerticalGrid\Sources;
$(DXVCL)\ExpressMemData\Sources;
$(DXVCL)\ExpressSpellChecker\Sources;
$(DXVCL)\ExpressTile Control\Sources;
$(DXVCL)\ExpressNavBar\Sources;
$(DXVCL)\ExpressSkins Library\Sources;
$(DXVCL)\ExpressPrinting System\Sources;
$(DXVCL)\ExpressPivotGrid\Sources;
$(DXVCL)\ExpressDBTree Suite\Sources;
$(DXVCL)\ExpressOrgChart\Sources;
$(DXVCL)\ExpressFlowChart\Sources;
$(DXVCL)\ExpressMap Control\Sources;
$(DXVCL)\ExpressScheduler\Sources;
$(DXVCL)\ExpressRichEdit Control\Sources;
$(DXVCL)\ExpressGauge Control\Sources
Problem solved, There was one instance in the library path that was responsible for the problem.
I disabled "C:\Program Files (x86)\Embarcadero\Studio\17.0\source\rtl\win;" from the library and all seems to work now.
My job now is to look why this file was in my library from my predecessor and try to look if there are any "strange" pas/dcu files in that directory so it should be needed in the path.
But that is now my job, Thx to all who helped me with sending some clues to get it solved.
So, it looks that I lost a lot of time by searching at other things
first instead of disabling 1 by 1 of the instances in my Library path.
This is the tip for today :-)

MSBuild Warning MSB3884 when building from command line

When building our solution on the build server (using Jenkins) with MSBuild 14 following warning occurs:
C:\Program Files
(x86)\MSBuild\14.0\bin\Microsoft.VisualBasic.CurrentVersion.targets(133,9):
warning MSB3884: ruleset file "ManagedMinimumRules.ruleset" could not
be found.
Executing the same command line call on my dev machine, this warning won't appear.
Any ideas why this warning appears on the build server?
I've already opened an issue for MSBuild: https://github.com/Microsoft/msbuild/issues/361
Solution: Create an empty rule set file and pass that as a command line parameter to MSBuild.
NoRules.ruleset file:
<?xml version="1.0" encoding="utf-8"?>
<!--
Problem: warning MSB3884
Visual Studio 2015 includes references to MinimumRecommendedRules.ruleset in .csproj files.
MSBuild 10 cannot find this reference and generates warning MSB3884.
Solution: Create NoRules.ruleset [this file] and pass it to MSBuild in a command switch. Need to pass full path name to MSBuild.
Example: MSBuild /property:CodeAnalysisRuleSet="$Workspace\NoRules.ruleset"
References:
https://msdn.microsoft.com/en-us/library/dd264949.aspx
https://msdn.microsoft.com/en-us/library/ms164311.aspx
-->
<RuleSet Name="NoRules" Description="This rule set contains no rules." ToolsVersion="14.0">
</RuleSet>
For a Jenkins build, add the following MSBuild switch to override the project settings and use the NoRules file:
/property:CodeAnalysisRuleSet="$Workspace\NoRules.ruleset"
You can just add the NoRules file to source control. I chose to build it on the fly in Jenkins with a Batch file prior to the MSBuild step:
set NoRules=NoRules.ruleset
#echo Making %NoRules%
if not exist %NoRules% (
#echo ^<?xml version="1.0" encoding="utf-8"?^> >%NoRules%
#echo ^<!-- >>%NoRules%
call :WriteToFile %NoRules% "Problem: warning MSB3884"
call :WriteToFile %NoRules% " Visual Studio 2015 includes references to MinimumRecommendedRules.ruleset in .csproj files."
call :WriteToFile %NoRules% " MSBuild 10 cannot find this reference and generates warning MSB3884."
#echo. >>%NoRules%
call :WriteToFile %NoRules% "Solution: Create NoRules.ruleset [this file] and pass it to MSBuild in a command switch."
call :WriteToFile %NoRules% " Need to pass full path name to MSBuild."
#echo Example: MSBuild /property:CodeAnalysisRuleSet="$WORKSPACE\NoRules.ruleset" >>%NoRules%
#echo. >>%NoRules%
call :WriteToFile %NoRules% "References:"
call :WriteToFile %NoRules% " https://msdn.microsoft.com/en-us/library/dd264949.aspx"
call :WriteToFile %NoRules% " https://msdn.microsoft.com/en-us/library/ms164311.aspx"
#echo --^> >>%NoRules%
#echo ^<RuleSet Name="NoRules" Description="This rule set contains no rules." ToolsVersion="14.0"^> >>%NoRules%
#echo ^</RuleSet^> >>%NoRules%
)
exit /b %errorlevel%
:WriteToFile
#echo %~2 >>%1
exit /b %errorlevel%
This file also shows the comments in the Jenkins ConsoleOut display. This should help you know what why you did this later.
related: VS2015: warning MSB3884: Could not find rule set file
Check your csproj has a DevEnvDir and not a path to VS (esp vs2010). I reckon your laptop's got the appropriate VS installed and your build server doesn't.
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;$(DevEnvDir)\..\..\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
Create the following folder on your build server:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\Rule Sets
Copy all of your ruleset files from your dev machine onto the build server.
Then add the following registry key by creating a "addkey.reg" file with the following contents:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\Setup\EDev]
"StanDir"="C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Team Tools\\Static Analysis Tools\\"
Run it on your build server, reboot, done, warning gone.
Add this property to the msbuild command:
CodeAnalysisRuleSetDirectories="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Team Tools\Static Analysis Tools\Rule Sets".
For example, I used this command
>"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\msbuild" solutionName.sln /target:build /property:Configuration=Release;CodeAnalysisRuleSetDirectories="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Team Tools\Static Analysis Tools\Rule Sets"

Program compiles fine in the IDE but does not compile on the command line

I'm having some trouble with one of my builds. I'm using Jenkins to build a builderXE project but I'm getting the following errors.
C:\Program Files\Embarcadero\RAD Studio\8.0\Bin\CodeGear.Cpp.Targets(2341,5): error : Error: Unresolved external '__fastcall Sqlexpr::TSQLQuery::~TSQLQuery()' referenced from C:\JENKINS\WORKSPACE\project\STRINGLOOKUPFRMCODE.OBJ
C:\Program Files\Embarcadero\RAD Studio\8.0\Bin\CodeGear.Cpp.Targets(2341,5): error : Error: Unresolved external '__fastcall Sqlexpr::TCustomSQLDataSet::~TCustomSQLDataSet()' referenced from C:\JENKINS\WORKSPACE\project\STRINGLOOKUPFRMCODE.OBJ
C:\Program Files\Embarcadero\RAD Studio\8.0\Bin\CodeGear.Cpp.Targets(2341,5): error : Error: Unresolved external '__fastcall Sqlexpr::TCustomSQLDataSet::ParamByName(const System::UnicodeString)' referenced from C:\JENKINS\WORKSPACE\project\STRINGLOOKUPFRMCODE.OBJ
C:\Program Files\Embarcadero\RAD Studio\8.0\Bin\CodeGear.Cpp.Targets(2341,5): error : Error: Unable to perform link
I read that paths could be fixed by using rsvars.bat but when I tried that nothing happens. This is what I tried.
"C:\Program Files\Embarcadero\RAD Studio\8.0\bin\rsvars.bat" MSBuild "/t:Clean;Build" "/p:config=Release" "C:\jenkins\workspace\project\myProject.cbproj"
The project compiles with no problems in builderXE but when I uses Jenkins, or just the command line I get these errors. What do I need to do to get this to work again.
UPDATE: I have updated my post with the script I'm using.
set PATH="C:\Program Files\Embarcadero\RAD Studio\8.0\lib\win32\release;C:\Program Files\Embarcadero\RAD Studio\8.0\bin;C:\Documents and Settings\All Users\Documents\RAD Studio\8.0\Bpl;C:\Program Files\Embarcadero\RAD Studio\7.0\bin;C:\Documents and Settings\All Users\Documents\RAD Studio\7.0\Bpl;C:\PROGRA~1\Serena\vm\win32\bin;C:\PROGRA~1\Serena\vm\common\bin\win32;C:\PROGRA~1\Borland\CBUILD~1\Projects\Bpl;C:\PROGRA~1\Borland\CBUILD~1\Bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Wave Systems Corp\Dell Preboot Manager\Access Client\v5\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\tmssoftware\TMS Component Pack\bpl\;C:\Program Files\SmartBear\Automated Build Studio\bin;C:\Program Files\Mercurial;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\borland\CBuilder5\Bin;C:\Program Files\Embarcadero\RAD Studio\8.0\bin;C:\Program Files\Embarcadero\RAD Studio\7.0\bin;%IMPLIB%;%ADV%\x86;C:\Program Files\TortoiseHg\;C:\Python26;C:\Program Files\Embarcadero\RAD Studio\8.0\lib\win32\debug;"
call "C:\Program Files\Embarcadero\RAD Studio\8.0\bin\rsvars.bat"
MSBuild "C:\jenkins\workspace\project\myProject.cbproj" "/t:Clean;Build" "/p:config=Release"
In Jenkins, are you using the "Execute Windows Batch Command" to make these calls?
If so, try this:
call "C:\Program Files\Embarcadero\RAD Studio\8.0\bin\rsvars.bat"
MSBuild "/t:Clean;Build" "/p:config=Release" "C:\jenkins\workspace\project\myProject.cbproj"
The call command will run the batch file and set all the environment variables in the current session. These will then be available to your MSBuild call.
Also make sure that any dlls you need are in the current %PATH%. You can do this by:
set PATH=<your_dll_path_here>;%PATH%
This should be done right in the beginning.

"Required package rtl not found" when building with Hudson

I am trying to get Hudson to work with my Delphi project. I am using the following batch file to build my project (as suggested in this blog post):
call "C:\Program Files\Embarcadero\RAD Studio\8.0\bin\rsvars.bat"
msbuild /p:Win32LibraryPath="$(BDS)\lib;$(BDS)\lib\win32\release;$(BDS)\lib\win32\debug;$(BDSUSERDIR)\Imports;$(BDS)\Imports;$(BDSCOMMONDIR)\Dcp;$(BDS)\include;" /t:build /p:config=Debug /verbosity:detailed "MyProject\src\MyProject.dproj"
if errorlevel 1 exit 1
I always end up with the error
Embarcadero Delphi for Win32 compiler version 22.0
Copyright (c) 1983,2010 Embarcadero Technologies, Inc.
Fatal: E2202 Required package 'rtl' not found
I don't understand this as rtl.dcp is in "$(BDS)\lib\win32\release" which is on the library path. I am using runtime packages by the way.
Any hints what I can do to solve this?
Edit It seems that the paths do not end up in the command line, which looks something like (after removing project-specific paths):
C:\Program Files\Embarcadero\RAD Studio\8.0\bin\dcc32.exe -$O- -$W+ --inline:off -$A4 -$R+ -$Q+ --doc --no-config -B -LUrtl;vcl;ReportingR;ComponentsR -Q -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG;CONSTRAINT_CHECKING;_VER6;EUREKALOG_VER6;EurekaLog -V -VN -GD --drc -W-SYMBOL_DEPRECATED -W-SYMBOL_PLATFORM -W-UNIT_PLATFORM -W-UNIT_DEPRECATED Myproject.dpr
I found the answer in a comment to the original blog post. It turns out that in Delphi XE they changed the name of the Win32LibraryPath property to DelphiWin32LibraryPath. Changing the batch script accordingly fixes the issue.
The first path $(BDS)\Lib for XE,XE2 and XE 10.2 should be change for $(BDSLIB)\$(PLATFORM)\release

Resources