Error TF31004 after uninstalling and reinstalling .NET Framework 3.0


  • I receive the following error message when I try to connect to our TFS:

    Microsoft Visual Studio
    Team Foundation Server

    TF31004: Team Foundation encountered an unexpected error while connecting to Team Foundation Server ISOAPP178. Wait a few minutes and try again. If the problem persists, contact your Team Foundation Server administrator.
    OK   Help  

    I wanted to try whether a specific project that uses .NET Framework 3.0 would build on the Build machine if .NET Framework 3.0 is not installed but all need assemblies are specified in a external assemblies folder. This is what I did:

    • Created a new Build Type
    • Tried to build once, which was successfull
    • Then I uninstalled .NET Framework 3.0 on the Build Machine which is also the application and data tier of TFS (for the record this is a TFS pilot deployment)
    • The build fails
    • Reinstalled .NET Framework 3.0
    • At this point I can no longer connect to TFS using Team Explorer

    There are several entries in the Event log but they are all the same letting me know I have a Ref-Def Mismatch:

    Event Type: Warning
    Event Source: ASP.NET 2.0.50727.0
    Event Category: Web Event
    Event ID: 1310
    Date:  2/16/2007
    Time:  2:55:31 PM
    User:  N/A
    Computer: TFS
    Event code: 3008
    Event message: A configuration error has occurred.
    Event time: 16/02/2007 14:55:31
    Event time (UTC): 16/02/2007 13:55:31
    Event ID: 96b28aa9f42545ae8ff17692dffca9c6
    Event sequence: 1
    Event occurrence: 1
    Event detail code: 0
    Application information:
        Application domain: /LM/W3SVC/3/Root/services-13-128161077303686549
        Trust level: Full
        Application Virtual Path: /services
        Application Path: C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\Web Services\Services\
        Machine name: TFS 
    Process information:
        Process ID: 4632
        Process name: w3wp.exe
        Account name: DOMAIN\TFSSERVICE 
    Exception information:
        Exception type: HttpException
        Exception message: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    Request information:
        Request URL: http://tfs:8080/Services/v1.0/ServerStatus.asmx
        Request path: /Services/v1.0/ServerStatus.asmx
        User host address: x.x.x.x (I changed this to x to post it here) 
        Is authenticated: False
        Authentication Type: 
        Thread account name: DOMAIN\TFSSERVICE 
    Thread information:
        Thread ID: 9
        Thread account name: DOMAIN\TFSSERVICE 
        Is impersonating: False
        Stack trace:    at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
       at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
       at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) 
    Custom event details:

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    Did anyone encounter the same and how to solve this?

    Friday, February 16, 2007 2:08 PM


  • Although I can't recommend this to other people who encounter the same issue, fixing the IIS mapping for ASP.NET with aspnet_regiis -i fixed the problem.
    Friday, February 16, 2007 2:18 PM