Error While configuring Teamcity with VSTFS

Hi,

I am getting authentication error while connecting the TFS from teamcity, below is the details of error log.

 

 INFO - s.tfs.TfsTestConnectionSupport - Failed to test connection to the repository TfsRoot{tfs: https://XXXXXXX.visualstudio.com/ $/TestProject/TestProject, user: XXX.XXX@XXX.net}: jetbrains.buildServer.vcs.VcsException: Failed to connect to TFS root: TF30063: You are not authorized to access https://XXXXX.visualstudio.com/. (enable debug to see stacktrace) 

 

However, when I try logging with same user credentials, I can access the TFS.

 

Please suggest.

Regards,

Manoj

0
12 comments

Hi Manoj, which version of teamcity are you using?

0
Avatar
Permanently deleted user

Hi Denis, Teamcity Version:- TeamCity Professional 2017.1.3 (build 46961)

0
Avatar
Permanently deleted user

Hi Denis,

Thanks for the link, with this I am able to setup alternate credentials, however still getting the below error.

"Failed to connect to TFS root: Invalid server path: $/_git/XXXXXClient"

Teamcity Log as below,

[2017-08-30 11:04:07,558]   INFO -   jetbrains.buildServer.SERVER - Running test connection for "tfs" {instance id=45, parent internal id=-1, parent id=dummy_tfs, description: "tfs: https://XXXXX.visualstudio.com/ $/_git/XXXXXClient"} 

 

I have configured below path into my Visual Studio for git repository, and it works fine while fetching and pushing code from/to TFS.

GIT Fetch Path: https://XXXXX.visualstudio.com/_git/XXXXXClient

GIT Push Path: https://XXXXX.visualstudio.com/_git/XXXXXClient

 

Regards,

Manoj

0

Hi Manoj,

You are using a TFS Root but connecting to git, right? If that's the case, you need to select the VCS Root as Git, not TFS. There are some examples that might help you here: https://blog.jetbrains.com/teamcity/2014/09/teamcity-and-visual-studio-online-source-control/

0
Avatar
Permanently deleted user

Hi Denis,

The link provided was of real help. Now I am able to connect to source control and ran the build however getting the error while building the application. But the same application is building form VS 2017. The error log is as below.

We are using AngularJS 2.0, ASP.NET CORE 1.1, EF CORE 1.1

I have configured build step as, 

1> Nuget Installer

2> MSBuild

 

"

  • Properties\AssemblyInfo.cs(8, 12): error CS0246: The type or namespace name 'AssemblyTitleAttribute' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(8, 12): error CS0246: The type or namespace name 'AssemblyTitle' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(9, 12): error CS0246: The type or namespace name 'AssemblyDescriptionAttribute' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(9, 12): error CS0246: The type or namespace name 'AssemblyDescription' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(10, 12): error CS0246: The type or namespace name 'AssemblyConfigurationAttribute' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(10, 12): error CS0246: The type or namespace name 'AssemblyConfiguration' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(11, 12): error CS0246: The type or namespace name 'AssemblyCompanyAttribute' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(11, 12): error CS0246: The type or namespace name 'AssemblyCompany' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(12, 12): error CS0246: The type or namespace name 'AssemblyProductAttribute' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(12, 12): error CS0246: The type or namespace name 'AssemblyProduct' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(13, 12): error CS0246: The type or namespace name 'AssemblyCopyrightAttribute' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(13, 12): error CS0246: The type or namespace name 'AssemblyCopyright' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(14, 12): error CS0246: The type or namespace name 'AssemblyTrademarkAttribute' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(14, 12): error CS0246: The type or namespace name 'AssemblyTrademark' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(15, 12): error CS0246: The type or namespace name 'AssemblyCultureAttribute' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(15, 12): error CS0246: The type or namespace name 'AssemblyCulture' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(20, 12): error CS0246: The type or namespace name 'ComVisibleAttribute' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(20, 12): error CS0246: The type or namespace name 'ComVisible' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(23, 12): error CS0246: The type or namespace name 'GuidAttribute' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(23, 12): error CS0246: The type or namespace name 'Guid' could not be found (are you missing a using directive or an assembly reference?)
  • C:\TeamCity\buildAgent\temp\buildTmp\.NETCoreApp,Version=v1.1.AssemblyAttributes.cs(4, 20): error CS0400: The type or namespace name 'System' could not be found in the global namespace (are you missing an assembly reference?)
  • obj\Debug\netcoreapp1.1\OmniPot.Common.AssemblyInfo.cs(14, 12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • obj\Debug\netcoreapp1.1\OmniPot.Common.AssemblyInfo.cs(15, 12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • obj\Debug\netcoreapp1.1\OmniPot.Common.AssemblyInfo.cs(16, 12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(8, 26): error CS0518: Predefined type 'System.String' is not defined or imported
  • Properties\AssemblyInfo.cs(9, 32): error CS0518: Predefined type 'System.String' is not defined or imported
  • Properties\AssemblyInfo.cs(10, 34): error CS0518: Predefined type 'System.String' is not defined or imported
  • Properties\AssemblyInfo.cs(11, 28): error CS0518: Predefined type 'System.String' is not defined or imported
  • Properties\AssemblyInfo.cs(12, 28): error CS0518: Predefined type 'System.String' is not defined or imported
  • Properties\AssemblyInfo.cs(13, 30): error CS0518: Predefined type 'System.String' is not defined or imported
  • Properties\AssemblyInfo.cs(14, 30): error CS0518: Predefined type 'System.String' is not defined or imported
  • Properties\AssemblyInfo.cs(15, 28): error CS0518: Predefined type 'System.String' is not defined or imported
  • Properties\AssemblyInfo.cs(20, 23): error CS0518: Predefined type 'System.Boolean' is not defined or imported
  • Properties\AssemblyInfo.cs(23, 17): error CS0518: Predefined type 'System.String' is not defined or imported
  • C:\TeamCity\buildAgent\temp\buildTmp\.NETCoreApp,Version=v1.1.AssemblyAttributes.cs(4, 71): error CS0518: Predefined type 'System.String' is not defined or imported
  • C:\TeamCity\buildAgent\temp\buildTmp\.NETCoreApp,Version=v1.1.AssemblyAttributes.cs(4, 99): error CS0246: The type or namespace name 'FrameworkDisplayName' could not be found (are you missing a using directive or an assembly reference?)
  • C:\TeamCity\buildAgent\temp\buildTmp\.NETCoreApp,Version=v1.1.AssemblyAttributes.cs(4, 122): error CS0518: Predefined type 'System.String' is not defined or imported
  • obj\Debug\netcoreapp1.1\OmniPot.Common.AssemblyInfo.cs(14, 59): error CS0518: Predefined type 'System.String' is not defined or imported
  • obj\Debug\netcoreapp1.1\OmniPot.Common.AssemblyInfo.cs(15, 68): error CS0518: Predefined type 'System.String' is not defined or imported
  • obj\Debug\netcoreapp1.1\OmniPot.Common.AssemblyInfo.cs(16, 55): error CS0518: Predefined type 'System.String' is not defined or imported
  • EnsureMinimumElementsAttribute.cs(1, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • EnsureMinimumElementsAttribute.cs(2, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • EnsureMinimumElementsAttribute.cs(3, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • EnsureMinimumElementsAttribute.cs(4, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • EnsureMinimumElementsAttribute.cs(5, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • EnsureMinimumElementsAttribute.cs(6, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • Helpers\EnumHelper.cs(1, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • Helpers\EnumHelper.cs(2, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • Helpers\EnumHelper.cs(3, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • Helpers\EnumHelper.cs(4, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • Helpers\EnumHelper.cs(5, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • IUserContext.cs(1, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • IUserContext.cs(2, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • IUserContext.cs(3, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • IUserContext.cs(4, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • IUserContext.cs(5, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • IUserContext.cs(6, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(1, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(2, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • Properties\AssemblyInfo.cs(3, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • C:\TeamCity\buildAgent\temp\buildTmp\.NETCoreApp,Version=v1.1.AssemblyAttributes.cs(2, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
  • C:\TeamCity\buildAgent\temp\buildTmp\.NETCoreApp,Version=v1.1.AssemblyAttributes.cs(3, 7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?

Regards,

Manoj

0
Avatar
Permanently deleted user

Hi,

After further investigation I found that the "DOTNET CORE" parameter is not getting listed in TeamCity agent parameters -> Configuration list. As shown in below link. However I have downloaded the plugin required for dotnet core and installed as well(as shown in attached), but still not able to see the option for DOTNET CORE as Build Runner.

This is same machine having DOTNET CORE installed, as I can build the application using VS 2017 on this machine.

 

https://blog.jetbrains.com/teamcity/2016/11/teamcity-dotnet-core/

 


 

0

Hi Manoj,

You can check whether the plugin is correctly installed by checking the Plugins tab, instead of the data directory. Could you check whether it appears there?

If it is properly installed, the runners would show up in the runners list. We have a blog post explaining how to set up a dot net core project here: https://blog.jetbrains.com/teamcity/2016/11/teamcity-dotnet-core/

Somebody asked as well before about ASP.net core before: https://teamcity-support.jetbrains.com/hc/en-us/community/posts/115000127644-Building-ASP-Net-CORE-Net-Framework-on-TeamCity-even-possible-

Could you double check the posts and see whether that helps in bringing your .net core installation to work with teamcity? Please remember that it's the agent that needs to have the core sdk installed

0
Avatar
Permanently deleted user

i Denis,

I am able to run single project from the configuration, but when give solution file as input soure, it gives me error "Step 2/2] CSC : error CS2012: Cannot open 'C:\TeamCity\buildAgent\work\3cb6fdb36157879e\XXXPot\src\XXXPot.Data\obj\Release\netcoreapp1.1\XXXXPot.Data.dll' for writing -- 'The process cannot access the file 'C:\TeamCity\buildAgent\work\3cb6fdb36157879e\XXXXPot\src\XXXXPot.Data\obj\Release\netcoreapp1.1\XXXXPot.Data.dll' because it is being used by another process.' [C:\TeamCity\buildAgent\work\3cb6fdb36157879e\XXXXPot\src\XXXXPot.Data\XXXXPot.Data.csproj]".

 

0

Hi Manoj,

This issue often happens when third party software (such as backup or antivirus) try to access files generated on the fly, but might also happen if the file has been locked for some reason and is now blocked for further access. Usually, deleting the file manually would help here if this is the case. Could you try that?

0
Avatar
Permanently deleted user

Hi Danis,

After deleting files manually, the issue still persist.

However, when specify individual project build runs fine but when we provide solution file to build, it gives "file locked" issue.

Regards,

Manoj

0

Hi Manoj,

could you, when you get the error message, try to use the Process Monitor to determine what has locked the file?: https://superuser.com/a/399660

0

Please sign in to leave a comment.