Order of assembly references in Phalanger.CompilerTask

Discussion about the open-source Phalanger [?] project.

Order of assembly references in Phalanger.CompilerTask

Postby weirdan » January 9th, 2016, 2:48 am

It seems msbuild compiler task, unlike command-line compiler, is sensitive to the order in which references are specified in the <ItemGroup>. For example, the following build snippet builds fine:
Code: Select all
    <ItemGroup Condition="'$(AppType)' == 'Gtk'">
        <Compile Include="src/View/Gtk/App.php"/>
        <!-- ....... -->
        <Reference Include="ICSharpCode.NRefactory">
            <Private>true</Private>
        </Reference>
        <Reference Include="Mono.TextEditor">
            <Private>true</Private>
        </Reference>
        <!-- ....... -->
    </ItemGroup>

while the following fails (note the order):
Code: Select all
    <ItemGroup Condition="'$(AppType)' == 'Gtk'">
        <Compile Include="src/View/Gtk/App.php"/>
        <!-- ....... -->
        <Reference Include="Mono.TextEditor">
            <Private>true</Private>
        </Reference>
        <Reference Include="ICSharpCode.NRefactory">
            <Private>true</Private>
        </Reference>
        <!-- ....... -->
    </ItemGroup>


Is this expected behavior? Am I supposed to do topological sort based on the dependencies myself?

'strace xbuild' shows that when the build fails, NRefactory assembly is searched in weird places like xbuild directories, even though the exact path to the assembly is specified in References parameter to the compiler task, albeit after the assembly that requires it (Mono.TextEditor).
weirdan
 
Posts: 17
Joined: June 4th, 2013, 1:11 am

Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 1 guest

cron

User Control Panel

Login

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 62 on January 7th, 2012, 10:54 pm

Users browsing this forum: No registered users and 1 guest
Phalanger