This morning I received an email from a collegue of mine, saying that a user he configured as project administrator in TFS couldn't actually manage permissions on their git repos.
This is the error message displayed:
Apparently you have to be a member of the Project Collection Administrators group to manage permissions for git repositories.
Googling around I found that this is actually a known issue in TFS 2013.3, as described in this forum thread.
The good news is that it has been fixed in the update 4.
I hope this is also fixed in the forthcoming 2015 release...
Cheers.
Sustainable architectures
Thursday, April 23, 2015
Monday, April 1, 2013
Hot to get rid of code analysis errors in TFS build
Monitoring the TFS build reports for one of the team I'm coaching, I've noticed that one particular build have been failing for several days. The build report shows the following error, for just one project:
Unable to read Code
Analysis output report
Googling around (http://blog.jessehouwing.nl/2012/01/solving-msbuild-error-unable-to-read.html) I've found that some code analysis tags in the .csproj file were causing the issue.
In particular the following line references a path that is ok for local builds, but not for builds run byTFS:
So, everything good, isn't it? Well, almost... There are still a couple of issues to solve:
<CodeAnalysisLogFile>bin\testing\<assemblyname>.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
So, everything good, isn't it? Well, almost... There are still a couple of issues to solve:
- find who inserts those code analysis tag in the project files, in order to keep control of the situation
- how to clean up all the projects in the solution (there are near 30!!)
The first issue was easy to solve: looking at comments on the post for the previous error, it turns out that in Visual Studio 2010 those properties are added when a new build configuration is created, and the settings from another build configuration are copied. This post show a detailed description of the issue.
In order to keep code analysis properties from messing up TFS builds, you have to leave "Empty" in the drop down, when copying settings from another build configuration.
In order to keep code analysis properties from messing up TFS builds, you have to leave "Empty" in the drop down, when copying settings from another build configuration.
Interestingly, though, it turns out that the CodeAnalysisLogFile property isn't mandatory, so it can be safely removed from the project file.
And this lead me to the second issue: how to inspect and clean up all the project files that belong to the solution?
Only thinking of manual editing of the csproj files makes me sick, so I've started to look at how to automate it.
When you talk about automation in windows, only one answer exists: powershell. The solution is pretty simple, as shown in the following powershell snippet:
And what about VS 2012?
The good news is that this issue doesn't appear anymore in Visual Studio 2012: I've done some tests trying to reproduce this behaviour, and it looks like creating new build configurations doesn't insert code analysis properties in the project files.
The green bar shines again in the TFS build reports!
When you talk about automation in windows, only one answer exists: powershell. The solution is pretty simple, as shown in the following powershell snippet:
#check out .csproj files under solution
& "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\ide\TF.exe" edit /recursive "$/<your team project>/<your solution folder>/*.csproj"
#remove the line containing CodeAnalysisLogFile property
dir -s *.csproj | %{(Get-Content $_) -notmatch "CodeAnalysisLogFile" | Set-Content $_.FullName }
First all the .csproj files have to be checked-out for editing, to remove the read-only flag, and then, they can be edited saving all the file lines that don't contain the CodeAnalysisLogFile string.And what about VS 2012?
The good news is that this issue doesn't appear anymore in Visual Studio 2012: I've done some tests trying to reproduce this behaviour, and it looks like creating new build configurations doesn't insert code analysis properties in the project files.
The green bar shines again in the TFS build reports!
Subscribe to:
Posts (Atom)
