every time I start a build on TFS I get a error message that the OLEDB provider is missing on the local machine:
Test method BookLibrary.UnitTest.DatabaseCommunicationTest.AddBookTest threw exception:
System.InvalidOperationException: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
Is there any option to add the 'Microsoft.ACE.OLEDB.12.0' provider to a TFS continuous build?
Have you tried logging into the build machine and installing Microsoft Access Database Engine 2010 Redistributable
Related
We have a UWP app with unit tests that run fine from Visual Studio. However, we are running into issues when trying to run the tests on our build agent. To isolate the issue from our build pipeline, we have tried to run the tests using vstest.console.exe from the command line on our local build machine. The error below is the same regardless of whether we run from the build pipeline or from the command line. We would appreciate any guidance.
TestWindow>vstest.console.exe /Platform:x86 /Framework:FrameworkUap10
/InIsolation /logger:trx;LogFileName=%temp%\SampleUwpAppTest.trx
C:\vsts-agent_work\22\a\AppxPackages\SimpleUwpApp.Tests_1.0.0.0_x86_Test\SimpleUwpApp.Tests_1.0.0.0_x86.appx
Microsoft (R) Test Execution Command Line Tool Version 15.7.2
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait... Attempting to deploy to target
'Local Machine'. Deployment operation succeeded, package moniker:
'7d25c824-2568-4449-a622-ad28662417f9_1.0.0.0_x86__a178p9x51fw8a'.
Attempting to launch app with app user model Id
'7d25c824-2568-4449-a622-ad28662417f9_a178p9x51fw8a!vstest.executionengine.universal.App' and arguments '--port 1428 --endpoint 127.0.0.1:01428 --role client
--parentprocessid 5744 --telemetryoptedin false'. DEP7100: Failed to activate app
'7d25c824-2568-4449-a622-ad28662417f9_a178p9x51fw8a!vstest.executionengine.universal.App' with parameters '--port 1428 --endpoint 127.0.0.1:01428 --role client
--parentprocessid 5744 --telemetryoptedin false'. Access is denied.
Access is denied.
App activation failed.
Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException:
Failed to initialize client proxy: could not connect to test process.
at
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1
sources) at
Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria
testRunCriteria, ITestRunEventsHandler eventHandler) Closing app with
package full name
'7d25c824-2568-4449-a622-ad28662417f9_1.0.0.0_x86__a178p9x51fw8a'.
Test Run Aborted.
Build Information
Our sample solution has two projects: SimpleUwpApp and SimpleUwpApp.Tests. The former's project file has <AppxBundle>Always</AppxBundle> and the latter has <AppxBundle>Never</AppxBundle>. The build agent is a local Windows 10 machine which we have used for UWP builds for a while. Here is a screenshot of our build configuration in Azure DevOps:
You might see this error if developer mode is not enabled on the build agent.
You can enable developer mode in the Settings app, or set the AllowDevelopmentWithoutDevLicense registry key.
I ran across this issue today and eventually traced it to the way in which our Self-Hosted Azure DevOps agent was running - in order to run UWP Unit Tests you have to use Interactive mode for the Agent and not run it as a Windows Service. From the docs:
Visible UI testing using self-hosted Windows agents
Agents that are configured to run as service can run Selenium tests only with headless browsers. If you are not using a headless browser, or if you are running UI tests for desktop apps, Windows agents must be configured to run as an interactive process with auto-logon enabled.
After making this change I found the error went away.
I am getting below error while building my project. It seems I am missing data tool components on my build agent
No agent found in pool Hosted VS2017 which satisfies the specified
demands: sqlpackage Agent.Version -gtVersion 1.103.0
But I am unable to get offline installer for data tools for VS 2017. Please help.
The sqlpackage.exe is existing on Hosted VS 2017 agent, but not in the capacity list. (can’t add this capacity manually and use deploy database task, check VS2017 Hosted Agent: SQL Server Data Tools)
The workaround is that you can call sqlpackage.exe command by using Command Line task:
Right click your project > Publish to create a publish profile
Edit that publish profile to add Password to TargetConnectionString (Could be tokenized by using Replace Tokens task)
Sample:
<TargetConnectionString>Data Source=XXX.database.windows.net,1433;Persist Security Info=True;User ID=XXX;Password=XXX;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=60;Encrypt=False;TrustServerCertificate=True</TargetConnectionString>
Check in changes
Add Command line task: (Tool: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130\sqlpackage.exe; Arguments: /Action:Publish /SourceFile:"$(build.artifactstagingdirectory)\DatabaseDemo.dacpac" /Profile:"$(build.sourcesdirectory)\DatabaseDemo\DatabaseDemo.publish.xml")
Queue build with Hosted VS2017 agent.
I've got a VSTS build that is trying to deploy a test agent so I can run some Selenium tests and when I get to the "Deploy TestAgent on" build step, I am getting the following error:
2017-06-22T14:29:05.6157972Z ##[warning]Task 'DownloadTestAgent' for
machine vmtest43xxx.cloudapp.net:5986's Error : System.Exception: The
process cannot access the file 'C:\TestAgent\vstf_testagent.exe'
because it is being used by another process.
Also, if setting up a local build agent is a good workaround for this, I'm all ears, but so far I have had a lot of trouble trying to set up a local test agent. This seems weird since setting up a local build agent was relatively easy up to this point. Any suggestions on how I should set up a local agent? I've been trying to follow instructions from here and here.
Thanks!
It’s easy to setup a local build agent, so try to setup a build agent:
Steps for windows:
Go to Admin page of Agent Pools (https://[account].visualstudio.com/_admin/_AgentPool)
Click Download agent button
Unzip the downloaded file
Run Command Line as Administrator
Run config.cmd
Specify collection url (https://[account].visualstudio.com), Personal Access Token etc
More information, you can refer to: Deploy an agent on Windows.
You can specify Test Agent Location (can be access from build agent machine) for Visual Studio Test Agent Deployment task to save time.
Is it possible to use a local build server for a Visual Studio Online account so that with a gated check-in policy, check-ins are only committed when the build server builds successfully? I don't have expertise in this space, so ideally I'm looking for steps to do the setup.
Yes, you can do what you are asking. Simply install TFS Build Server and when you are configuring it give it the URL for your VSO Collection.
I have setup my own Team Foundation Build server and I am using Visual Studio Online to host my project online. I have a django project which I am trying to deploy on windows azure cloud service. The project can be published from my dev machine without any errors however when the build server tries to build it, it gives the following error during uploading the package:
Exception Message: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (type FileNotFoundException)
I checked in .pyproj and found a reference to Microsoft.WindowsAzure.Storage but there the version is 2.1.0.0 and that is the version that is installed on the server as well.
Also there are no errors during the build process but only during the deployment stage. How do I make Msbuild use Storage version 2.1.0.0 instead of 2.0.0.0 . Also, which SDK version contains Storage version 2.0.0.0
I just had this problem. This is the same problem as TFS Build Controller : "Could not load file or assembly 'Microsoft.WindowsAzure.StorageClient, Version=1.7.0.0".
You'll need to copy Microsoft.WindowsAzure.Storage.dll version 2.0.0.0 to "C:\Program Files\Microsoft Team Foundation Server 12.0\Tools", and then restart the Visual Studio Team Foundation Build Service Host 2013 service.