Build/Test Issues

Problem building a Service Fabric Actor project

Started by AliSanjabi on 9,821 views

I'm having trouble building a service fabric actor project. Looks like the problem is with FabActUtil trying to update the manifest file. Has anyone else run into this problem and have a solution?

This is the error I'm getting from NCrunch (after including the package):

..\packages\Microsoft.ServiceFabric.Actors.2.1.150\build\Microsoft.ServiceFabric.Actors.targets (25, 5): The command ""R:\NCrunch\6048\14\PDRelativity_ServiceAPIManager\bin\x64\Debug\\FabActUtil.exe" /spp:"PackageRoot" /t:manifest /sp:"PDRelativity_ServiceAPIManager" /in:"bin\x64\Debug\\PDRelativity_ServiceAPIManager.Exe" " exited with code -1.


Thanks
-Ali
Hi Ali,

Thanks for posting!

Is this build step needed in order for your tests to be run? An option may be to suppress it with an override if it isn't.

I would suggest taking a look at the contents of the workspace NCrunch has created to build the project. Right click on the failed project in your Tests Window, then choose Advanced->Browse to workspace. Take a look at this workspace - it should be a near exact copy of the project as it exists in your foreground solution. Most importantly, the files needed for this particular build step will need to exist in the workspace in their expected paths. Does everything look OK to you? If there is a file missing, you may need to include it manually using the 'Additional files to include' configuration setting.
Including all dependencies fixed the problem temporarily. I will try the override as soon as I get a chance, that seems to be a better way to go.

Thanks.
Quick update, your suggestion for excluding that build target worked great. Thanks again.
Hi, I am very new to NCrunch and having exactly the same problem.

Could you please help explain in detail what exactly is the cause and what are the steps to exclude the build target?

Thanks
Hi, thanks for posting!

When NCrunch executes a build, it sets a property '$(NCrunch)' equal to '1'.

It's possible to use this property to change the behaviour of your build. In this case, I'd expect we'll want to use it to disable a build import. I haven't seen your project file so I'm not sure exactly how this package is hooked into it, but most likely you'll find something like:

<Import Project="..\packages\Microsoft.ServiceFabric.Actors.2.1.150\build\Microsoft.ServiceFabric.Actors.targets" />

You can disable this import for NCrunch builds as such:

<Import Project="..\packages\Microsoft.ServiceFabric.Actors.2.1.150\build\Microsoft.ServiceFabric.Actors.targets" Condition="'$(NCrunch)' != '1'" />

You can also use the condition on properties and other build steps.

Post a reply

Log in to reply.