FabActUtil.exe output with code -1

I get the following error in all builds, including Service Fabric packages:

build\Microsoft.ServiceFabric.Actors.targets(34,5): error MSB3073: The command ""\Build\x64\Debug\\FabActUtil.exe" /app:"\ApplicationPackageRoot" /spp:"PackageRoot" /t:manifest /ap:"Project" /sp:"Project1" /in:"..\Build\x64\Debug\\Project1.Exe" /local5nodeappparamfile:"ApplicationParameters\Local.5Node.xml" /local1nodeappparamfile:"ApplicationParameters\Local.1Node.xml" " exited with code -1. 

Work on service fabric 5.2.207, SDK 2.2.207

What is the -1 code for FabActUtil.exe and is there a way to get the best error output in this event?

+6
source share
2 answers

Running the command from the error message outside of Visual Studio gave the following message with a stack trace:

 System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Microsoft.ServiceFabric.Actors.Generator.ManifestGenerator.Context.LoadExistingContents() at Microsoft.ServiceFabric.Actors.Generator.ManifestGenerator.Generate(Arguments arguments) at FabActUtil.Tool.GenerateOutput(ToolContext context) at FabActUtil.Program.Main(String[] args) 

This is because ApplicationManifest.xml has a redefinition for one of the default services.

Thanks amanbha: https://github.com/amanbha

+2
source

If you encounter a FabActUtil.exe error using the Service Fabric SDK. In the case when MS Build intends to create participants in the service structure using FabActUtil.exe with the target file, an error occurred from which FabActUtil.exe exited with code -1. The error can be fixed by changing the target file. The easiest approach is to use the target file of the old Service Fabric SDK.

If your solution is working fine so far, I think you have the Microsoft.ServiceFabric.Actors package in the package folder of your solution root.

If you do not have the package working properly, use this target Microsoft.ServiceFabric.Actors.2.2.207 file . This file has differences with the file that occurs at the points that copy and run and then delete FubActUtil.exe.

Target file:

 %solution root%\packages\Microsoft.ServiceFabric.Actors.%version%\build\Microsoft.ServiceFabric.Actors.targets 

and regardless of version.

0
source

Source: https://habr.com/ru/post/1011483/


All Articles