将Web项目发布到azure失败:“IsolatedCSPack”任务意外失败

时间:2010-09-01 07:15:37

标签: azure

我有要发布的网络应用程序并上传到windows azure。 我使用Visual Studio 2008。 我点击“发布”,在“发布云服务”窗口中选择“仅创建服务包”,然后单击“确定”。 发布失败,例外是:

错误26“IsolatedCSPack”任务意外失败。 System.OutOfMemoryException:抛出了类型'System.OutOfMemoryException'的异常。 服务器堆栈跟踪:    在System.IO.MemoryStream.set_Capacity(Int32值)    在System.IO.MemoryStream.EnsureCapacity(Int32值)    在System.IO.MemoryStream.Write(Byte []缓冲区,Int32偏移量,Int32计数)    在MS.Internal.IO.Packaging.SparseMemoryStream.CopyMemoryBlocksToStream(Stream targetStream)    在MS.Internal.IO.Packaging.SparseMemoryStream.WriteToStream(Stream stream)    在MS.Internal.IO.Zip.ZipIOFileItemStream.Save()    在MS.Internal.IO.Zip.ZipIOLocalFileBlock.Save()    在MS.Internal.IO.Zip.ZipIOBlockManager.SaveContainer(Boolean closingFlag)    在MS.Internal.IO.Zip.ZipIOBlockManager.SaveStream(ZipIOLocalFileBlock blockRequestingFlush,Boolean closingFlag)    在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(Stream outputStream)    在Microsoft.ServiceHosting.Tools.Packaging.ServiceApplicationPackage.CreateServiceApplicationPackage(String serviceModelFileName,String serviceDescriptionFile,Stream output,IPackageSecurity encrypt,Dictionary`2 namedStreamCollection,String userInfo,EventHandler`1 rolePackagePartAddedHandler)    在Microsoft.ServiceHosting.Tools.Packaging.ServiceApplicationPackage.CreateServiceApplicationPackage(String serviceModelFileName,String serviceDescriptionFile,Stream output,RSACryptoServiceProvider encrypt,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 log,IBuildEngine buildEngine,ITaskHost hostObject,String serviceHostingTasksPath,String output,String serviceDefinitionFile,ITaskItem [] packRoles,Boolean copyOnly,String generateConfigurationFile,Boolean noEncryptPackage,ITaskItem []& copiedFiles,ITaskItem []& outputFiles)    在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 msg,Int32 methodPtr,Boolean fExecuteInContext) 在[0]处重新抛出异常:    在System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg)    在System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,Int32 type)    在Microsoft.CloudExtensions.MSBuildTasks.IsolatedCSPack.RemoteCSPackBridge.Execute(TaskLoggingHelper log,IBuildEngine buildEngine,ITaskHost hostObject,String serviceHostingTasksPath,String output,String serviceDefinitionFile,ITaskItem [] packRoles,Boolean copyOnly,String generateConfigurationFile,Boolean noEncryptPackage,ITaskItem []& copiedFiles,ITaskItem []& outputFiles)    在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

我该如何解决这个问题?

2 个答案:

答案 0 :(得分:2)

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

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

他们将后者改为Never,问题就消失了。

答案 1 :(得分:2)

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