2015-01-08 77 views
2

我有一個PowerShell腳本打包了我們的構建並將它們部署到Azure雲服務。該腳本沒有任何問題正在運行與SDK 2.3,但是,當我們升級到SDK 2.5,我們開始收到以下錯誤,而建設項目:使用MSBuild打包雲服務項目時出現CSPack RemotingException

CorePublish: 
    CorePublish: PackageWebRole = True 
    Publishing starting... 
    RolePlugins  is 
    Importedmodules is 
    Publishing to 'bin\Release\app.publish\' 
    Creating directory "bin\Release\app.publish\". 
    TargetServiceDefinition is bin\Release\ServiceDefinition.csdef 
    TargetServiceConfiguration is bin\Release\ServiceConfiguration.cscfg 
    Roles is E:\Preview\temp\Azure\obj\Release\App\ 
error MSB4018: The "CSPack" task failed unexpectedly. 
System.Runtime.Remoting.RemotingException: Object '/54628d54_42c6_4d39_bc4c_958b6bfaeb90/6y8efa6v6y8omskqeetyix8g_4.rem' has been disconnected or does not exist at the server. 
    at System.IO.FileStream.get_CanRead() 
    at MS.Internal.IO.Zip.ZipIOLocalFileBlock.CheckFileAccessParameter(Stream stream, FileAccess access) 
    at MS.Internal.IO.Zip.ZipIOLocalFileBlock.GetStream(FileMode mode, FileAccess access) 
    at System.IO.Packaging.ZipPackagePart.GetStreamCore(FileMode mode, FileAccess access) 
    at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access) 
    at Microsoft.ServiceHosting.Tools.Packaging.Utils.CopyFullStreamToPart(Stream source, PackagePart part, PackageManifest manifest) 
    at Microsoft.ServiceHosting.Tools.Packaging.PackageCreator.CreateRolePackages(ModelProcessor modelProcessor, PackageManifest applicationManifest, Package applicationPackage) 
    at Microsoft.ServiceHosting.Tools.Packaging.PackageCreator.CreatePackage(Stream outputStream, Action`1 postProcess, PackageRestrictions restrictions) 
    at Microsoft.ServiceHosting.Tools.Packaging.ServiceApplicationPackage.CreateServiceApplicationPackage(String serviceModelFileName, String serviceDescriptionFile, Stream output, IPackageSecurity encrypt, Dictionary`2 namedStreamCollection, String userInfo, EventHandler`1 rolePackagePartAddedHandler) 
    at Microsoft.ServiceHosting.Tools.MSBuildTasks.PackageCreator.CreateServiceApplicationPackage(String serviceRdFilePath, String processedServiceDefinitionFile, FileStream packageStream, Dictionary`2 namedStreams, Dictionary`2 rolesDictionary) 
    at Microsoft.ServiceHosting.Tools.MSBuildTasks.PackageCreator.CreateServiceApplicationPackage(String serviceRdFilePath, String processedServiceDefinitionFile, FileStream packageStream, Dictionary`2 namedStreams, Dictionary`2 rolesDictionary) 
    at Microsoft.ServiceHosting.Tools.MSBuildTasks.CSPack.TryCreatePackage(ServiceDefinitionModel sm) 
    at Microsoft.ServiceHosting.Tools.MSBuildTasks.CSPack.Execute() 
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 
    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() 

它在Windows Server 2008 R2中運行,使用的MSBuild從VS2013和該MSBuild的是飛奔這樣的參數(從PowerShell中):

& $msBuildPath "$tempPath\Azure\Azure.ccproj" /p:TargetProfile=Cloud /p:Configuration=Release /target:publish /flp:"Verbosity=quiet;logfile=E:\AzurePreview\msbuild.log" 
I could not find anything connected to this issue. 

我甚至試圖刪除可能連接到PowerShell中,VS或Azure在一般的VS,SDK和工具的所有痕跡,再安裝必要的零件反駁沒有任何幫助。

你能幫我解決這個問題嗎?

回答

0

在與Microsoft支持人員討論此問題後,我能夠使用CSPack命令行工具打包項目,因此我將此用作解決方法。

編輯: 這個問題似乎固定在Azure的SDK 2.7

相關問題