SonarQube MSBuild Runner and TFS 2013 in VisualStudio Remote server returns unauthorized - msbuild

I have edited a build definition from TFS 2013 inside of Visual Studio following the steps from Setup of the MSBuild SonarQube Runner on the Build Agent Machine and Install the SonarQube Scanner for MSBuild. I am getting the exact same errors as the question from this post as well as one that reads:
Exception Message: TF270015: 'MSBuild.SonarQube.Runner.exe' returned an unexpected exit code. Expected '0'; actual '255'. See the build logs for more details. (type UnexpectedExitCodeException)
Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
I've updated the SonarQube.Analysis.xml file with the correct information and followed the steps of the aforementioned post, updating the Global Permissions for Execute Analysis inside of SonarQube. I have tried updating IIS AppPool info for the service I am trying to build as well as updating Network Service access permissions, but to no avail. Anyone's advice is greatly appreciated!

Related

ASP.NET Core 3.0 project fails to run under IIS Express: HTTP Error 500.30 - ANCM In-Process Start Failure // ERROR: Unknown command '%LAUNCHER_ARGS%'

I migrated a project from asp.net core 2.2 to 3.0 following the migration guide.
After a couple issues were resolved, starting it with dotnet run worked fine.
However when I try to run/debug with IIS Express, I get the following error:
HTTP Error 500.30 - ANCM In-Process Start Failure
Common solutions to this issue:
The application failed to start
The application started but then stopped
The application started but threw an exception during startup
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect
For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028265
The output window for "ASP.NET Core Web Server" in Visual Studio shows the follwing error:
ERROR: Unknown command '%LAUNCHER_ARGS%'
As does an error entry in the windows event viewer
<EventData>
<Data>Application '/LM/W3SVC/2/ROOT' with physical root 'C:\Path\To\Project\' has exited from Program.Main with exit code = '1'. First 30KB characters of captured stdout and stderr logs: ERROR: Unknown command '%LAUNCHER_ARGS%'</Data>
<Data>Process Id: 7092.</Data>
<Data>File Version: 13.0.19258.0. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: aee5e4080331553ea9dfb7fb388b6d72f715bf6a</Data>
</EventData>
Immediately followed by:
<EventData>
<Data>Application '/LM/W3SVC/2/ROOT' with physical root 'C:\Path\To\Project\' failed to load coreclr. Exception message: CLR worker thread exited prematurely</Data>
<Data>Process Id: 7092.</Data>
<Data>File Version: 13.0.19258.0. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: aee5e4080331553ea9dfb7fb388b6d72f715bf6a</Data>
</EventData>
My initial thought was that there was an issue with my system setup, but a fresh ASP.NET Core 3.0 project runs without issues in IIS Express. I compared the two applicationhost.config files of the projects and they're identical (except differences like the project name). I also can't find any meaningful differences in the other project files (Project.csproj, appsettings.json, launchSettings.json). I also tried deleting the .vs folder and .user files .
The error messages suggests that it's not a problem with my code. As does the fact that there's no exception the attached debugger breaks at and that everything seems to work fine using dotnet run. Yet a fresh project created via template runs without those issues.
I was able to identify the issue. One mistake I made was to attribute the ERROR: Unknown command message to ASP.NET, when it was actually our application that complained.
The %LAUNCHER_ARGS% parameter is still passed to the application, but it's no longer set in an in-process hosting context.
More details here: https://github.com/aspnet/AspNetCore/issues/14735

TFS XAML Build that runs tests failing after Windows Updates

We recently applied Windows Updates to our TFS build servers, and the day after we started seeing this error when running any xaml build that is supposed to run unit/UI tests:
Exception Message: Team Foundation Server could not load the following test settings: QAChromeConfig. (type ArgumentException)
Exception Stack Trace: at Microsoft.TeamFoundation.Lab.Workflow.Activities.ExecuteRemoteTestRun2.TestRunCreation.GetRunConfiguration(ITestSettings testSettings)
at Microsoft.TeamFoundation.Lab.Workflow.Activities.ExecuteRemoteTestRun2.TestRunCreation.CreateTestRun(CodeActivityContext context, ITestManagementService testManager, ITestManagementTeamProject project)
at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Has anyone seen this before?

Failed to locate the code coverage command line tool , MSBuild with SonarQube

Getting the following error's once build is triggered from the build definition.
3:46:16 AM Failed to locate the code coverage command line tool Post-processing failed. Exit code: 1
Exception Message: TF270015: 'MSBuild.SonarQube.Runner.exe' returned an unexpected exit code. Expected '0'; actual '1'. See the build logs for more details. (type UnexpectedExitCodeException)
Exception Stack Trace:
at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
I am using SonarQube 5.3, installed in the build server. I have .net framework installed in build server not the visual studio .
BuildDefinition where I am referencing SonarQube.
Please help me here !!!!
The code coverage tools are installed with Visual Studio not the .Net Framework, so if you want code coverage you'll need to install VS on the build agent.
Depending on the version of Visual Studio you are using, you may not need an additional license for build agent. See the discussion Is a separate Visual Studio license required for a build machine? get more detail.

Visual Studio Team Services sends "build failed" email when build succeeds

We're using Visual Studio Team Services for a project, and because we want to use continuous integration I set it up to build on each check-in, and to notify me when a build fails. Now, every time someone checks in code, I get an email that tells me the build failed:
Summary
Debug | Any CPU
3 error(s), 0 warning(s)
$/Foo/Bar.Foo/Bar.Foo.sln - 3 error(s), 0
warning(s)
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.targets
(126): The Dnx Runtime package needs to be installed. See output
window for more details.
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.targets
(126): The Dnx Runtime package needs to be installed. See output
window for more details.
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.targets
(126): The Dnx Runtime package needs to be installed. See output
window for more details.
Other Errors
1 error(s)
Exception Message:
MSBuild error 1 has ended this build. You can find more specific
information about the cause of this error in above messages. (type
BuildProcessTerminateException) Exception Stack Trace: at
System.Activities.Statements.Throw.Execute(CodeActivityContext
context) at
System.Activities.CodeActivity.InternalExecute(ActivityInstance
instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at
System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor
executor, BookmarkManager bookmarkManager, Location resultLocation)
When I go to visualstudio.com to check out the completed builds, the build in question is listed as "Succeeded". When I check the logs, everything is fine, and when I get a latest version and build locally, it also builds.
If I go to the "alerts" tab on the administration panel, I have one alert specified, with the following filters:
Team Project = [Current project]
AND Status = Failed
What's going on here?
I cannot say if it is safe to delete it since you don't know where it came from. And if you want to edit a XAML build definition, you need to do it from "Visual Studio\Team Explorer\Builds\XAML Build Definitions":
However, before you figure out if the XAML definition can be deleted, you can add one more filter in alert to set the alert to only track the build definition you want:

TFS 2010 WorkItem Client - Method not found exception

I have deployed a custom TFS eventpoint to our production webserver. The server does not have the TFS sdk installed so I had to find and bin deploy all dependant dlls. For some reason, when the application tries to contact TFS using the TFS client, it is thrown a missing method exception only on the server. Does anyone know how to get this web service running on a system without installing the full SDK?
The bin deployed TFS dlls
Microsoft.TeamFoundation.Client.dll
Microsoft.TeamFoundation.Common.dll
Microsoft.TeamFoundation.Common.Library.dll
Microsoft.TeamFoundation.dll
Microsoft.TeamFoundation.WorkItemTracking.Client.Cache.dll
Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.dll
Microsoft.TeamFoundation.WorkItemTracking.Client.dll
Microsoft.TeamFoundation.WorkItemTracking.Proxy.dll
The Exception
System.MissingMethodException: Method not found: 'Boolean Microsoft.TeamFoundation.Client.TfsConnection.HandleUnauthorizedException(Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException)'.
at Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.HandleComException(Int32 hr)
at Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.DatastoreClass.ConnectEx(String connectionString, String defaultCachePath, String instanceId, String userSamName, String userFriendlyName, String userSid, WorkItemServer clientService)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.InitializeInternal()
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.Microsoft.TeamFoundation.Client.ITfsTeamProjectCollectionObject.Initialize(TfsTeamProjectCollection teamProjectCollection)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore..ctor(TfsTeamProjectCollection teamProjectCollection)
Looks like partly connected to that problem:
http://blogs.msdn.com/b/bharry/archive/2013/02/13/10392771.aspx
unfortunately I'm still unable to locale where to find proper version of "Microsoft.TeamFoundation.WorkItemTracking.Proxy.dll" library.