Commentor Blog

When Quality Matters

Commentor A/S

When Quality Matters

Contact usSend mail

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Error: Execution of a full-text operation failed. 'Access is denied.' Creating full text index on Workitem

Error:

TFS Error 2900: Execution of a full-text operation failed. 'Access is denied.' Creating full text index on Workitem

This error (actually the generic error 29000) came when installing TFS2008 on a dual-server configuration, where the data-tier was clustered. It turned out that the SQLFullTextService was running under the TFSService account and it didn't have sufficient rights to the databases.

Resolution: 

After the TFSSerice was made sysadmin on the database and the full-text service was restarted (from within SQLServer Mangement Studio or Cluster Admin - not the Service MMC as that would have made the fulltext service to fall to the secondary node) it worked.

Currently rated 5.0 by 3 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by jorn.floor.andersen on Tuesday, December 09, 2008 6:13 PM
Permalink | Comments (8) | Post RSSRSS comment feed

Guide to upgrading TFS2005 to TFS2008

The link below is a guide to upgrading TFS2005 to TFS2008. It includes descriptions of different errors and work arounds for these found during a number of upgrades of various TFS installations. Further a number of the steps in the official upgrade guide is further detailed or corrected.

 

Team Foundation Server upgrade from 2005 to 2008.docx (35,18 kb)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by jorn.floor.andersen on Tuesday, December 09, 2008 3:52 PM
Permalink | Comments (3) | Post RSSRSS comment feed

Microsoft Visual Studio Team Explorer 2008 - ENU has encountered a problem during setup

If the Team Explorer is installed right after TFS has been installed the following error might occur:

This error can be ignored as long as it still says Succesfully installed in the end dialog. It seems to be related to the setup process running and some files still locked from the TFS install.

Currently rated 3.0 by 1 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by jorn.floor.andersen on Tuesday, December 09, 2008 3:36 PM
Permalink | Comments (4) | Post RSSRSS comment feed

Materiale fra ALM seminar 13-11-2008: Projektstyring med TFS

Projektledelse med Team System 2008:

Projektledelse med Team System 2008.pdf (797,04 kb)

Projektledelse med Team System 2010:

Projektledelse med Team System 2010.pdf (383,65 kb)

Reports for VSTS 2008:

VSTS 2008 Reports.pdf (852,24 kb)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by jorn.floor.andersen on Saturday, November 15, 2008 6:15 AM
Permalink | Comments (11) | Post RSSRSS comment feed

ListView Extended Styles in .NETCF

In this article I would like to demonstrate how to extend the ListViewcontrol in the .NET Compact Framework. We will focus on enabling someof the ListView Extended Styles. If we take a look at the WindowsMobile 5.0 Pocket PC SDK we will see that there are certain features ofListView that aren't provided by the .NET Compact Framework.

Anexample of the ListView extended styles is displaying gridlines arounditems and subitems, double buffering, and drawing a gradientbackground. These extended styles can be enabled in native code byusing the ListView_SetExtendedListViewStyle macro or by sendingLVM_SETEXTENDEDLISTVIEWSTYLE messages to the ListView.

Send Message

Wewill be using a lot of P/Invoking so let's start with creating aninternal static class called NativeMethods. We need a P/Invokedeclaration for SendMessage(HWND, UINT, UINT, UINT).

internal static class NativeMethods
{
  [DllImport("coredll.dll")]
  public static extern uint SendMessage(IntPtr hwnd, uint msg, uint wparam, uint lparam);
}

Enabling and Disabling Extended Styles

Nowthat we have our SendMessage P/Invoke declaration in place, we canbegin extending the ListView control. Let's start off with creating aclass called ListViewEx that inherits from ListView. We need to lookinto the native header files of the Pocket PC SDK to get the ListViewMessages. For now we will only need LVM_[GET/SET]EXTENDEDLISTVIEWSTYLEmessage which will be the main focus of all the examples. I willdeclare my class as a partial class and create all the pieces one byone for each example. Let's create a private method called SetStyle(),this method will enable/disable extended styles for the ListView

public partial class ListViewEx : ListView
{
  private const uint LVM_FIRST = 0x1000;
  private const uint LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54;
  private const uint LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 55;

  private void SetStyle(uint style, bool enable)
  {
    uint currentStyle = NativeMethods.SendMessage(
      Handle,
      LVM_GETEXTENDEDLISTVIEWSTYLE,
      0,
      0);

    if (enable)
      NativeMethods.SendMessage(
        Handle,
        LVM_SETEXTENDEDLISTVIEWSTYLE,
        0,
        currentStyle | style);
    else
      NativeMethods.SendMessage(
        Handle,
        LVM_SETEXTENDEDLISTVIEWSTYLE,
        0,
        currentStyle & ~style);
  }
}

Grid Lines

Formy first example, let's enable GridLines in the ListView control. Wecan do this by using LVS_EX_GRIDLINES. This displays gridlines arounditems and sub-items and is available only in conjunction with theDetails mode.

public partial class ListViewEx : ListView
{
  private const uint LVS_EX_GRIDLINES = 0x00000001;

  private bool gridLines = false;
  public bool GridLines
  {
    get { return gridLines; }
    set
    {
      gridLines = value;
      SetStyle(LVS_EX_GRIDLINES, gridLines);
    }
  }
}

Whatthe code above did was add the LVS_EX_GRIDLINES style to the existingextended styles by using the SetStyle() helper method we first created.

Aninteresting discovery to this is that the Design Time attributes of theCompact Framework ListView control includes the GridLines property. Nowthat we created the property in the code, when we open the VisualStudio Properties Window for our ListViewEx we will notice thatGridLines property we created falls immediately under the "Appearance"category and even includes a description :)

Double Buffering

Doyou notice that when you populate a ListView control with a lot ofitems, the drawing flickers a lot when you scroll up and down the list?Although it is not in the Pocket PC documentation for Windows Mobile5.0, the ListView actually has an extended style calledLVS_EX_DOUBLEBUFFER. Enabling the LVS_EX_DOUBLEBUFFER solves theflickering issue and gives the user a more smooth scrolling experience.

public partial class ListViewEx : ListView
{
  private const uint LVS_EX_DOUBLEBUFFER = 0x00010000;

  private bool doubleBuffering = false;
  public bool DoubleBuffering
  {
    get { return doubleBuffering; }
    set
    {
      doubleBuffering = value;
      SetStyle(LVS_EX_DOUBLEBUFFER, doubleBuffering);
    }
  }
}

Gradient Background

Anothercool extended style is the LVS_EX_GRADIENT. This extended style draws agradient background similar to the one found in Pocket Outlook. It usesthe system colors and fades from right to left. But what is really coolabout this is that this is done by the OS. All we had to do was enablethe style.

public partial class ListViewEx : ListView
{
  private const uint LVS_EX_GRADIENT = 0x20000000;

  private bool gradient = false;
  public bool Gradient
  {
    get { return doubleBuffering; }
    set
    {
      gradient = value;
      SetStyle(LVS_EX_GRADIENT, gradient);
    }
  }
}

Ifyou want to look more into extended styles then I suggest you check outthe Pocket PC Platform SDK documentation. There a few other extendedstyles that I did not discuss that might be useful for you. You can getthe definitions in a file called commctrl.h in your Windows Mobile SDK"INCLUDE" directory.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by christian.resma.helle on Thursday, October 30, 2008 7:25 AM
Permalink | Comments (2) | Post RSSRSS comment feed

Tech Talk Statisk Kode analyse

TecTalken gennemgik, hvorledes Visual Studio Team System 2008's statiske analyse kan benyttes til at højne ensartetheden og kvaliteten. Det blev gennemgået hvorledes reglerne kan tilpasses og nye regler kan implemeneteres. Herudover blev der fremlagt en "hvordan kommer vi i gang strategi".

 

Powerpoint ligger i Statisk Kodeanalyse Techtalk.pptx (722,96 kb)

Og regel-eksemplerne ligger i CommentorFxCopRules.zip (9,77 kb)

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by ole.hedegaard on Wednesday, October 15, 2008 7:25 AM
Permalink | Comments (9) | Post RSSRSS comment feed

Tech Talk: Visual Studio Team System Profiler

TechTalken gennemgik, hvorledes Visual Studio Team System 2008 Profiler kan benyttes til nemt at finde flaskehalsene i C# programmer. Der blev gennemgået, hvilke muligheder profileren giver udvikleren.  

Der blev givet to praktiske eksempler på, hvorledes profileren bedst kan benyttes i forskellige scenarier til at finde flaskehalse, og hvad der kan gøres for at afhjælpe disse: Mandelbrot Fraktal tegningsprogram og et database deserialiseringsproblem.   

Gennemgangen af profileren dækkede de to metoder til performance-målinger: Sampling versus Instrumentering.  Herefter gennemgik jeg de forskellige views på de opsamlede målinger med fokus på hvilke, der kan bruges til hvad. 

Jeg har vedhæftet Profiler Techtalk.pptx (656,39 kb), et ”pseudo” profiler FattigMandsProfiler.zip (3,86 kb), og de to eksempler før optimeringen  DbTrial_Org.zip (3,70 kb) og   MandelC_.zip (22,46 kb).

Den sidste med tak til http://www.codeproject.com/KB/graphics/mandelbrot.aspx

Takker for det fine fremmøde og gode spørgsmål...

Efter ønske er her det optimerede datainitialiseringsprojekt: DbTrial_Tech_Talk.zip (3,63 kb)

Og analysen af forbedringen - en lidt skuffende faktor 290, men som det ses bruges tiden nu til en connection-open, så jo flere rækker des større forbedring:

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by ole.hedegaard on Wednesday, October 01, 2008 7:29 AM
Permalink | Comments (8) | Post RSSRSS comment feed

Basic Web Part Creation

 1.     Create C# Class Library
Name the class library according to needs and relevant guidelines

2.     Rename class according to your web part
E.g. MyOwnWebPart

3.     Add refence to System.Web
This is the most needed reference for writing Web Parts – just add any other references your need accordingly.

4.     Derive from System.Web.UI.WebControls.WebParts.WebPart
Notice the fact that the solution derives from a “System.Web” class. If you need to connect web parts on different pages, need to create client side connections or leverage data caching in WSS 3 – you should use the Microsoft.Web.UI.WebControls.WebParts.WebPart (remember to reference Microsoft.SharePoint assembly in that case)

5.     Override The RenderContents method to suit your needs
This is where your imagination comes in J Build whatever functionality you need to output and handle the rendering here.
Remember if you need to access e.g. SharePoint web services, you’ll have to consider code access security and/or deploy to GAC scenario.

6.     Add [assembly: System.Security.AllowPartiallyTrustedCallers()] to AssemblyInfo.cs
This is needed unless you add your assembly to the GAC. If you try to add your Web Part to a page without this it will show a dialog box and refuse to add your solution.

7.     Make post-build event (xcopy)
E.g. 
xcopy "*.dll" "C:\Inetpub\wwwroot\wss\VirtualDirectories\80\bin\" /y

Reconstruct the line above to suit your own SharePoint installation. You could choose your output location for the dll to be the same as above, but that’s not recommended. That’s hard to maintain if you work against automatic builds that uses the project files to determine file locations and if your co-developers is not aware of it and wonders why they can’t find the dll after build.

8.     Sign assembly (project properties)
This is a reasonable practice and will make your standard development procedure more prepared for real-world deploy where signing with certificates etc. might be relevant.

9.     Build solution
To make your dll, copy it to the bin folder of the SharePoint solution you’re developing for, and make the signing available in the dll (so you can find the public key, you’ll need it in a minute), you’ll have to build the solution - so go ahead.

10.      Find the relevant information for SafeControl entry in web.config
The SafeControl entry may look like this (one line):

<SafeControl Assembly="WebPartTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4580592393728f0b" Namespace="WebPartTest" TypeName="WebPartTest" Safe="True" />

The SafeControl entry is necessary in order to add the WebPart correctly to the WebPart gallery (and for the WebPart to function properly).

1.       First drop your dll on .NET Reflector (that extremely useful tool, for inspecting dll’s etc. Go get it, you’ll not be sorry). This will provide you with the “Assembly” part of the SafeControl entry.

2.       Then copy the Namespace from your solution to the “Namespace” part of the entry.

3.       Change the “TypeName” part of the entry to match your Class name from the WebPart solution.  

11.                       Add your Web Part to the Web Part gallery 
Choose: Site Actions →Site Settings → Web Parts (gallery) →”New”

Then navigate the list until you find your Web Part and check the checkbox.

Choose populate gallery to add your Web Part to the gallery

12.                       Add your Web Part to a page
Choose: Site Settings → Edit Page to add your Web Part to the current page.

When changing your implementation, all you need to do is to build the solution again, and the Web Part dll will be updated. Reload your page and voila!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: SharePoint
Posted by jane.noesgaard.larsen on Monday, August 18, 2008 2:26 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Unit Testing for Smart Devices Webcast

On the 28th of February 2008, Microsoft Denmark will have the first and largest online launch for Windows Server 2008, SQL Server 2008, and Visual Studio 2008. We made a few webcasts related to the products and technologies to be released. Here's one that I made entitled "Unit Testing for Smart Devices"

http://blogs.commentor.dk/downloads/smart_device_unit_testing.wmv

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by christian.resma.helle on Thursday, February 21, 2008 2:44 AM
Permalink | Comments (2) | Post RSSRSS comment feed

TFS web casts about TFS2008 source control features and Customizing Build

In relation to the upcomming Launch of Microsoft Visual Studio Team Foundation Server 2008 we have made a couple of web casts about new version control features and customization of builds:

http://blogs.commentor.dk/downloads/WebCast - Customisering af builds.wmv

http://blogs.commentor.dk/downloads/TFS2008 SC features.wmv

///Jørn

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by jorn.floor.andersen on Tuesday, February 19, 2008 3:08 AM
Permalink | Comments (3) | Post RSSRSS comment feed