【问题标题】:Publishing web project to azure failed: The "IsolatedCSPack" task failed unexpectedly将 Web 项目发布到 azure 失败:“IsolatedCSPack”任务意外失败
【发布时间】:2011-04-06 15:47:51
【问题描述】:

我有想要发布并上传到 Windows azure 的 Web 应用程序。 我使用 Visual Studio 2008。 我点击“发布”,在“发布云服务”窗口中选择“仅创建服务包”,然后点击“确定”。 发布失败,异常为:

错误 26 “IsolatedCSPack”任务意外失败。 System.OutOfMemoryException:引发了“System.OutOfMemoryException”类型的异常。 服务器堆栈跟踪: 在 System.IO.MemoryStream.set_Capacity(Int32 值) 在 System.IO.MemoryStream.EnsureCapacity(Int32 值) 在 System.IO.MemoryStream.Write(字节 [] 缓冲区,Int32 偏移量,Int32 计数) 在 MS.Internal.IO.Packaging.SparseMemoryStream.CopyMemoryBlocksToStream(流目标流) 在 MS.Internal.IO.Packaging.SparseMemoryStream.WriteToStream(流流) 在 MS.Internal.IO.Zip.ZipIOFileItemStream.Save() 在 MS.Internal.IO.Zip.ZipIOLocalFileBlock.Save() 在 MS.Internal.IO.Zip.ZipIOBlockManager.SaveContainer(布尔关闭标志) 在 MS.Internal.IO.Zip.ZipIOBlockManager.SaveStream(ZipIOLocalFileBlock blockRequestingFlush,布尔型关闭标志) 在 MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Dispose(布尔处理) 在 System.IO.Stream.Close() 在 System.IO.Packaging.PackagePart.Close() 在 System.IO.Packaging.Package.DoClose(PackagePart p) 在 System.IO.Packaging.Package.DoOperationOnEachPart(PartOperation 操作) 在 System.IO.Packaging.Package.System.IDisposable.Dispose() 在 Microsoft.ServiceHosting.Tools.Packaging.PackageCreator.CreateRolePackages(ModelProcessor modelProcessor,PackageManifest applicationManifest,Package applicationPackage) 在 Microsoft.ServiceHosting.Tools.Packaging.PackageCreator.CreatePackage(流输出流) 在 Microsoft.ServiceHosting.Tools.Packaging.ServiceApplicationPackage.CreateServiceApplicationPackage(字符串 serviceModelFileName、字符串 serviceDescriptionFile、流输出、IPackageSecurity 加密、Dictionary`2 namedStreamCollection、String userInfo、EventHandler`1 rolePackagePartAddedHandler) 在 Microsoft.ServiceHosting.Tools.Packaging.ServiceApplicationPackage.CreateServiceApplicationPackage(字符串 serviceModelFileName、字符串 serviceDescriptionFile、流输出、RSACryptoServiceProvider 加密、Dictionary`2 namedStreamCollection、String userInfo、EventHandler`1 rolePackagePartAddedHandler) 在 Microsoft.ServiceHosting.Tools.MSBuildTasks.CSPack.TryCreatePackage(ServiceDefinitionModel sm) 在 Microsoft.ServiceHosting.Tools.MSBuildTasks.CSPack.Execute() 在 Microsoft.CloudExtensions.MSBuildTasks.IsolatedCSPack.RemoteCSPackBridge.Execute(TaskLoggingHelper 日志,IBuildEngine buildEngine,ITaskHost hostObject,字符串 serviceHostingTasksPath,字符串输出,字符串 serviceDefinitionFile,ITaskItem[] packRoles,布尔 copyOnly,字符串 generateConfigurationFile,布尔 noEncryptPackage,ITaskItem[]&copyFiles , ITaskItem[]& 输出文件) 在 System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) 在 System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) 在 System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage 消息,Int32 methodPtr,布尔 fExecuteInContext) 在 [0] 处重新抛出异常: 在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg) 在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,Int32 类型) 在 Microsoft.CloudExtensions.MSBuildTasks.IsolatedCSPack.RemoteCSPackBridge.Execute(TaskLoggingHelper 日志,IBuildEngine buildEngine,ITaskHost hostObject,字符串 serviceHostingTasksPath,字符串输出,字符串 serviceDefinitionFile,ITaskItem[] packRoles,布尔 copyOnly,字符串 generateConfigurationFile,布尔 noEncryptPackage,ITaskItem[]&copyFiles , ITaskItem[]& 输出文件) 在 Microsoft.CloudExtensions.MSBuildTasks.IsolatedCSPack.Execute() 在 Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult) C:\Program Files\MSBuild\Microsoft\Cloud Service\v1.0\Microsoft.CloudService.targets 865 5 Starlims.SDMS.Azure

我该如何解决这个问题?

【问题讨论】:

    标签: azure


    【解决方案1】:

    以前发生在我身上...尝试重新启动计算机(我知道...这有点“技术支持”的建议 - 但它对我有用!

    【讨论】:

      【解决方案2】:

      这看起来与 MSDN Azure 论坛上的 someone else posted about 相同的问题。他们的问题是资源被复制到项目中:

      • 构建操作 = 内容
      • 复制到输出目录 = 如果更新则复制。

      他们将后者更改为从不,问题就消失了。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2021-12-04
        • 2018-01-02
        • 2017-09-20
        • 2013-05-25
        • 2017-07-23
        • 2016-06-22
        • 2017-07-23
        相关资源
        最近更新 更多