Bugs item #1274056, was opened at 2005-08-26 16:11
Message generated for change (Comment added) made by drieseng
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1274056&group_id=31650

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: nicholasdu (nicholasdu)
Assigned to: Nobody/Anonymous (nobody)
Summary: output directory and assembly reference not in sync

Initial Comment:
There appears to be a problem where nant updates the 
output directory of a managed C++ project (which is 
expected since we set the outputdir attribute) as it 
doesn't appear to fixup the assembly reference tied to 
the project reference of that same managed C++ 
project.  This, of course, causes the build to break.

I turned on verbose and have included snippets from the 
output.  We have a base project called 
CompanyName.ProjectName.  It references project 
CompanyName.ProjectName.ProjectA.

Here is a snippet of ProjectA's project file.

                <Configuration
                        Name="Debug|Win32"
                
        OutputDirectory="$(ProjectDir)
$(ConfigurationName)"
              IntermediateDirectory="$(ConfigurationName)"
                        ConfigurationType="2"
                        UseOfMFC="0"
                        UseOfATL="1"
                        CharacterSet="2"
        ManagedExtensions="TRUE">
        <Tool
        Name="VCCLCompilerTool"
        AdditionalOptions="/Zi"
        Optimization="0"
        InlineFunctionExpansion="0"
        AdditionalIncludeDirectories="E:\ProjectName
\src\ProjectNameNet\ProjectName\SharedAssemblies\Vi
sualParse5.0
\Src;E:\ProjectName\src\ProjectNameNet\ProjectNameSharedAssemblies\VisualParse5.0\Include"
        PreprocessorDefinitions="WIN32;_DEBUG"
        MinimalRebuild="FALSE"
        ExceptionHandling="TRUE"
        BasicRuntimeChecks="0"
        RuntimeLibrary="3"
        RuntimeTypeInfo="TRUE"
        UsePrecompiledHeader="3"
        WarningLevel="3"
        DebugInformationFormat="0"/>
        <Tool
        Name="VCCustomBuildTool"/>
        <Tool
        Name="VCLinkerTool"
        AdditionalOptions="/NOENTRY"
        AdditionalDependencies="msvcrtd.lib 
mscoree.lib LNTUtilitieslib.lib"
        OutputFile="$(OutDir)/CompanyName.Project
Name.ProjectA.dll"


When built under VS.NET it puts its output in the 
project's Debug or Release directory.  This project 
directory is located in ROOT lets say.  So we have:

ROOT\ProjectA\Debug\CompanyName.ProjectName.Proj
ectA.dll

Our main project, CompanyName.ProjectName  
references this project within its project file (snippet 
below).

                <Reference
                    Name 
= "CompanyName.ProjectName.ProjectA"
                    Project = "{13DC2DF3-17EF-472E-B5BA-
E44481A81675}"
                    Package = "{8BC9CEB8-8B4A-11D0-8D11-
00A0C91BC942}"
                />

We override the output directory in our build file as 
follows:

                <solution 
configuration="${configuration}" outputdir="${outputdir}" 
solutionfile="ProjectNameNet.sln" verbose="true">
                        <assemblyfolders> 
                                <include 
name="ProjectName\SharedAssemblies" />
                        </assemblyfolders>
                </solution>

nant correctly overrides the output directory of ProjectA 
as can be seen by a snippet of the nant output.  Here 
C:\ProjectName\src\ProjectNameNet is equivalent to 
ROOT above.

 [solution] 
Building 'CompanyName.ProjectName.ProjectA' 
[Debug] ...
               [attrib] No matching files or directories found.
                 [link] PDB 
file 'C:\ProjectName\src\ProjectNameNet\Bin\Debug\Com
panyName.ProjectName.ProjectA.pdb' does not exist, 
relinking.
                 [link] Linking 22 files.
                 [link] Contents of C:\DOCUME~1
\foo\LOCALS~1\Temp\tmpEE.tmp.
                 
[link] /OUT:"C:\ProjectName\src\ProjectNameNet\Bin\De
bug\CompanyName.ProjectName.ProjectA.dll"


However, when attempting to build our main project it 
looks for ProjectA assembly in ROOT\ProjectA\Debug 
instead of ROOT\bin\Debug.


 [solution] Starting compiler...
 [solution] Commands:
             [solution]     /target:library
             [solution]     /nologo
             
[solution]     
/doc:"C:\ProjectName\src\ProjectNameNetProjectName\CompanyName.ProjectName.xml"
             [solution]     /filealign:4096
             [solution]     /define:DEBUG;TRACE
             [solution]     /warn:4
             [solution]     /baseaddress:0x11000000
             [solution]     /optimize-
             [solution]     /debug+
             [solution]     /incremental-
             [solution]     /checked-
             [solution]     /unsafe-
             [solution]     /warnaserror-
             
[solution]     /out:"C:\ProjectName\src\ProjectNameNet\P
rojectName\obj\Debug\CompanyName.ProjectName.dll"
             
[solution]     /r:"C:\WINDOWS\Microsoft.NET\Framework
\v1.1.4322\System.Windows.Forms.dll"
             
[solution]     /r:"C:\WINDOWS\Microsoft.NET\Framework
\v1.1.4322\System.Drawing.dll"
             
[solution]     /r:"C:\WINDOWS\Microsoft.NET\Framework
\v1.1.4322\System.Xml.dll"
             
[solution]     /r:"C:\WINDOWS\Microsoft.NET\Framework
\v1.1.4322\System.Data.dll"
             
[solution]     /r:"C:\ProjectName\src\ProjectNameNet\Proj
ectName\SharedAssemblies\ICSharpCode.SharpZipLib.d
ll"
             
[solution]     /r:"C:\WINDOWS\Microsoft.NET\Framework
\v1.1.4322\System.dll"
             
[solution]     /r:"C:\ProjectName\src\ProjectNameNet\Proj
ectName\SharedAssemblies\log4net.dll"
             
[solution]     /r:"C:\ProjectName\src\ProjectNameNet\Proj
ectName\SharedAssemblies\Syncfusion.Calculate.Wind
ows.dll"
             
[solution]     /r:"C:\WINDOWS\Microsoft.NET\Framework
\v1.1.4322\System.Web.dll"
             
[solution]     /r:"C:\ProjectName\src\ProjectNameNet\Proj
ectName.Utils\obj\Debug\CompanyName.ProjectName.U
tils.dll"
             
[solution]     /r:"C:\ProjectName\src\ProjectNameNet\Proj
ectName\SharedAssemblies\Syncfusion.Calculate.Base.
dll"
             
[solution]     /r:"C:\ProjectName\src\ProjectNameNet\Proj
ectA\Debug\CompanyName.ProjectName.ProjectA.dll"

Hopefully obfuscating the company details isn't making 
this harder to understand.


----------------------------------------------------------------------

>Comment By: Gert Driesen (drieseng)
Date: 2005-09-02 20:28

Message:
Logged In: YES 
user_id=707851

Can you attach a small repro for this issue to this bug report 
(or send it to me directly : [EMAIL PROTECTED]) ?

Thanks !

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1274056&group_id=31650


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to