开发者

Publishing web project to azure failed: The "IsolatedCSPack" task failed unexpectedly

开发者 https://www.devze.com 2023-01-14 03:50 出处:网络
I have web application that I want to publish and upload to windows azure. I use Visual Studio 2008. I click on \"publish\", chose \"Create Service Package Only\" in \"Publish Cloud Service\" window,

I have web application that I want to publish and upload to windows azure. I use Visual Studio 2008. I click on "publish", chose "Create Service Package Only" in "Publish Cloud Service" window, andclick on "OK". The publish failed tnd the exception is:

Error 26 The "IsolatedCSPack" task failed unexpectedly. System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. Server stack trace: at System.IO.MemoryStream.set_Capacity(Int32 value) at System.IO.MemoryStream.EnsureCapacity(Int32 value) at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count) at MS.Internal.IO.Packaging.SparseMemoryStream.CopyMemoryBlocksToStream(Stream targetStream) at MS.Internal.IO.Packaging.SparseMemoryStream.Write开发者_运维技巧ToStream(Stream stream) at MS.Internal.IO.Zip.ZipIOFileItemStream.Save() at MS.Internal.IO.Zip.ZipIOLocalFileBlock.Save() at MS.Internal.IO.Zip.ZipIOBlockManager.SaveContainer(Boolean closingFlag) at MS.Internal.IO.Zip.ZipIOBlockManager.SaveStream(ZipIOLocalFileBlock blockRequestingFlush, Boolean closingFlag) at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Dispose(Boolean disposing) at System.IO.Stream.Close() at System.IO.Packaging.PackagePart.Close() at System.IO.Packaging.Package.DoClose(PackagePart p) at System.IO.Packaging.Package.DoOperationOnEachPart(PartOperation operation) at System.IO.Packaging.Package.System.IDisposable.Dispose() at Microsoft.ServiceHosting.Tools.Packaging.PackageCreator.CreateRolePackages(ModelProcessor modelProcessor, PackageManifest applicationManifest, Package applicationPackage) at Microsoft.ServiceHosting.Tools.Packaging.PackageCreator.CreatePackage(Stream outputStream) 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.Packaging.ServiceApplicationPackage.CreateServiceApplicationPackage(String serviceModelFileName, String serviceDescriptionFile, Stream output, RSACryptoServiceProvider encrypt, Dictionary`2 namedStreamCollection, String userInfo, EventHandler`1 rolePackagePartAddedHandler) at Microsoft.ServiceHosting.Tools.MSBuildTasks.CSPack.TryCreatePackage(ServiceDefinitionModel sm) at Microsoft.ServiceHosting.Tools.MSBuildTasks.CSPack.Execute() at 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) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at 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) at Microsoft.CloudExtensions.MSBuildTasks.IsolatedCSPack.Execute() at 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

How can i resolve this?


Happened to me before... try restarting the computer (I know... it's a bit "Technical Support" advice - but it worked for me!


This looks like the same problem someone else posted about on the MSDN Azure forum. Their problem was that a resource was being copied into the project with:

  • build action = Content
  • Copy to Output Directory = Copy if Newer.

They changed the latter to Never and the problem went away.

0

精彩评论

暂无评论...
验证码 换一张
取 消