TFS- 2013 auto build Cloaked folder is giving not found issue - tfs

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.

Related

Jenkins and MSBuild Error

I am having an issue with building a sln on Jenkins. I know what the problem is I just have no idea how to fix said problem. So the sln imports a project that is not located in the same folder as the sln. This is not an issue with other sln files that we do the same thing with. As you can see below instead of .. to get back to parent directory it is a looking for a .. directory which obviously doesn't exist.
D:\Path\To\sln\OurSolution.sln.metaproj : error MSB3202: The project file
"D:\Path\To\sln\..\..\PathTo\SharedProject\Shared.csproj" was not found
[D:\Path\To\sln\OurSolution.sln]
Edit your .sln file and have it point to the .csproj file that does exist.
Also, double check your working directory to make sure it's the directory where the solution exists.
Paths in the .sln file need to be relative to the location of the .sln file so that when Jenkins can checks out the entire solution into its workspace from source control the paths resolve.
Check that the paths in the solution file are indeed relative to the solution file.
Check that all the project files defined in the solution file (and all their files in turn) are indeed being checked out to the Jenkins job workspace folder.
Where is the shared project in source control in relation to your solution file? Is it in the same repository? If it isn't then my bet is your Jenkins job isn't checking it out from source control into its workspace and therefore not finding it when the solution tries to compile.
Paths your sln and csproj files are relative. .sln and .csproj files paths are relative from where the sit on the file system.
Usually you would expect csproj files to exist in immediate subdirectories of the directory where the .sln file sits.

TFS Online Build Fails with Could not find part of the path

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.

TFS Build single folder not being copied

when building my app on a TFS server, a single folder (with 2 .xml files) aren't copied to the output folder, but all others are.
These files are: a normal xml file and it's tranform version,
This is on the corporate TFS build server and it works for all other files / transformations. So it must be one of my settings in this project / File.
I've checked the files, it's set the same as a .css file that is getting copied (so set to content)
anyone has an idea where I could have a look to find why this is happening?
or even better has a solution for me.
Found that WIX was removing this file

Teamcity is not copying all the folders

I've now setup a MSBuild script to create the folders and files I need in the right structure for my MVC project. I'm then setting Teamcity up to look at the folder with only the files I want to have and copy that to the artifacts folder. So far, so good!
However, There is a few folders in the structure that are empty, and Teamcity does not copy these folder, even if I've set it up to copy the mainfolder and everything in it.
Is there a way to force Teamcity to copy everything - and by that I mean EVERYTHING in my folder, or does it simply not work?
Teamcity Artifact path settings:
Website => Release
You may find your answer in this post : How do I exclude the contents of a directory but not the directory itself in MSBuild
It's not Teamcity but still MsBuild. The problem is that msbuild's include does not include empty directories...
We manage to work around this and skip the empty folders. Therefore this was no longer an issue. However, still don't know how to copy empty folders. My understanding from doing research for a long while now is that it simply doesn't work.

tf.exe Unable to detrmine the workspace

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)

Resources