I'm creating bild-file for a project containing several 3rd-party libraries located inside a lib-folder. So my build-script looks like this:
<csc target="library" ....>
<sources>
<include name="**/*.cs" />
<!-- common assembly-level attributes -->
<include name="../../src/CommonAssemblyInfo.cs" />
<exclude name="Properties/AssemblyInfo.cs" />
</sources>
<references>
<include name="${build.dir}/bin/lib/Should.Fluent.dll" />
</references>
</csc>
The compilation runs fine, however, runtime doesn't work, saying it can't find the library Should.Fluent.dll. How can I make the program find 开发者_JAVA技巧it?
The library has to be present either in GAC or in the same directory that the referencing assembly is in. You can copy it manually to check if this fixes the problem - if yes, then add a <copy>
task that makes sure you references are present in your output problem.
精彩评论