Order of assembly references in Phalanger.CompilerTask
1 post
• Page 1 of 1
Order of assembly references in Phalanger.CompilerTask
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:
while the following fails (note the order):
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).
- 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
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 17 guests