TFS Build fails at NuGet restore - tfs

I have an on-prem 2017 install of TFS.
Other similar builds work just fine however this new build i have created fails at the first step - NuGet Restore.
The path set is: ***.sln
I will add that I created the new build by copying from another (working) build. There aren't many options to set in the task so I'm not sure what went wrong.
Attached is the result from the log page.
Any help appreciated.
thanks.

According to the error info
no matching files were found with search pattern: E:\vstsagent\_work\5\s\**\*.sln
Seems the build agent is lacking of the solution file.You could double check this on the build agent folder E:\vstsagent\_work\5\s\** to see if there are or not.
Please go through your repository mapping settings, mark sure including and not cloaked that .sln file.

Related

Unable to open resource file TFS 2015 build

I have been slowly attempting to get the TFS build to work. After some other fixes with other issues, I have gotten to the point where the build will throw the below error. Not exactly sure what to make of the error. I have double checked to make sure the Resources folder is in the solution. However, the file called "resources" is not, but there is a file named "resource". I know this is not much info to go on, however I am stumped at this point.
Suggest you first remote to the build agent machine and check if there are corresponding G3.Resources.resources under path G3.Resources.resources C:\agent\work\1\s
\G3DEV\obj\Debug\G3.Resources.resources
Double confirm the Mapping settings correctly and not cloaked some files.
Try to manually use VS or MSBuild command to build your solution directly on your build agent machine. This will narrow down if your issue is related to TFS build definition side or not.
You could also Enable Verbose Debug Mode for TFS Build vNext by add system.debug=true to get more detail log info for trobuleshooting.

Compilation Error: Team City and Visual Studio 2012

So I have build project on TeamCity 8.0.3 and have create two build steps.
1.) The first step is to Install all NuGet packages.
I have set my project up according to this blog and if I run this step it works fine however I went over the logs and found: [14:07:45][install] All packages listed in packages.config are already installed. Is this OK?
2.) I have another step that is suppose to build my Class Library however I get a compilation error saying that references are missing even after step one, which is suppose to install the packages, has passed?
What am I doing wrong and should I provide more log details?
As already stated by Pedro, the first log message is absolutely normal.
For the second issue, it's not easy to throubleshoot a compilation error without logs :)
Often the issue is related to wrong checkout rules.
You can try to figure out what has been downloaded by teamcity by looking on the agent working directory (normally it is downloaded under c:\buildagent\work\'something', look at the build log to find out the actual folder).
Another common issue is that references are stored as absolute paths instead of relative paths: everything works on your machine, but teamcity builds on a different folder so referenced files can't be found... You have to open your csproj files with a text editor to find out if everything is ok.
Copy the entire folder on your machine and try to build it: are you able to reproduce the error?

Team Foundation Build Won't Build

We had a working build for our solution, but when we added a new project, it stopped working. The build runs "successfully" and the log shows: Run MSBuild for Project -> Built [my solution] for target(s) publish (same for all projects), but it doesn't actually build anything.
The problem seems to be in the build configuration. My build process definition is set to build for my custom configuration (ForMSBuild | Any CPU), but something is wrong with the way TFB is interpreting that definition (I need that custom configuration because I copy some .dlls to a designated folder to include in a publish process in order to be available for a ClickOnce install).
At one point, only the new .dlls added to the solution weren't building (even though they were listed in the Configuration Manager with the Build check box checked). So I re-created my custom configuration, ensured that all my .dlls were checked to Build under (ForMSBuild | Any CPU), and now none build. I have opened the source on the build machine directly in Visual Studio (2012) and verified the settings for my custom configuration.
Edit the Build Definition, in the Process tab click the ellipsis next to Solutions To Build, go to the Configurations tab and ensure TFS Build is set to build the configuration you want it to:
It turns out that I actually had the main startup project not checked to build. Really stupid mistake, but I sure wish MSBuild hadn't spit out all those incorrect messages.

TFS 2010 Team Build Get Sources After Deleting Source Directory on Build Machine

I have a TFS Build that runs overnight. The build source can be found on the agent in c:\build\3\poject\build def\Sources.
The \Sources folder was accidentally deleted (guilty). I would have expected TFS to "Get" the latest source prior to the next build. It seems that it doesn't do this - it just complains that it can't find any of the sources to build.
Can anyone please tell me how I force TFS to get the latest sources to the build agents \sources folder?
Under the Build Definition -> Process what is the Clean Workspace parameter set to? If it is set to All it should cause the entire source to be downloaded on each build.
There should be a way to cause a full redownload of source from the build definition but I am not seeing an option right now. You should be able to fix this on the build machine itself. If you cd into the Source directory and then run tf get /force it should redownload all of the content. Subsequent builds after this should work.

TFS Build looking for wrong branch of source

Have a CI build set up in a very simple solution (MVC webapp, Service, MSTest project)
The build shows orange with the following:
Handle MSTest Exception There is no working folder mapping for
/Heartbeat/Source/BvtAutomation/Local.testsettings
Now, here's the kicker, that is not the source branch being built, it is another project altogether! I cannot find any reference to it in the build definition or anywhere in my solution (WinGrep .. the whole nine yards!)
Anyone seen anything similar to this or have a suggestion as to what I might try?
Thanks!
In TFS2010 when building with DefaultTemplate.xaml, the test files to run are not specified relatively to the mapped workspace, but instead by their complete path from Source Control.
So to fix the issue:
Edit your build definition
Go to the Process tab
In the 2. Basic section, select Automated Tests and click the ... button to edit the test settings.
In the Automated Tests dialog, browse for the .testsettings file in the branch you're building.
This may help: select build definition in the Team Explorer, right-click -> Edit build definition. On the 'Workspace' tab you can configure sources to be got to the build machine. HTH

Resources