Team Build, 3rd Party References, and Web Deployment Projects

Discussion in 'ASP .Net' started by mndang, Aug 11, 2006.

  1. mndang

    mndang Guest

    Hi All,

    This may have been posted before and such, but I tried a few solutions
    on the web but to no avail.

    Problem: I have a web projects (not Web Application Project) with many
    project references and a few 3rd party references. The 3rd party
    references are automatically added to the web.config file as another
    <add assembly/> element via the VS.NET 2005 IDE.

    The 3rd Party References are within Source Control not under the
    solution file node. e.g.

    Source Control Structure:

    $/Code/MyCode/MySolution.sln
    $/Code/MyCode/MyNameSpace/WebProject/$/Code/MyCode/MyNameSpace/MyProj1/MyProj1.csproj
    $/Code/MyCode/MyNameSpace/MyProj2/MyProj2.csproj
    $/Code/ReleasedAssemblies/ThirdParty/Microsoft
    $/Code/ReleasedAssemblies/ThirdParty/CrystalReports

    I am using Team Build and have added a Web Deployment Project to the
    solution. I am building into a Relase|Mixed Platform Mode with the RTM
    Version of TFS.

    I manually copied the all the 3rd party refs to the Team Build Server
    into a ReleasedAssemblies folder where I could easily reference those
    assemblies with Team Build.

    I tried Manish's fix to add the "AdditionalReferencePath" to
    TFSBuild.proj.
    http://blogs.msdn.com/manishagarwal/archive/2005/10/05/477363.aspx

    I put this line in my TFSBuild.proj:
    <AdditionalReferencePath
    Include="$(BuildDirectoryPath)\ReleasedAssemblies\ThirdParty\CrystalReports\"
    />

    But that did not resolve the issue of:
    web.config(113): error ASPCONFIG: Could not load file or assembly
    'xxx.xxx.xxx, Version=x.x, Culture=neutral,
    PublicKeyToken=7dd5c3163f2cd0cb' or one of its dependencies. The system
    cannot find the file specified.

    What is the proper and best method of referencing 3rd party references
    within web projects (Not Web Application Projects) using Team Build?

    I supply more info if required?



    THanks

    md
     
    mndang, Aug 11, 2006
    #1
    1. Advertisements

  2. mndang

    mndang Guest

    After more digging.

    The Build is failing @ compiling wdproj when executing
    ASPNET_Compiler.exe becuase it can not find those 3rd party references
    indicated in the web.config file.

    Found that the ASPNET_COMPILER.Exe does not have a reference attribute
    per se like csc.exe. A target <ResolveAssemblyReferences>, located in
    the Microsoft.WebDeployments.targets file, was called before the
    ASPNET_COMPILER.Exe step. This should have resolved all dependencies,
    but apparently it doesn't look like the 3rd party references listed in
    a web.config file isn't read by that target.

    Does anyone think this is a bug? Or is it by design? What is the
    purpose of that if so?

    I might have to install all these 3rd Party references into the GAC,
    but one shouldn't have to do that.
    OR
    Write a custom target to override the current <AspNetCompiler> Target
    to copy those assemblies into the _PublishedWebsites folder.

    Which way is better??? I would imagine writing a custom target is
    better.

    Regards,

    md
     
    mndang, Aug 14, 2006
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.