2016-10-19 148 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