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

Notification

Icon
Error

NCrunch fails to build ETW project
jbattermann
#1 Posted : Wednesday, July 16, 2014 10:46:35 PM(UTC)
Rank: Member

Groups: Registered
Joined: 7/16/2014(UTC)
Posts: 10
Location: Germany

Was thanked: 1 time(s) in 1 post(s)
Good evening,

I wanted to give the latest version of NCrunch a try against one of my current projects and this project utilizes Microsoft's Application Insights and the later is using ETW under the hood.. and that in turn adds a new build target/post-build process to the project file(s) it is referenced in.. and even though regular building, manual unit testing etc all work fine, NCrunch fails to build these projects due to that post-build step with a rather strange error (exit code is 9930 or 9309 as far as I remember).

Basically you can reproduce this rather easily by creating a new solution/project, reference the MS EventSource NuGet package above, create a second Unit Test project that references the first project and try to run NCrunch on that solution.


What could I do in that case to use NCrunch nevertheless?


Cheers and thanks,
-Joerg
Remco
#2 Posted : Wednesday, July 16, 2014 11:42:59 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,964

Thanks: 929 times
Was thanked: 1255 time(s) in 1168 post(s)
Hi Joerg,

Thanks for sharing this issue.

Do you notice any difference in behaviour if you set NCrunch into compatibility mode for this solution?


Cheers,

Remco
jbattermann
#3 Posted : Thursday, July 17, 2014 8:14:56 PM(UTC)
Rank: Member

Groups: Registered
Joined: 7/16/2014(UTC)
Posts: 10
Location: Germany

Was thanked: 1 time(s) in 1 post(s)
Good evening Remco,

I just set the options according to the compatibility mode instructions and still get the same build error. The output is the following:

NCrunch: If you are experiencing problems in getting this project to build, have a look at http://www.ncrunch.net/d...ng_project-build-issues
..\packages\Microsoft.Diagnostics.Tracing.EventRegister.1.0.24\build\Microsoft.Diagnostics.Tracing.EventRegister.targets (132): The command ""C:\Users\joerg\AppData\Local\NCrunch\9148\18\MyProject\packages\Microsoft.Diagnostics.Tracing.EventRegister.1.0.24\build\eventRegister.exe" -DumpRegDlls @"C:\Users\joerg\AppData\Local\NCrunch\9148\18\MyProject\MyProject.Backend.Logging\bin\Debug\MyProject.Backend.Logging.eventRegister.rsp" "C:\Users\joerg\AppData\Local\NCrunch\9148\18\MyProject\MyProject.Backend.Logging\bin\Debug\MyProject.Backend.Logging.dll" " exited with code 9009.


I've made a simple repro solution & uploaded it at: https://db.tt/XxnItRSN


Hope that helps!
-Joerg
Remco
#4 Posted : Thursday, July 17, 2014 11:03:02 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,964

Thanks: 929 times
Was thanked: 1255 time(s) in 1168 post(s)
Hi Joerg,

Thanks for the code sample. This was a huge help.

I was able to make this project build by adding the following to the 'Additional files to include' project-level configuration setting for the failing project:

..\packages\Microsoft.Diagnostics.Tracing.EventRegister.1.0.26\build\**.*

It seems that the project has additional implicit dependencies that NCrunch wasn't able to automatically identify.

I hope this does the trick for you.


Cheers,

Remco
jbattermann
#5 Posted : Saturday, July 19, 2014 6:56:55 PM(UTC)
Rank: Member

Groups: Registered
Joined: 7/16/2014(UTC)
Posts: 10
Location: Germany

Was thanked: 1 time(s) in 1 post(s)
That worked, thanks!

Is there any chance this kind of project(s) might be supported natively in the future? basically whenever such references change, I'll have to manually adjust the paths which is pretty much time wasted / potentially forgotten etc..


Cheers,
-Jörg
Remco
#6 Posted : Saturday, July 19, 2014 11:07:18 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,964

Thanks: 929 times
Was thanked: 1255 time(s) in 1168 post(s)
Great to hear!

It's difficult for NCrunch to automatically resolve all dependencies of packages like this. The problem is that the dependencies aren't always referenced in a manner that can be consistently analysed. The 'Additional files to include' is the default way to solve problems with implicit references such as this.

NCrunch does actually support more complex expressions inside the additional files to include. For example, you should also be able to specify: ..\packages\Microsoft.Diagnostics.Tracing.EventRegister*\build\**.*

However, the validation on the configuration control seems to throw this out. To make use of it, you'll need to edit the .v2.ncrunchproject file directly and specify the config setting yourself. I'll see about getting the validation fixed.


Cheers,

Remco
jbattermann
#7 Posted : Sunday, July 20, 2014 1:30:32 PM(UTC)
Rank: Member

Groups: Registered
Joined: 7/16/2014(UTC)
Posts: 10
Location: Germany

Was thanked: 1 time(s) in 1 post(s)
Remco;6166 wrote:
Great to hear!

NCrunch does actually support more complex expressions inside the additional files to include. For example, you should also be able to specify: ..\packages\Microsoft.Diagnostics.Tracing.EventRegister*\build\**.*


Ahhh with that I can be perfectly happy with :) If you ever come by that control and do manage to let it keep these (now manually entered) expressions, it would be highly appreciated.

Nevertheless I did purchase a license for myself and really, really like it.

Thanks Remco & have a great Sunday!
-Jörg
1 user thanked jbattermann for this useful post.
Remco on 7/20/2014(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.044 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download