Team Foundation Server Access to the Path ... is denied - tfs

I just got assigned at my job to figuring out Team Foundation Server as we are switching to it from PVCS. I was messing around with the source control features, trying to get gated check-in to work, as that is something we will be using in my job. I am pretty sure I set up the build definition correctly, as far as I can tell that is, and I turned MSBuild Multi-Proc to false as I have seen suggested online.
My problem is that when I try to check in a file I get an error for every file in my project stating
C:\Builds\1\TFSTestProject\Gated\src\TFSTestPrograms\TFSTestPrograms\{File} Access to the path 'C:\Builds\1\TFSTestProject\Gated\src\TFSTestPrograms\TFSTestPrograms' is denied.
I don't understand why I would have any access denied and I have looked for solutions all over google and have not found anything that has fixed this issue. My server url is just http://localhost:8080/tfs so I should have access to everything (at least I think i should...)
Another thing is that there is no 'Builds' folder on my C:\ drive like in the path they give
I am very confused about this issue and I have no idea how to fix it.

If you have installed a build server the path that it is objecting to is on the build server itself. You should review the installation instructions for the build server and the account used to set up the build server.
Two lengthy to repost but ben day has an excellent TFS installation guide here: http://www.benday.com/BlogFiles/Tfs2012InstallGuide/BenDay-TFS2012-Install-Guide-v1.0.pdf

Make sure that whatever account you configured TFS and, more importantly, the Team Build service to run as, has full control access to the C:\Builds folder.

Related

VSTS, create build definition gets AllowScriptsAuthAccess error

long time listener, first time caller!
I've spent two days searching for an answer to this so hopefully someone here may be able to help.
I've set up a personal/free VSTS instance and created a project.
One of the first tasks I want to do is setup the build pipeline, so create a new pipeline, define the agent pool as VS2017, connect to my Github repo etc, all of which is fine.
Next I try to add an Agent Job, again choosing VS2017 as the agent. With no other options chosen, if I try to save the build definition I get the following error message (and cannot save it);
The AllowScriptsAuthAccess build option is not supported in API versions greater than 4.0.
Allow scripts to access the OAuth token is unchecked on the Agent job configuration under phases and on the Build/Options tab (slider set to disabled)
I've googled and searched for all sorts of stuff to try and find someone with the same problem but it's almost like I'm the first to discover this - which is highly unlikely!! It has almost driven me to using Bing to search for a solution, but let's not get carried away.
Any ideas or suggestions would be greatly appreciated!
So it turns out that turning off the "New YAML pipeline creation experience" and "New Navigation" under preview features fixes the problem, insofar as I can now create and save a build pipeline without the error.
Also, if you have "Build YAML Pipelines" enabled under preview features for the Organisation, you get the "View YAML" link that I was missing also.
Thanks all for your help. I'd be interested to know the root cause of this still. I'll update the Microsoft support ticket with the same and post back here if they have any insights.
There's an similar issue here:https://developercommunity.visualstudio.com/content/problem/123012/getting-multiconfiguration-build-option-not-suppor.html
Seems the build template was broken. So, you can try with other build templates or starting over with an empty template, then add the needed tasks manually to check if that works.
Besides, you can try below things:
Clean the caches on your client machine, also clean the browser
caches, then check it again. See How to clear the TFS cache on
client machines.
Create a new team project and create a new build pipeline within the
new team project to check if that works
I am assuming this is a bug in the VSTS system and it will likely be fixed soon. But for the time being, I found a workaround:
I was also getting the AllowScriptsAuthAccess error and struggled with it for hours. I don't think any of the configuration settings you mentioned have anything to do with it (free account, GitHub, OAuth token unchecked).
To solve it, I converted the Agent Job to YAML (which is as easy as clicking "View YAML" in the upper right). Save the code to a file named .vsts-ci.yml, and save this in the root folder of your solution. Commit/push the new file, then queue the build. (Note that the conversion to YAML is one-way, so you may want to Clone your build.)
That should get rid of the AllowScriptsAuthAccess error. After that I had to add a few variables, but then it's just a matter of following the error messages.
I hope this helps. Sorry I can't answer this more authoritatively. Please post a comment if I am missing any steps.
I had this issue and it turned out that I didn't have Build Admin permissions in VSTS for the project. Not a very helpful error message for this.

What is the path when using Team Foundation Version Control (TFVC) as the VCS for a Jenkins project?

I'm trying to connect a Jenkins project to a Visual Studio Team Services repository.
If I use the "Git" option for the VCS in the configurations (as I've seen in most tutorials), I get authentication issues, and entering my credentials does not remedy the error. If I use the "Team Foundation Version Control" option, it accepts the repository URL without any errors, but it asks me for the "project path."
So, my question is actually twofold:
(1) Since Team Foundation is now known as Visual Studio Team Services, is this option depreciated and thus not worth using in my configuration anyway? I haven't even seen it or heard it mentioned as an option in any tutorial I've gone through, so I'm not sure if it's even used anymore (I thought my version of Jenkins was current, but I guess it might not be, somehow.) If this option is outdated, what is the preferred method now?
(2) What is the "project path" that it is asking for? It says it must start with $/, so I'm not sure if that means it's the path to the project in the file system of the environment it's going to be running in (in my case, on a slave machine), or if it's referring to its path in the Visual Studio Team Services system or what exactly.
I've attached a screenshot below for reference. Any and all advice will be appreciated.
Jenkins VCS config screenshot
Regarding git authentication issue, you can use Personal Access Token (username can be anything, such as test) or Alternate Authentication Credentials. The same as TFVC.
Regarding the path, it is the server path of TFVC
Go to Code page of team project
Select Files tab
Select a folder
Get the path

event name should have at least 3 parts separated by slash. Parameter name eventName in Asp.Net Core Docker

I am getting an error as "event name should have at least 3 parts separated by slash. Parameter name eventName" when adding a docker support to my existing Asp.Net Core Web API project.
Any one faced this issue before? I have already tried reopening my solution and restarted my machine.
There is another cause of this. To fix it go to File=>Account Settings in VS and sign in
For the "event name should have at least 3 parts separated by slash..."
My work-around: You HAVE to do a clean, then a rebuild all then a publish. The build process in the publish intermittently causes a failure.
[EDIT] I have found just doing the clean and then publishing also works. fwiw.
I was able to fix this error myself, and thought of sharing it here, so that it can be useful to someone else.
The problem was because, one of my colleague deleted the docker-compose file and docker file from my solution to re-enable the Docker support for some reason, and when we were trying to add the Docker support, we got this error.
Even though we deleted the Docker support file from Visual Studio solution, the files were not being deleted from the solution directory. As a fix, you must delete those files manually by going to that directory, after that you will be able to add the Docker support again to your project.
I was able to fix this issue by updating visual studio version
I deploy to Azure with two different accounts. I did not realize I was logged in to my personal account in Visual Studio when I thought I was logged in to my org account. Swapping to the correct account resolved this cryptic error message for me.
For me re-entering my credentials solved the issue.
I clicked restore, logged in again and didn't follow through (but propably any way to re-enter credential would also work)

TFS Online Build Fails on local Build Server with TF270016 / TF270002

We're using Visual Studio Online, but we have local Build Controller and Build agent. This has been running fine for the past 6 months or so, but just this week the builds have consistently failed.
The software itself appears to build successfully, and the tests also seem to pass, but it fails due to an error during the publication of the log files (see error below).
The build uses an unmodified Default Template, and is setup so that it "does not copy output files to a drop folder" (in the Build Defaults of the build definition).
After a few hours of head-banging this feels like some sort of permissions thing, but I have no idea how to go about debugging, or verifying this assumption.
Can anyone offer any suggestions, or better yet, a solution! :-)
One other thing to note is that we have been mucking about with our users in Visual Studio Online to change some accounts from Basic to Stakeholder accounts in order to reduce costs. I'm wondering if we've also managed to remove a critical account or permission that has caused this...?
Error
An error occurred while copying diagnostic activity logs to the drop location.
Details: TF270002:
An error occurred copying files from
'C:\Users\tfs\AppData\Local\Temp\BuildAgent\5498\Logs\2853\LogsToCopy\ActivityLog.AgentScope.5498.xml'
to
'ActivityLog.AgentScope.5498.xml'.
Details: BadRequest: Bad Request
An error occurred while copying diagnostic activity logs to the drop location.
Details: TF270002:
An error occurred copying files from
'C:\Users\tfs\AppData\Local\Temp\BuildController\4592\Logs\2853\LogsToCopy\ActivityLog.xml'
to
'ActivityLog.xml'.
Details: BadRequest: Bad Request
Edit
One thing to note is that this error is consistent across all builds for different C# projects that are executed through the same build controller. I've tried removing and re-registering the controller, restarting the build service and the build server itself.
we are also experiencing similar issue. We have not done any changes to VSO permissions, so I doubt it is that.
Two things that coinside this:
1. There was an update to VSOnline during the same timewindow that this issue appeared
2. Our local build controllers/agents were updated with latest Patch Tuesday updates
So the solution to this (in my case anyway) was to upgrade the Build controller software to v12 (TFS 2013).

Error in Connecting to TFS Server(TF31001)

I am unable to connect to the server which is located remotely and required connection to OpenVPN.
I would have concluded that its some sort of Authentication issue, but it seems that my teams mates using similar Working Environment to mine are able to establish connection. I am able to log in from their PC using my Credentials. Looks like this could be due to my local settings.
I have cleared the Cache as suggested in MSDN sites. Also, Firewall and Antivirus are off.
I also get prompted for the User/Name password when I click Team Explorer Icon on Visual Studio. Invalid credentials show error messages as expected, on entering proper credential information, I get the following message:
TFS31001: Team Foundation cannot
retrieve the list of team projects
from Team Foundation Server. The Team
Foundation Server returned the
following error: Team Foundation
services are not available from the
server.
What could be the reason for this?
That error message is always due to a security issue but that doesn't tell you "why" there is a security issue. Can you take a look at the event log for more details- not sure what else might be in there but it might be a good starting point.
I had this issue a long time ago when working remotely and it was a trial and error thing but in my case clearing cache then removing the TFS Team Project and re-adding it fixed the issue. You can try that. I see you did clear cache but I am not sure from reading this if you removed and re-added. If settings are cached and you dont do that I doubt you will see a change.
Another more aggressive solution would be to uninstall and reinstall Team Explorer. Also, make sure your up to date on SPs. Permissions could have been messed up somehow with TFS installation and this could potentially resolve the issue.
Anyway, I know this isn't a cut and dry answer but I hope it helps. I just spent the last three days upgrading all our company Team Projects from 2008 to 2010 so I feel your pain :)
It was problem at my end. Using a Different Gateway did the trick.
I've got this error once my TFS database server ran out of diskspace.
I encountered same error.
I found this which looked like a viable solution. :
http://social.msdn.microsoft.com/Forums/en-US/tfsversioncontrol/thread/f681a2d6-eca9-4488-96a3-ed979a545a9b
I ended up just turning my proxy settings of in IE and it started working instantly.
The same story occured with tfs 2012 - it was installed and configured properly, local network has domain and all users in domain correctly connected and worked with tfs projects.
But once the connection denied all tries for connection, all credentials were correct, but connections has been refused. Tried to configure tfs clients access, to reboot client machines... but worthless.
Only server service/machine rebooting helped. Good luck!
I fixed by clearing the cache at:
C:\users{yourusername}\Appdata\Local\Microsoft\Team Foundation{version e.g.3.0}\Cache
Quit any open instance of visual studio first.

Resources