I am having a problem trying to retreive a project from source control.
I have probably done the wrong thing removing bindings and so forth. The version of my project in source control is not the latest version.
I am wondering if it can be retreived from the SQL Server storage.
Alternatively is it possible to retreive it from converting back the live source code?
I shall try to explain what I did.
A project I have was in source control, but when I opened the project it was not locked. So I opened the project from source control, but it was an old project with the same name.
I tried unbinding the mapping, created a new workspace and extarcted to a new local folder. But I get the old project still.
I cannot find the latest version of the project.
Related
I have a Xamarin Android Project that I want to migrate to .net6.0-android so I can use the new versions of MvvmCross. I have tried the upgrade-assistant. It claims to only upgrade Xamarin forms apps. I tried try-convert and it only seems to use msbuild through .net5.0. Can anyone tell me the correct steps to do this migration?
Thanks,
Jim
I wanted to maintain consistency in my Git Repository, so here is what I did. I made sure my app used the new PackageReference (to do this, if your project has a packages.config, you can right click it and it will give you an option to migrate). I created a blank .net6.0-android app. I copied the contents of my original app .proj to notepad to keep track of what NuGet packages I had been using. I then overwrote the contents of my original app .proj file with the contents of the blank app .proj. I used Nuget to add back in the required packages. I had to delete AssemblyInfo.cs in the Properties folder and Resource.Designer.cs in the Resources folder. I deleted the obj and bin folders in the project folder. After that, I was able to compile and run fine.
I am analyzing TFS to review code for a project built in Powerbuilder. Below is how things are set up:
We connect to TFS repository from Powerbuilder using MSSCCI plugin. fyi, Powerbuilder bundles the objects and stores in pbl file(powerbuilder library). Everything is kind of encrypted in pbl. Perhaps TFS is unable to recognize the pbl so objects like windows, datawindows, structure are placed in TFS server repository.
Say we have a library name project.pbl which have window1, window2 etc. Now in TFS, we have folder same as library name - project and in that folder we have the objects window1 and window2. When we get the source from TFS, we have the folder copied to our local folder along with the objects.
Now my question is:
1.When we make change to any object in Powerbuilder and check in, how does TFS knows the changes since it does not have information about the library?
2.If I check out an object and make a change, the changes are not visible in object in TFS. It would be visible only after code is checked in. In this case, how can I submit the code for code review prior to check-in?
Is there any other approach which I can take for code review?
Thanks,
Ashish
1) via the PBG file. From a quick Google search:
When you add a target or an object (in a target that is not under source control) to source control, PowerBuilder creates a PBG file. A PBG file maps objects in a target to a particular PBL in a PowerScript or .NET target. One PBG file is created per PBL , so there can be multiple PBG files for these types of target.
2) Not sure what 'submit the code for code review' is but if you are using TFS to track the defects / work via workitems you can link any changed objects to the workitem during check in. In my experience you should have (at least) a Development branch and a Production branch. All changes are made to the Development branch. If the code review or testing reveals a problem with code, it goes back to the developer. If everything is okay, the changes are then merged into the production branch.
With TFS if you use the Git repository instead of TFVC and if you upgrade to PowerBuilder 2017 R3 then PowerBuilder will save the non-binary (text) version of your objects (e.g. SRD, SRW, etc.).
I have a situation where a developer made mass changes to a project outside of TFS (long story), and now we want to put those changes back into TFS (files added, removed, renamed).
Of course, TFS is not like Git; if I check out the project, then delete the files from the workspace and copy over the new files, TFS won't adapt to those changes.
I have discovered that I can do a Compare from File - Source Control, and that the Compare screen allows me to mark files as added/deleted. This helps, but is a slow process for a large project, and quite prone to human error.
So, my question is: Is there an automated way to get TFS to simply add all new files and remove all deleted ones?
I don't care about tracking history of renamed files--they can be
considered "removes" and "adds."
I have tried unbinding and rebinding the workspace; this did not work for me (or I didn't do it correctly).
I am using VS 2015, TFS 2015, and I have the TFS Power Tools.
If you are using a Local Workspace then you should be able to get latest on the workspace, then copy over all the new files in Windows Explorer which will generate pending changes and file adds.
If you go into Pending Changes in Team Explorer you will have lots of detected changes for new files etc. but you can promote them to included changes.
This isn't going to deal with file renames or deletions though so it might not be the best solution.
Alternatively you could use Reconcile Changes in Version Control
In Source Control Explorer, right-click a folder, and then click Compare.
In the Compare dialog box. select the folder versions to compare.
In the Folder Difference window, right-click the folder or file you want to reconcile, and click Reconcile.
This will allow you to choose what to add or change to version control
You might try using tfpt online. I would add the /adds /deletes /diff /recursive flags as well.
I think in almost any case you will have some conflicts/manual work to do here.
There is a blog post on a possibly similar situation that used tfpt online as well: Discover File Changes Made Outside of Visual Studio
Since I did not get to try the above suggestions, I'll post the workaround I did, in case it helps anybody else. Hopefully, the above suggestions are better than what I ended up doing.
Make sure nothing is checked out
Open solution
Team - Go Offline
Close solution
Windows Explorer - Copy latest source folder into the current source folder (Windows Explorer will do a Merge).
VS - Open solutin, select solution file
File - Source Control - Advanced - Change Source Control
if you get a message about unloaded projects, make sure all projects loaded. Click "Reload" on those that didn't.
Shift to select all project, click Bind
Do a Compare in Source Control Explorer. Manually add all new files. Manually delete all deleted files. Frown.
Had to change my computername and domain. Now I can't access team foundation. I tried this statement to fix it.
tf workspaces /updateComputerName:MyOldComputerName /s:"http://MyServer/MyCollection"
It didn't work. I get the following error "Key not valid for use in specified state."
Not sure what to do now.
It sounds like you may have a problem that will prevent remapping the workspace. However, it's possible that the command isn't quite correctly formed, so try checking the collection URL (I'd expect it to include MyServer:8080), and in versions of TFS 2010 onwards the documentation refers to /collection: rather than /s:
If that fails, then one approach to rescue things is to create a new workspace and delete the old one. You can transfer any edited files you had checked out to the new workspace as follows:
Rename your old source code folder, so you keep a backup
Create a new workspace that maps the (old) source code folder location, and Get the latest version of the code.
If you think you deleted or added files, use a folder-diff utility to find them, and manually re-do those changes.
Now check out everything (right click on the root folder and check it out)
Copy your backed up source code over your workspace folder
Undo checkout on everything. Visual Studio will ask if you want to discard your changes. Carefully choose the "No to all" option. This means it will only discard locks on unchanged files.
You will now have all changed files listed in your pending changes.
Once you're absolutely sure this has all worked, you can delete your backup of the source.
(You can achieve a similar thing by unplugging your network cable to force Visual Studio to go offline, moving your old source code back in place of your new workspace folder, then plug the net cable back in and using File > Source Control > Go Online. This should diff your code to the server and work out what changed. I don't trust this as much as the above approach though)
Once you have the code in your new workspace, you can use the tf command to delete the old workspace to clean everything up.
I'm using TFS 2010 and Team Build 2010 to automate building a C++ project for embedded platform (TI compiler).
I'm want to customize my build version number by reading a file that is under source control.
The problem is that in the default workflow template (the one I've used as a template for my modifications), the build version is defined before "Run On Agent", which is where the source code is downloaded.
Is there a way (from inside a custom code activity) to open a file that is under source control without downloading it?
I already know a workaround - use the drop location root as a sorf of temp folder - to download that file, extract what I need from it, and then delete it. But I'm wondering if there's a more elegant way of doing it.