Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

csproj imports
wwwlicious
#1 Posted : Monday, February 20, 2012 12:03:43 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/19/2012(UTC)
Posts: 1
Location: UK

Currently having a couple of issues which both relate to some import statements for 3rd party libraries that are in the .csproj files

The first is to do with postsharp v2.0

In all of the project files we reference an import file

<Import Project="$(PostsharpDirectory)\PostSharp.targets" />

however not all projects actually use it, for which postsharp respects the following property flag

<DontImportPostSharp>True</DontImportPostSharp>

This setup also means that the postsharp.dll reference is not included in the project.
The build in VS or via msbuild respects this setting but nCrunch is still looking for the reference to postsharp.dll (which is the reason nCrunch build fails)

The simple solution for this is to remove the import when postsharp is not referenced so it can be done like that.

The second issue is with devart oracle componet. TBH I'm not sure yet what is causing it but it is usually a problem in our CI environments as the main dll has a couple of dependeny assemblies which
are never picked up (even which checked SatelliteAssemblies etc)
It also requires that every assembly that calls any assembly using devart to be included in running LC.exe for licensing.

Will investigate this further in a couple of days and see if I can get a better handle on what is happening.
Remco
#2 Posted : Monday, February 20, 2012 7:19:32 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,140

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting about these issues.

The postsharp problem is caused by a build dependency on a binary file that NCrunch isn't aware of. Right now NCrunch doesn't recognise the "UsingTask" MSBuild tag, so even though it is likely picking up the .targets import without problems, it isn't aware of everything that the .targets script needs in order to build your project. This should be very easy to fix. NCrunch has an 'Additional files to include' setting that you can use to tell it about special files that it hasn't been able to identify automatically. Adding the resource directory for postsharp to this setting (at project or solution level) should solve this problem.

The DevArt issue is one that I'm a little less clear on how to fix, though most likely NCrunch is following the same behaviour as your CI environment. My suspicion here is that the DevArt library is dynamically trying to find its license information, and for whatever reason this information is present in your normal development build environment, but it doesn't exist in the workspace that NCrunch is using to build your project. You can easily browse the contents of an NCrunch workspace by right-clicking on a project in the Tests Window and choosing the 'browse to workspace' option. Something that may help with this problem is turning on the 'Copy referenced assemblies to workspace' option for your tests project, as this may copy the DevArt dependencies in automatically. Otherwise, it may be worth looking at adding a custom build step that specifically copies the license file into your output directory (this will probably fix your CI environment too).
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.037 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download