Recently, I have been facing this issue where my TFS(2015 update 3) msbuild runs with old code even after checking in changes and saving changes locally in visual studio 2015 enterprise edition. I use build to run Automated UI test by running my machine as test agent.
I can see an agent workspace other than my workspace(don't know if anything to do with it).
Can anyone guide me to correct this issue, or anyway to move forward without facing this issue again?
Please try below items to narrow down the issue:
Check the source code via web portal, verify that the new changes are
really checked in.
Check the definition setting, try to set "Clean" to "True" in
Repository tab.
Also enable the "Clean" option in MSBuild step.
Try to create a new definition with the same settings, then try it
again.
Clean the caches for your TFS Application Tier and agent machine,
then try it again.
Reboot the TFS and agent machine
UPDATE:
Below screenshot for your reference, also make sure you mapped the source correctly. You can also try to delete workspace and entire source folder directly from your agent machine, eg C:\Agent\_work\2\s (You can get the info from build log)
Related
I'm writing Protractor/Jasmine E2E tests on a local machine in Visual Studio 2015 which has my project stored through TFS and then I am running those tests each night on another machine. I may be misunderstanding the concept here and/or missing the point of the appropriate tool for this situation.
But, is there a way such that when I check in changes on my local machine that those changes are automatically checked out (get latest) on the secondary machine without having to manually get latest on the files?
If you deploy a build agent on the second machine, when you queue build, build agent will get latest version of your project into the source directory.
Or as #jessehouwing mentioned in comment, you can use TF.exe command line in a script on your second machine to get latest version of your project:
tf get /version:T
I have recently moved to Mac and am developing using Visual Studio 2013 from Parallels. I have pulled a project from BitBucket repo using Sourcetree.
Now any code changes I make do not translate to any changes. For example, I can comment out all Start up routines and project works fine (just like before commenting).
In addition, all breakpoints are displayed as empty balls with an exclamation mark on them (The breakpoint will not be hit. The source code is different from the original version).
I tried cleaning, rebuilding, deleting obj / bin directories to no avail.
Usually the remark 'The source code is different from the original version' is true.
The only hint is 'Parallels' however that should not be a problem. A few guesses:
Are you running a web project with ISS development host? It could run your site from another folder, however VSS will attach to this instance.
Do you have build output errors (See the errors tab). If so, check whether the setting 'Run last successful build' is enabled. This could disable running your unexpected binaries.
Is there a overridden entry point for debugging? It could be a precompiled version is included in the sources or from some other location. In this case deleting obj/bin folders won't work.
Just let's make sure this is not related to Parallels. I personally use Fusion with Unity but I expect similar tech. Is it a Bootcamp installation? In that case try to boot native and find out whether the problem still exist.
How do I delete all workspaces on the automated build server? We had an issue where we had to keep changing the credentials on the build agent for TFS 2010, and then if we tried to deploy the build next time for all our build definitions it gave the error that the workspace already existed under a different user.
I know we can do this:
tf workspace /delete /server:http://localhost:8080/tfs/DefaultCollection 26_1_internalserver123;MYOFFICE\brian.colley
But we have to manually do that for every build definition, and we don't really know the workspace number until we try and run the build and it gives the error.
In MSDN it says you can do a /remove:, but /delete: doesn't work (or isn't even in the msdn command options which is weird). I didn't know if remove is doing something that I don't want, versus delete.
Should I do this, or will it mess up all the users in TFS on their local boxes?
c:\projects>tf workspaces /remove:* /collection:http://myserver:8080/tfs/DefaultCollection
Thanks!
Install TFS Sidekicks, you can clean them up with a nice pretty GUI.
you can filter by the build account and a machine and then delete only the specific workspaces you are interested in
I have a database project in Visual Studio 2012. When selecting "Deploy MyDBProj" on the Build menu nothing happens.
When I hit F5 to debug however, the database project is deployed, using the settings in the debug section of the database project properties. This is enabled in by checking the "deploy" checkbox in the solution's configuration manager.
I would like to be able to do a deploy, without starting a debug session. How do I do that?
Note: This is not publishing, which is something else. I want to know how to manually initiate the deploy that is part of the build process. Since the deploy is already done automatically it should be possible to initiate it manually too.
I got an answer from Microsoft at MS Connect:
There was a bug in the version of SSDT that shipped in Visual Studio
2012 in wuich the Deploy menu command appears but is a no-op. This has
since been fixed and is available in the latest version of SSDT:
http://msdn.microsoft.com/en-us/data/hh297027
The only way I can think of doing it (though I haven't tested it) would be to use the command line to do it as outlined at http://msdn.microsoft.com/en-us/library/dd193258(v=vs.100).aspx.
Though once you have your manifest, you can run:
VSDBCMD /a:Deploy /dd:+ /manifest:manifestFileName.dbmanifest
from a command line to deploy your database.
The manifest will contain your target database name, connection string, and so on but you can also specify those as part of the command line instead.
I have a WebSite project that builds successfully when running locally. I'm trying to setup Continuous Builds for this website in TFS (Visual Studio 2010) - when the build runs, it's failing with this error -
The virtual path '/abc/MasterPages/abc.master' maps to another application, which is not allowed.
Within my build agent, I'm not even trying to publish this to IIS - all I've configured it to do is to just run the build and copy the output to a specific folder.
Can anyone please let me know how I can get around this problem in TFS, as the same code runs successfully on all the developers' workstations?
Do you have publish information set as part of the project? If so remove it. Publish step needs to be done another way as part of a tfs build
Work around was to Prefix ~ in all relative URLs - for eg: '/abc/MasterPages/abc.master' will be '~/abc/MasterPages/abc.master'
That seemed to solve my problem.