how to restore TFS project? - sql-server-2005

I deleted a project folder in TFS, without realizing and checked in pending changes as well.
The local project copy was in offline state and I mistakingly made it online. Because of this I lost the only copy I had. Is there a way to restore the project? I know this is foolish and careless but I made the mistake already. Please help.

check this : here
In Team Explorer (in Visual Studio): Tools | Options | Source Control | Visual Studio Team Foundation Server and select Show Deleted Items...
Then in source control explorer you'll see the items greyed out. You can right click on them and Undelete. (This option will only be available if they, after the undelete, will be included in your current workspace).
Alternatively using the TFS PowerToys you can look at history and right click to select "Rollback Entire Changeset": this will create pending changes to revert the changes of the selected changeset.

Related

VS2022 Database Project Reference Keep Breaking

Vs2022, I have a database project. Within that project are some views and functions which refer to a system database. So I have added those system database references, both Master and MSDB to the project. The references work, all is good.
I close the solution and reopen it, and now the project shows two references to each database, and a bunch of script errors because an unresolved reference exists:
So the fix is again to remove these 4 references, add the database reference back to master and msdb, and then all is good, until I reopen the solution again!
One side note, this solution was originally created in VS2019. Also, this happens on 2 separate machines. I'm running VS 17.3.3 64-bit.
For anyone facing the same problem, VS 2022 adds two references to the DBs, one from VS extensions folder and the other one from SQL Server folder, its definitely a bug and happens often when updating VS 2022.
However, the solution is to delete the second one from the project references (SQL Folder Reference) and then you need to click on the project and explicitly save it by using Ctrl+S, otherwise, the change will not be saved and whenever you close and open the solution, the project will show invalid references.

analysis services datasource migrated

I have none experience with SSAS, I had this cube working perfectly…
The underlying tables that it was using were from a database, let’s call it ‘ABCD’. The problem is, that for other reasons ABCD database had to be split in ‘AB and ‘CD. Half the tables have been migrated to AB and the other half to CD. In my mind I want to open something as ALTER, edit the DB name, and everything would work as before, but SSAS is a bit of a black box for me; can I achieve this?
I know I can just access ABCD and create views to AB and CD and mask my problem, but I would really love to know how to modify the scripts that build the cube….
My recommendation is to just add views into the AB database which point to the tables which have moved to the CD database. Then you can edit the data source from Management Studio and point it to the AB database. (You just connect Object Explorer to Analysis Services, expand down to the database, expand to the Data Source, then double click to edit.)
If that's not an option then you can change the cube source code as follows...
I'm assuming it's a Multidimensional cube, not Tabular. If you already have Visual Studio and SSDT installed, great. Otherwise, install the latest SSDT which runs in Visual Studio 2015 as it's backwards compatible.
In SQL Server Management Studio, connect Object Explorer to Analysis Services and then right click on the database and choose Backup.
In Visual Studio, File... Open... Analysis Services Database. You are editing the cube "source code" live now. As soon as you save a change it will deploy it to the server.
Double click the data source and fix the connection string. Make sure it's using a version of the driver that's on the SSAS server. Point it to the AB database.
Then double click the DSV. In the tables list on the left, right click on each table which was moved to the CD database and choose Replace Table... With New Named Query. Click the "Switch to Generic Query Builder" button and then edit the query to look something like:
select *
from CD.dbo.YourTable
Click Save.
Then go back to Management Studio, right click the database and choose Process. Do a Full Process on the database. It should succeed and be up to date.
It is possible to reverse engineer a deployed SSAS database. The above assumes that's not important to you. But if you need to do this, in Visual Studio do File... New Project... Templates... Business Intelligence... Analysis Services... Import From Server (Multidimensional and Data Mining).

TFS Checked in items not available in view history (intermittent)

I have recently experienced a strange problem in tfs source control . I added some code in two different parts of n-tier solution in visual studio 2012; code behind aspx.vb file and class library project, they appeared in pending changes, I checked-in and did something else in the project but later on I found the changes I made in the code are not there anymore.I checked the view history from source control explorer and those changes are not shown in view history. However If i update existing code base now and do check-in pending changes they are showin in view history. Can any body tell why in first place checked-in changes are gone from tfs or is there anything I can do to retrieve those changes. TFS server is 2008
Thanks
I would suggest that there was something wrong with the workflow you used to perform the first checkin. Checkins are atomic so you can't have some files checked in an others not.
The most common scenario would be that the scope of your checkin was incorrect.
Note: You should move ASAP to upgrade your TFS server to 2013. TFS 2008 no longer revives servicing.

Visual Studio 2013 database project- DROP objects in target but not in project

I am using VS 2013 for database project. I want to drop ojected from target db which are not in db project including table and SP's. I have checked property "DROP objects in target but not in project" but it doesn't work. I still see table in target which is not part of db solution. I do not see any warnings either and btw table is empty so it should be dropped without warnings anyway. I have used same option in older version of Visual studio and it worked.
Any suggestions?
I know this is a long time coming to answer the question, but this is how I resolved the problem. I simply opened the SQL File TableName.sql
Ctrl+a (aka select all)
Compare
It will show the file with an action to delete in the compare
Update
Delete the file from Visual Studio 2013 project

How do I change Process Template on an existing Team Project in TFS 2010?

How do I change process template to MSF for Agile on an already existing team project in TFS 2010?
We have upgraded our TFS 2008 to 2010, and now I would also like to change the process template to MSF for Agile (currently CMMI).
We haven't used the workitem functionality much so if some information gets lost in the conversion doesn't matter.
Once you've created a Team Project, you unfortunately can't just upload a new process template. As Robaticus says, you'll have to download the XML for the template and modify it, then re-upload it. The power tool lets you create NEW templates for NEW team projects, but it won't modify an existing one.
Instead, you can use the witadmin.exe tool (on any computer with Team Explorer installed, under \Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE, or just from a Visual Studio Command Prompt) to export the current workitem definitions and re-import them once you've made your changes.
Luckily, if you're not using workitem tracking much, then this might not be too difficult. You might be able to just delete all the existing workitem types and then re-upload the new types.
If this is too much trouble, consider how much you want to retain your source control history. It might be worth creating a new Team Project with the Agile template and then just moving all your source code into it.
You can't change the process template, however you can change the work item types. So for bugs, tasks you can swap to the Agile definitions.
You can do this in 2010 with witadmin, in 2008 it's importwit, by first downloading the template to disk (you'll need the TFS power tools for this). Then point the console app at bug.xml, task.xml etc..
Usage: witadmin importwitd /collection:collectionurl [/p:project] /f:filename [/e:encoding] [/v]
/collection Specifies the Team Foundation project collection. Use a fully specified URL such as
http://servername:8080/tfs/Collection0.
/p Specifies the team project in which the new work item type is imported. This is required, except when
the validation-only option is used.
/f Specifies the work item type XML definition file to import.
/e Specifies the name of the .NET Framework 2.0 encoding used to import the XML file. For example,
/e:utf-7 will use Unicode (UTF-7) encoding. Encoding is automatically detected whenever possible. If
the encoding cannot be detected, UTF-8 is used.
/v Validates the XML definitions for the work item type, link type, or global workflow without importing
them.
You can export the agile process template to disk, then import the work items into your existing project. You may need the TFS Power Tools to do this.
I may be too late for this question, but the TFS Integration Platform tools could really help here.
See this question on server fault that details on how to move from Scrum For Team System V2 to Microsoft Visual Studio Scrum 1.0.
You would need to setup your own mappings to move from your templates to the target template, but the process is the same.
Please note witadmin.exe could help in some scenarios but TFS Integration Platform is your ultimate choice to achieve this task. There is a user voice item still pending. Please check this SO thread.
I think the best way to accomplish this is to create a new Team Project with "the new" process template and use the TFS Integration tool to migrate your existing WorkItems and choose create a new branch from Source Control, so you'll have new work Items (with the new workflow) and the source control history (as well). You'd even do this across versions of TFS!! (On the case interested on migrate TFS 2005/2008/2010)
Another way might be to use the WorkItem Templates, but I think this is more a kind-of visual style (I've not much experience) applied to the Work Item. To do so, just right click on your project, import the WITDefinition and apply the template by selecting Apply template on desired WorkITems.