MSBuild: building website using AspNetCompiler - adding references?
        Posted  
        
            by Tom Morgan
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Tom Morgan
        
        
        
        Published on 2010-03-26T09:12:54Z
        Indexed on 
            2010/03/26
            9:13 UTC
        
        
        Read the original article
        Hit count: 1063
        
Hi,
I'm attempting to build a ASP.NET website using MSBuild - specifically the AspNetCompiler tag. I know that, for my project, I need to add some references. Within Visual Studio I have several references, one is a project reference and the others are some DLLS (AjaxControlToolkit etc). I'm happy not referencing the project and referencing the DLL instead - however I just can't work out how to add a reference. I've looked up and down and this is what I've found so far:
<Target Name = "PrecompileWeb">
                <AspNetCompiler
                        VirtualPath = "DeployTemp" 
                        PhysicalPath = "D:\AutoBuild\CruiseControl\Projects\Websites\MyCompany\2.0.0\WorkingDirectory\VSS"
                        TargetPath = "D:\AutoBuild\CruiseControl\Projects\Websites\MyCompany\2.0.0\PreCompiled"
                        Force = "true"
                        Debug = "true"
            Updateable = "true"/>
        </Target>
Also - I've picked up this bit of code from around the web somewhere, which I thought might help:
<ItemGroup>
     <Reference Include="My.Web.DataEngine, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>D:\AutoBuild\CruiseControl\Projects\Components\My.Web.DataEngine\bin\Debug\My.Web.DataEngine.dll</HintPath>
    </Reference>
</ItemGroup>
What I want to do is add a attribute to the AspNetCompiler tag, something like:
References="@(Reference)"
but MSBuild isn't very happy about this.
I've been a bit stuck in not being able to find decent references on doing this anywhere: so I'd really apprechiate some pointers or reference material etc. (or just the answer!)
Thanks for you help.
-tom
© Stack Overflow or respective owner