I am trying to call TF get command via Team Build script. I am getting the following error
Unable to determine the workspace.
Folks over the internet tell that this error is because Team Build cannot find the workspace because it is being called from a directory which is not part of the workspace.
The solution presented is to specify the working directory. I do so. The mappings are ok in Build Definition path as well as in the workspace. But now i get the following error:
Could not find cmd.exe in the current
directory . The directory name is
invalid.
Kindly help.
Thanks
Solved the problem. I added one more binding in my build Definition Workspace Section and referenced files to get/checkin/checkout with the help of variable $(MSBuildSourceDirectory). Meanwhile I ensured that $(SourceDir) is used to specify mapping in the workspace section of my Build Definiton dialog.
(source: geekswithblogs.net)
At the same time i encountered 260-character path limit, so i modified the output directory in build path as described here
(source: geekswithblogs.net)
Related
My build fails with
Could not find a part of the path 'App_Data\aspnet-Definiti.Licencing.TestWebProduct-20171016042403.mdf'.
The file exists in in the file system
The file exists in Source Control
The get sources phase seems to find the file fine
2017-11-28T10:49:32.5448880Z Getting aspnet-Definiti.Licencing.TestWebProduct-20171016042403.mdf (no errors here)
Things I've tried:
Excluding the file from the project
Deleting the file in visual studio and checking in
Deleting the file in Source Control Explorer and Checking in
Setting the file to copy if newer
Setting the file to copy always
Unticking build in configuration manager for the offending project
The error always comes back.
Copying App_Data\aspnet-Definiti.Licencing.TestWebProduct-20171016042403.mdf to obj\Release\Package\PackageTmp\App_Data\aspnet-Definiti.Licencing.TestWebProduct-20171016042403.mdf.
2017-11-28T10:50:48.4423213Z ##[error]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.targets(2603,5): Error : Copying file App_Data\aspnet-Definiti.Licencing.TestWebProduct-20171016042403.mdf to obj\Release\Package\PackageTmp\App_Data\aspnet-Definiti.Licencing.TestWebProduct-20171016042403.mdf failed. Could not find a part of the path 'App_Data\aspnet-Definiti.Licencing.TestWebProduct-20171016042403.mdf'.
My final act of sheer desperation was to remove the entire project so at least the rest of the solution would build, but to my utter surprise the error still remains.
The solution was to set the file to do not copy and clear the MSBuild Arguments in the build definition.
I am getting the following error when I am queuing a build in TFS 2017.
"Microsoft.Web.Publishing.targets 3009,5): Error : Web deployment task failed. (Package file 'C:\agent_work\3\s\TestApp\TestApp\release' does not have a .zip file name extension.)"
I am not sure why I am getting this error. I have hosted agent on the TFS server. I created the build definition according to this video:
www.youtube.com/watch?v=HjD4A-yeFTE
Does somebody have any idea? Appreciate your help!
Test at my side and everything works correctly.
Please try below items to narrow down the issue:
Please check the drop folder, if the .zip file actually being in the
place that you expected.
Try to specify the output path, eg:
/p:PackageLocation="$(build.artifactstagingdirectory)\\" , then
specify the Copy Root path as $(build.artifactstagingdirectory)
in Copy and Publish Build Artifacts task.
Explicitly specifying .zip extension in MSBuild Argument in the
Build Definition.
p:PackageLocation="$(BuildConfiguration)\package.zip
Check the build log, check if MSbuild works correctly. Also you can try the Msbuild command line locally to check if the .zip package can be generated.
Deploy a new agent on your Develop machine, create a new build
definition, then build with the new agent.
If still can not resolve the issue, just share the build logs here for further troubleshoot.
I Have Source Controller And Team Project My Build Process Is
and when i build i Got Access Denied Error Like This:
C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (3678): Unable to copy file "C:\Builds\2\AcuatAgile\AcuatNFSBuild\src\AcuatAgile\Release001\Library\Kendo.Mvc.dll" to "C:\Builds\2\AcuatAgile\AcuatNFSBuild\bin\Kendo.Mvc.dll". Access to the path 'C:\Builds\2\AcuatAgile\AcuatNFSBuild\bin\Kendo.Mvc.dll' is denied.
and every time i got Access Denied To Different File DLL
I Searched The Net And Most Of The Answers are Clean WorkSpace As You Can See I Put True To Clean WorkSpace And I Got The Same Error in Build.
is there any other parameters to solve this problem?
Check the properties of bin folder to see whether it is read-only.
Try to add the following MSBUILD arguments in the build definition: /m:1 to make MSBUILD to use only one process to build.
Status Source Control Folder Build Agent Folder
Active
$/project111/Dev/Source/Product111_UI
$(SourceDir)
Cloaked
$/project111/Dev/Source/Product111_UI/kendoUI/Modules/Sample
above are the my work space settings from build configuration.
It is giving below issue while copying build.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\WebApplications\Microsoft.WebApplication.targets (182): Could not copy the file "Modules\Sample\AliasConfig\AliasConfig.html" because it was not found.
do I missed any configurations still, please help me out in this. if any
solution.
It looks like you have a reference to the output of that .html fil le somewhere in your build logic. Cloaking the folder means that it is not there so the error is correct.
You need to find where you have a reference to that .html file in your build logic.
I have TFS 2010 and for one of the team project I have created the build definition (used default build template) and added the solution of one of the project. But when try to create build getting the following error:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets
(902): The command "if Debug == Debug copy
"C:\Builds\14\\\Sources\ServerObjects..\SharedInterfaces\bin\debug*.dll"
"C:\Builds\14\\\Sources\ServerObjects..\ServerObjects\bin\debug"" exited with
code 1.
I think you maybe has wrong folder structure on the source control, see my answer on similar question here
teambuilding and deploying a dll (e.g. wpftoolkit.extended.dll)
TeamBuild overrides the output folder so the bin\debug (or bin\release) folder won't exist. It collates the output into Binaries.
For your custom build step use the obj folder instead of bin as that'll be the same under both TeamBuild and the local machine build.