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

Notification

Icon
Error

Build failure with extern alias
rbirkby
#1 Posted : Tuesday, May 10, 2011 10:51:36 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/10/2011(UTC)
Posts: 4
Location: London-ish

Hi,

When NCrunch attempts to build my NUnit test project, it fails with:

[11:38:38.157-BuildTask-11] Error 'Compilation': Project.Tests: Satisfyr\Satisfyr.NUnit.cs (34): The extern alias 'NUnitAlias' was not specified in a /reference option
Note that csc is called within VS with the following options:

/reference:..\..\lib\nunit.framework.dll /reference:NUnitAlias=..\..\lib\nunit.framework.dll

I don't think this situation is covered by the troubleshooting page: https://www.ncrunch.net/...ng_project-build-issues


Regards,
Richard
Remco
#2 Posted : Tuesday, May 10, 2011 11:47:27 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi Richard -

You appear to be the first lucky person to use NCrunch against a project that uses referenced assembly aliases.

Up until now, I haven't been aware of this MSBuild feature (so it will need to be supported in an coming version of NCrunch)...

Meanwhile, is there a reason you need to alias the NUnit framework assembly? Are you perhaps using two different versions of NUnit?


Cheers,

Remco
rbirkby
#3 Posted : Tuesday, May 10, 2011 11:52:55 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/10/2011(UTC)
Posts: 4
Location: London-ish

Remco;5 wrote:

Meanwhile, is there a reason you need to alias the NUnit framework assembly? Are you perhaps using two different versions of NUnit?


This is just the default Satisfyr library:
http://satisfyr.codeplex.com/
http://satisfyr.codeplex...fyr%2fSatisfyr.NUnit.cs


Richard
Remco
#4 Posted : Tuesday, May 10, 2011 12:11:45 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Thanks - I'll have a look to see what I can do about support for aliases in the next beta release build. I'm unable to try this at the moment, but does your project compile if you remove the 'extern' reference at the top of the Satisfyr source file along with the alias field on your NUnit assembly reference?
Remco
#5 Posted : Tuesday, May 24, 2011 8:53:50 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
The newly released 1.31b adds support for MSBuild reference aliases, so this issue should now be resolved.
MikeUpton
#6 Posted : Wednesday, August 24, 2011 7:38:43 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/24/2011(UTC)
Posts: 4
Location: Cambridge

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
I've just encountered this problem in my build. I'm using NCrunch 1.32.0.0b, and one of my projects reports "The extern alias 'PromptLic' was not specified in a /reference option" in NCrunch's log. This project was working successfully with NCrunch until I needed to add the reference alias.

[edited to add] I just wanted to add my congratulations for creating such an awesome tool!

Regards,
Mike Upton
Remco
#7 Posted : Wednesday, August 24, 2011 8:12:29 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi Mike,

Thanks for checking in! There is a known problem with v1.32b where reference aliases don't seem to work properly for project references (although they have been fixed for static assembly references). A fix for this has been introduced in 1.33b which is pending release very soon.

Is the PromptLic reference in your solution pointing towards a project or an assembly? If it's the later, I'd be interested in checking out your log file to see what's happening (you can submit a bug report containing the log file using the option in the NCrunch menu).

I'm glad you like the tool :)


Cheers,

Remco
MikeUpton
#8 Posted : Thursday, August 25, 2011 8:00:08 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/24/2011(UTC)
Posts: 4
Location: Cambridge

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Hi Remco,

There are two assembly references given that alias. I've submitted a bug report as requested - hope it's helpful!
1 user thanked MikeUpton for this useful post.
Remco on 8/25/2011(UTC)
Remco
#9 Posted : Monday, September 5, 2011 7:41:29 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
For anyone interested, this issue should be fixed in the recently released 1.33b.
MikeUpton
#10 Posted : Wednesday, September 7, 2011 8:46:21 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/24/2011(UTC)
Posts: 4
Location: Cambridge

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
I've just installed NCrunch 1.33b, and I'm afraid that the problem still remains for me. I've submitted another bug report, in case the log file from the latest version is more useful.
Remco
#11 Posted : Wednesday, September 7, 2011 8:59:03 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi Mike -

Thanks! I just saw your bug report go through ... will take a look.
Remco
#12 Posted : Saturday, September 24, 2011 7:54:17 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
After some investigation, it seems that 1.33b has a defect where assembly reference aliases that are used multiple times within the same project can cause builds to fail.

I've introduced a fix for this in 1.34b (released today).
1 user thanked Remco for this useful post.
MikeUpton on 10/6/2011(UTC)
MikeUpton
#13 Posted : Thursday, October 6, 2011 9:10:37 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/24/2011(UTC)
Posts: 4
Location: Cambridge

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Hi Remco,

Just wanted to let you know that I've finally had a chance to install 1.34b, and the problem is fixed for me!

Now to get on with improving my test coverage ;-)

Thanks,

Mike
1 user thanked MikeUpton for this useful post.
Remco on 10/6/2011(UTC)
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.066 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download