首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Azure cspack.exe抛出System.Runtime.Remoting.RemotingException

Azure cspack.exe抛出System.Runtime.Remoting.RemotingException
EN

Stack Overflow用户
提问于 2015-02-17 18:47:01
回答 2查看 398关注 0票数 2

我已经安装了Azure SDK 2.5。当我运行命令时:

代码语言:javascript
复制
"C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.5\bin\cspack.exe" .\ServiceDefinition.csdef "/out:Package.cspkg" 

我有一个例外:

代码语言:javascript
复制
Unhandled Exception: System.Runtime.Remoting.RemotingException: Object '/8ba37d11_3239_4c7c_9f1a_aa967b1dc5e9/eocq0iwbskmwhdjkfth7xtqy_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.ServiceHosting.Tools.Packaging.Program.Main(String[] args)

同时,这个包也可以在其他机器上成功构建。

有没有人遇到过这个问题?

EN

回答 2

Stack Overflow用户

发布于 2015-03-26 07:12:08

这是SDK2.5中为长时间运行的CSPack进程引入的一个错误。在即将发布的2.6版本中会对此进行修复。

票数 0
EN

Stack Overflow用户

发布于 2015-07-19 10:58:55

在我们的案例中,它只发生在一台机器上(WinServer2008R2),我们使用CSPack变通方法就可以自动部署到测试环境中。

解决方法由两个步骤组成:

  1. MSBuild失败,但是它在创建包的最后一步失败,所以所有应该打包到包中的文件都手动放在folder "AzureProject\obj\Release\WebRoleName".
  2. Run CSPack中:

"$tempPath\AzureProject\obj\Release\WebRoleName“= "$slnRootPath\AzureProject\ServiceDefinition.csdef”/sitePhysicalDirectories:"WebRoleName;Web;$releaseWebAppPath“/out:"$packagePath" $releaseWebAppPath = $cspackPath $cspackPath:”WebRoleName;$releaseWebAppPath“WebRoleName

这将创建一个您应该能够部署的包。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28560173

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档