我已经安装了Azure SDK 2.5。当我运行命令时:
"C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.5\bin\cspack.exe" .\ServiceDefinition.csdef "/out:Package.cspkg" 我有一个例外:
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)同时,这个包也可以在其他机器上成功构建。
有没有人遇到过这个问题?
发布于 2015-03-26 07:12:08
这是SDK2.5中为长时间运行的CSPack进程引入的一个错误。在即将发布的2.6版本中会对此进行修复。
发布于 2015-07-19 10:58:55
在我们的案例中,它只发生在一台机器上(WinServer2008R2),我们使用CSPack变通方法就可以自动部署到测试环境中。
解决方法由两个步骤组成:
"$tempPath\AzureProject\obj\Release\WebRoleName“= "$slnRootPath\AzureProject\ServiceDefinition.csdef”/sitePhysicalDirectories:"WebRoleName;Web;$releaseWebAppPath“/out:"$packagePath" $releaseWebAppPath = $cspackPath $cspackPath:”WebRoleName;$releaseWebAppPath“WebRoleName
这将创建一个您应该能够部署的包。
https://stackoverflow.com/questions/28560173
复制相似问题