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

Notification

Icon
Error

'System.Xaml.XamlObjectWriterException' When using Microsoft Workflow Foundation
Captain_Dash
#1 Posted : Friday, August 10, 2018 10:54:34 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/10/2018(UTC)
Posts: 2
Location: Germany

Hi,

When I am using Microsoft workflow Foundation ncrunch is unable to build projects and return the following message:

Quote:
C:\windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Xaml.targets: Extension 'Microsoft.Activities.Build.Validation.ValidationBuildExtension' threw an exception of type 'System.Xaml.XamlObjectWriterException' : 'The invocation of the constructor on type 'type' that matches the specified binding constraints threw an exception.'.


To reproduce it, you need 3 projects in a Solution:

Solution
---ActivityLib (contains Xaml activities)
---Consumer (also contains xaml activities that uses activity from ActivityLib)
---TestProject (Contains a test which test the activity)

When all references are equal NCrunch is able to build and execute the test, but as soon as ActivityLib uses a additional reference to any dll or nuget package which Consumer does not have. NCrunch is unable to build Consumer project.

I tested the same project with the test runner from resharper and they were able to build the project and to run the tests. So I guess it a kind of settings maybe to get it running? Does anybody can advice me to get NCrunch building the project.

Best regards.

Remco
#2 Posted : Friday, August 10, 2018 11:31:54 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for sharing this issue. Does turning on compatibility mode for this solution make any difference here? I'm particularly interested in whether the 'Copy referenced assemblies to workspace' setting has any effect.
Captain_Dash
#3 Posted : Monday, August 13, 2018 7:14:32 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/10/2018(UTC)
Posts: 2
Location: Germany

Hi,

I found a solution for this problem, I did not tried your suggestion, yet. But what resolved my problem was to change the build architecture of the dependend project in my scenario (Activity lib) to the same build architecture x64. I guess the default value here is x86? I projects are all build in x64 so this seems to cause the problem.

Best regards
Remco
#4 Posted : Monday, August 13, 2018 9:16:55 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
I'm impressed you managed to figure this out from such an obscure error message. It's true that the NCrunch build system defaults to x86. This is due to historical reasons (MSBuild used to only run under x86, and weird things would happen otherwise). I guess there is here a build task that does not like x86. NCrunch itself has no issues with x64 being used in the build system, so as long as MSBuild and its tasks don't complain, everything should be fine here now.
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.029 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download