2016-10-19 150 views
6

我得到的所有下面的错误建立包括现在服务织物包:FabActUtil.exe退出代码为-1

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. 

运行于服务织物5.2.207,SDK 2.2.207

什么是代码为FabActUtil.exe -1,有没有什么办法得到更好的错误输出在这个事件?

+0

你可以添加SDK版本的问题? – LoekD

+0

Did,5.2&2.2,我正在将我的解决方案升级到5.3 - 2.3现在 – Dagrooms

回答

2

运行从错误信息的命令的Visual Studio之外给堆栈跟踪以下消息:

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) 

这是由于ApplicationManifest.xml具有的默认服务中的一个重复的定义。

感谢amanbha:https://github.com/amanbha

+0

此外,升级到Service Fabric 5.3修复了FabActUtil在复制文件和删除自身时跳过自身的许多问题。 – Dagrooms

0

如果您遇到FabActUtil.exe的错误使用服务织物SDK。 如果MS Build打算使用FabActUtil.exe和目标文件构建服务结构参与者,并且出现FabActUtil.exe退出并出现代码-1的错误。错误可以通过更改目标文件来解决。最简单的方法是使用旧的Service Fabric SDK的目标文件。

如果您的解决方案目前运行正常,我认为您的解决方案根目录的packages文件夹中有一些Microsoft.ServiceFabric.Actors软件包。

如果您没有任何软件包正常运行,请使用this target file of Microsoft.ServiceFabric.Actors.2.2.207。该文件具有differences,该文件在复制并运行的位置发生错误,然后删除FubActUtil.exe。

目标文件是:

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

,并独立于版本。

+0

很久以前我已经解决了这个问题,但感谢您的帮助。 – Dagrooms