viernes, 29 de junio de 2012

Tips/Info # 7 Team Foundation Server

1-Algunas queries de SQL útiles

cel nombre de tu base de datos de la colleción. .
USE Tfs_DefaultCollection
GO

-- Usuarios recientes 
select count(distinct IdentityName) as [Recent Users] from tbl_Command with (nolock)

-- Usuarios con work items asignados
select count(distinct [System.AssignedTo]) AS [Users with Assigned Work Items] from WorkItemsAreUsed with (nolock)

-- Cantidad de Work items 
select count(*) AS [Total Work Items] from WorkItemsAreUsed with (nolock)

-- Historial de Merge
select SUM(st.row_count) AS [Merge History] from sys.dm_db_partition_stats st WHERE object_name(object_id) = 'tbl_MergeHistory' AND (index_id < 2)

--Cambios Pendientes
select count(*) AS [Pending Changes] from tbl_PendingChange pc with (nolock) join tbl_Workspace w with (nolock) on pc.WorkspaceId = w.WorkspaceId where w.Type = 0

2-Saber cuales fueron los archivos que se hicieron check in por un determinado usuario, en una fecha específica

SELECT  dp.Name
        , dp.Alias
        , cs.ChangesetTitle
        , cs.LastUpdatedDateTime
        , f.FileName
        , f.FilePath
FROM    dbo.DimPerson dp
        INNER JOIN dbo.DimChangeset cs ON cs.CheckedInBySK = dp.PersonSK
        INNER JOIN dbo.DimFile f ON f.FileSK = cs.ChangesetSK
WHERE   cs.LastUpdatedDateTime BETWEEN '20120502' AND '20120602'  and dp.Name lik "%Nombre usuario%"

3-Ubicación de la herramienta de comandos de TFS: tf

La misma se encuentra en la carpeta de instalación de TFS, por default en:

C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE

También puede accederse vía el Visual Studio Command Prompt (Inicio/All Programs/Microsoft Visual Studio 2010/ Visual Studio Tools/Visual Studio Command Prompt (2010).) Recuerde ejecutarlo como Run as administrator.

Encontrará los comandos disponibles en el siguiente link: http://msdn.microsoft.com/en-us/library/z51z7zy0

Recuerde que también puede usar las powertools (http://visualstudiogallery.msdn.microsoft.com/c255a1e4-04ba-4f68-8f4e-cd473d6b971f/) vía línea de comandos: tfpt.exe

4-Visual Studio 2008 y TFS 2010

  • Instalar Visual Studio 2008
  • Instalar Visual Studio 2008 Team Explorer http://www.microsoft.com/en-us/download/details.aspx?id=16338
  • Instalar Visual Studio 2008 SP 1 http://www.microsoft.com/en-us/download/details.aspx?id=10986
  • Instalar Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010 (Installer) http://www.microsoft.com/en-us/download/details.aspx?id=10834

    Al conectarse al servidor de TFS se debe especificar la url completa: http://servername:8080/tfs

    Si sigues sin poder conectarte abre el editor del Registro (Menú Inicio/Ejecutar/regedit.exe) de Windows y dirigite a la siguiente llave:  HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\Servers y agrega un valor alfanumérico que contenga la ruta completa a tu servidor TFS 2010 (La misma que pusimos arriba). En el nombre teclea el que quieras que VS 2008 despliegue cuando selecciones el servidor:

    regedit

    5-Delete un work item en TFS 2010

    Si tengo un team foundation power tool (http://msdn.microsoft.com/en-us/vstudio//bb980963.aspx)  podré borrar un item de la siguiente manera:

    tfpt destroywi /server:tfs-dev /workitemid: xxxxxx

    xxxx se reemplaza por el id del work item deseado

    Otra manera es usar la herramienta: http://witadminui.codeplex.com/

    Y por último, se podría usar Witadmin.exe

    Ir hasta C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE) (en 32 bits)

    o C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common 7\IDE (en 64 bits)

    Syntax: witadmin destroywi /collection:collectionurl /id:id [/noprompt]

    Usage: witadmin destroywi /Collection:http:\\TestTFSServer:8080\tfs\DefaultCollection /id:12

  • domingo, 24 de junio de 2012

    Links útiles #10 Team Foundation Server

    1-Architecture Explorer Work Item Extension

    Permite explorar los work items vía sus relaciones y propiedades.

    http://dotnet.dzone.com/articles/tfs-work-item-explorer

    http://visualstudiogallery.msdn.microsoft.com/cca7bfad-78b2-4cac-acd6-7abc6d630b48

    2-Instalando TFS 2012 con Lab Managment 2012

    http://blog.hinshelwood.com/installing-tfs-2012-with-lab-management-2012

    3-Crear un Team Project en TFS Preview

    http://lajak.wordpress.com/2012/06/21/create-a-team-project-in-tfs-preview/

    4-Conectarse desde Visual Studio 2012 a TFS Preview

    http://lajak.wordpress.com/2012/06/21/connect-visual-studio-2012-to-tfs-preview/

    5-Nuevos libros sobre TFS

    http://blogs.msdn.com/b/briankel/archive/2012/06/21/2-new-books-pro-alm-with-visual-studio-2012-and-pro-tfs-2012.aspx

    6-Integrar Team Foundation con Sharepoint (Extensions for Sharepoint Products)

    http://blog.cloudshare.com/2012/06/11/how-to-integrate-team-foundation-server-with-sharepoint/

    7-Recrear Data Warehouse y Analysis Services para TFS 2010

    http://mohamedradwan.wordpress.com/2010/10/29/how-to-recreate-the-data-warehosue-and-the-analysis-service-for-tfs/

    8-Objet Model para TFS 2010

    http://visualstudiogallery.msdn.microsoft.com/a37e19fb-3052-4fc9-bef7-4a4682069a75

    9-Videos sobre los WorkItems de TFS 2010

    http://channel9.msdn.com/posts/TFS-2010-workitem-tracking-Part-1

    http://channel9.msdn.com/posts/TFS-2010-Workitem-Tracking-part-2

    10-Integración de AZURE con TFS

    http://www.estoyenlanube.com/windows-azure-web-sites-45-integracin-con-tfs-y-git/

    miércoles, 20 de junio de 2012

    Tips/info #6 Team Foundation Server

    1-Cambiar la frecuencia del refresco de los reportes deTFS

    La base relacional (Tfs_Warehouse) es procesada dentro de los 2 minutos que los cambios son realizados a un store operacional, y el cubo SQL Server Analysis Services (Tfs_Analysis) es procesada dentro de las 2 horas.

    Pasos para reducir el refresco de datos de reportes

    1. Abrir la página WarehouseControlWebService

    http://localhost:8080/tfs/TeamFoundation/Administration/v3.0/WarehouseControlService.asmx

    2. Click en ChangeSetting

    3. En el campo settingID, escribir IncrementalProcessIntervalSeconds

    4. En el campo newValue, agrega 600, y a continuación click en el botón Invoke

    Esto seteará el refresco del cubo a 10 minutos

    2-Locks huérfanos en TFS 2010

    El error dice: The item $/proj/xyz is locked for check-out by (null) in workspace (null).

    El siguiente script de sql borra los locks huérfanos.

    SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
    DELETE l
    FROM  tbl_Lock l
    LEFT JOIN tbl_PendingChange pc
    ON l.PendingChangeId = pc.PendingChangeId
    WHERE pc.PendingChangeId IS NULL

    3-Propiedades de MSBUILD para Sharepoint 2010

    Cualquier propiedad de MSBuild se definen en el archivo Microsoft.VisualStudio.SharePoint.targets, archivo de proyecto o un archivo de usuario del proyecto puede ser utilizado en proyectos de Visual Studio SharePoint. Además de las propiedades de MSBuild comunes proporcionados por el proyecto, define las propiedades de SharePoint adicionales que son específicos para los proyectos de SharePoint.

    Property Name

    Description

    SharePointSiteUrl

    A string that represents the URL to the SharePoint site.

    SandboxedSolution

    A Boolean value that indicates whether the solution is a sandboxed solution.

    ActiveDeploymentConfiguration

    The active deployment configuration.

    IncludeAssemblyInPackage

    A Boolean value that indicates whether the assembly is included in the package file.

    PreDeploymentCommand

    A string value that represents the command to execute in the pre-deployment command step.

    PostDeploymentCommand

    A string value that represents the command to execute in the post-deployment command step.

    CustomBeforeSharePointTargets

    A string that represents the path of a MSBuild targets file. If the targets file exists and is defined, it is imported before any SharePoint targets data. This property lets you customize the package process by predefining packaging-related properties without modifying the shipped SharePoint targets file, yet the targets file still applies to all SharePoint projects.

    CustomAfterSharePointTargets

    A string that represents the path of a MSBuild targets file. If the targets file exists and is defined, it is imported after all of the SharePoint targets data. This property lets you customize the package process by overriding packaging-related properties and targets without having to modify the shipped SharePoint targets file, yet the targets file still applies to all SharePoint projects.

    LayoutPath

    A string that represents the root directory where each of the files to be packaged are temporarily placed before they are added to the .wsp file. This path can be useful to know when you override the BeforeLayout and AfterLayout targets to add, remove, or modify files to be packaged, because you can use it to alter the contents of the .wsp file.

    BasePackagePath

    A string that represents the folder in which the package is placed. This value uses the output directory of the project, such as Bin\Debug.

    PackageExtension

    A string that represents the file name extension to append to the package. The default value is wsp.

    AssemblyDeploymentTarget

    A string that represents the location where the project assembly is deployed on the SharePoint server. Its value is either GlobalAssemblyCache (the default) or WebApplication. This property can also be set in the Properties window.

    PackageWithValidation

    A Boolean value that specifies whether validation is performed before packaging. This property lets you ignore validation errors while building Packages.

    ValidatePackageDependsOn

    A string that defines additional targets to execute before the ValidatePackage target.

    TokenReplacementFileExensions

    A string that defines the files that have their tokens replaced during packaging.

    4-“TF50309: The following account does not have sufficient permissions” al tratar de conectar TFS MSSCCI provider con Visual Basic

    Al tratar de conectar a TFS con Visual basic, nos lanza este error, para ello se debe ingresar la url de tfs de la siguiente manera: http://tfs _server:puerto/tfs/team_project_collection/

    sábado, 16 de junio de 2012

    Links útiles #10 Team Foundation Server

    1-Editar o crear un work items

    http://www.dotnetcurry.com/ShowArticle.aspx?ID=755

    http://tedgustaf.com/en/blog/2011/1/how-to-customize-tfs-2010-work-items-and-workflows/

    http://ravendra.wordpress.com/2010/06/02/customizing-existing-work-item-template-tfs-2010/

    http://elbruno.com/2011/04/30/tfs2010-howto-create-a-field-for-a-workitem-with-custom-values-and-easy-to-maintain/

    2-Construyendo un tablero de TFS 2010 con Dashboard Designer

    http://burcakcakiroglu.com/?p=2738

    3-Copiar una build definition a otro team project via API.

    http://www.c-sharpcorner.com/UploadFile/jawedmd/copy-build-definition-from-project-%E2%80%9Ca%E2%80%9D-to-project-%E2%80%9Cb%E2%80%9D-using/

    4-Mejoras de Visual Studio 2012 para trabajar con TFS 2012

    http://blogs.msdn.com/b/buckh/archive/2012/06/07/visual-studio-2012-features-enabled-by-using-a-tfs-2012-server.aspx

    5-Template de TFS 2010: combina la formalidad de CMMI/WATERFALL con la flexibilidad de Agile/Iterativo

    http://blogs.msdn.com/b/hkamel/archive/2012/06/13/new-tfs-template-available-quot-agile-dev-in-a-waterfall-environment-quot-govdev.aspx

    Links útiles #9 – Team Foundation Server 2010

    1-Publicar resultados de test de NUnit en TFS 2010

    http://www.fabricemoll.com/post/How-to-publish-NUnit-test-results-in-Team-Foundation-Server-2010.aspx

    2-VS 2008 y TFS 11

    http://blogs.msdn.com/b/bharry/archive/2012/06/09/update-for-vs-2008-and-tfs-11.aspx

    3-TFS 2010 y ANT

    http://www.alexandervanwynsberghe.be/tfs-2012-ant-unable-to-access-ant-launcher-jar/

    4-TFS Work items search plugin

    http://bartwullems.blogspot.com.ar/2012/06/searching-tfs-work-items-in-visual.html

    5-TFSVERSIONING

    http://tfsversioning.codeplex.com/

    6-Migrar Visual Source Safe a TFS 2010

    http://nigelonagile.com/2010/09/01/step-by-step-vss-to-tfs-migration/

    domingo, 3 de junio de 2012

    Links útiles #9 Team Foundation Server

    1-Extensión TFS Helper: permite copiar work items entre team projects

    http://visualstudiogallery.msdn.microsoft.com/707e88bc-1db3-4ad3-9883-b70dfb91372e

    2-NUGET y TFS 2010

    http://blog.rthand.com/post/2011/08/26/Fixing-combination-of-NuGet-and-Team-Foundation-in-workgroup-configuration-401-Unauthorized.aspx

    3-Buscar y filtrar conjuntos de cambios (changesets) con tfpt searchcs

    http://levelnis.co.uk/blog/searching-and-filtering-team-foundation-server-2010-changesets

    4-Acceder a TFS Preview dese Visual Studio 2010

    Debe instalar http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=39070

    Configuración: http://blogs.msdn.com/b/visualstudioalm/archive/2011/12/07/connect-visual-studio-2010-to-your-tfs-preview-account.aspx

    5-Windows Phone y TFS 2010

    http://justinangel.net/TFS2010WP7ContinuousIntegration

    6-TFS 2010 alertas: extensión para Visual Studio

    http://visualstudiogallery.msdn.microsoft.com/418522f7-6a2a-439f-a874-5e8190bbdbc8

    7-TFS 11

    http://www.anujchaudhary.com/2012/05/tfs-2011-beta-team-explorer.html

    http://www.anujchaudhary.com/2012/05/tfs-2011-beta-web-access.html

    http://blogs.microsoft.co.il/blogs/shair/archive/2012/05/28/tfs-api-part-47-vs11-manage-iterations-dates.aspx (API)

    8-Integración entre TFS 2010 y Project Server 2010

    http://blogs.msdn.com/b/bharry/archive/2010/12/07/portfolio-management-tfs-lt-gt-project-server-integration-in-beta.aspx

    http://blogs.msdn.com/b/bharry/archive/2011/03/08/vs-tfs-2010-sp1-and-tfs-project-server-integration-feature-pack-have-released.aspx

    9-Variables preprocesador en TFS

    http://bartwullems.blogspot.com.ar/2012/06/define-preprocessor-variable-in-tfs.html

    10-Lo nuevo TFS 2012

    http://mohamedradwan.wordpress.com/2012/05/30/whats-new-in-tfs-2012-management-tool/

    11-Windows 8 y Eclipe

    http://blog.hinshelwood.com/installing-eclipse-on-windows-8-and-connecting-to-tfs-2012/

    12-SQL Server 2012 y TFS 2012

    http://blog.hinshelwood.com/installing-tfs-2012-on-server-2012-with-sql-2012/