Microsoft Developer Network > Página Inicial dos Fóruns > Windows Azure > Packaging problems: IsolatedCSPack failed
Fazer uma PerguntaFazer uma Pergunta
 

RespondidoPackaging problems: IsolatedCSPack failed

  • segunda-feira, 29 de junho de 2009 11:09jacek_ Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Hello,

    Again the problems with my 30MB library. This time the issue is with packaging. After clicking on 'Publish...' menu option in VS2008 the OutOfMemoryException occurs (show below). Using CSPack.exe tool from command line, however, gives strange output:

    For the command:
       cspack RScriptEngine2\ServiceDefinition.csdef /role:WebRole;RScriptEngine2 /out:REngine.cspkg

    OutOfMemoryException is thrown, whereas for:
       cspack RScriptEngine2\ServiceDefinition.csdef /role:WebRole;RScriptEngine2

    a package ServiceDefinition.cspkg is produced that takes 329 MB ! The same package deployed onto DevelopersFabric takes about 3x30MB = 95MB

      Best regards,
      Jacek


    Error    22    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.PackagingUtilities.CopyStream(Stream sourceStream, Stream targetStream, Int64 bytesToCopy, Int32 bufferSize)
       at MS.Internal.IO.Packaging.SparseMemoryStream.WriteToStream(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)
       at Microsoft.ServiceHosting.Tools.Packaging.ServiceApplicationPackage.CreateServiceApplicationPackage(String serviceModelFileName, String serviceDescriptionFile, Stream output, RSACryptoServiceProvider encrypt, Dictionary`2 namedStreamCollection, String userInfo)
       at Microsoft.ServiceHosting.Tools.MSBuildTasks.CSPack.TryCreatePackage(ServiceModel 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, String developmentSSLCertificateThumbprint, String publishSSLCertificateThumbprint, 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, String developmentSSLCertificateThumbprint, String publishSSLCertificateThumbprint, 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    604    5    RScriptEngine2

Respostas

  • quinta-feira, 2 de julho de 2009 9:21Yi-Lun LuoMSFT, ModeradorMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Respondido
    I see. You've set Copy to Output Directory to Copy if newer. That's why it get copied for multiple times. Since the Build Action is already set to Content, you do not need to set Copy to Output Directory to Copy if newer. Please set it to never.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marcado como Respostajacek_ quinta-feira, 2 de julho de 2009 10:49
    •  

Todas as Respostas

  • segunda-feira, 29 de junho de 2009 14:47Tom ChristianMSFTMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    What does your .csx folder look like?  It is under the project folder that holds your config files.  Under the bin folder.  Do you see that much data in there?
  • segunda-feira, 29 de junho de 2009 16:25jacek_ Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Sorry, I was supposed to put this in the previous post. This question is related to a discussion about including a native library into a project. Please follow this link to get more info:
    http://social.msdn.microsoft.com/Forums/en-US/windowsazure/thread/0f2313f2-9823-4b33-a9ba-30e2b95b5e4f
    • Editadojacek_ segunda-feira, 29 de junho de 2009 16:27
    • Editadojacek_ segunda-feira, 29 de junho de 2009 16:26
    • Editadojacek_ segunda-feira, 29 de junho de 2009 16:26
    •  
  • terça-feira, 30 de junho de 2009 7:36Yi-Lun LuoMSFT, ModeradorMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Hello, will it be possible for you to provide a project? I can't reproduce the problem on my side. The dll is only copied to WebRole, not WebRole/bin.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
  • terça-feira, 30 de junho de 2009 11:56jacek_ Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Sure. Please find this project at: https://wiki.cs.ncl.ac.uk/personal/jacek.cala/Home?action=AttachFile&do=get&target=RScriptEngine2.zip

    I attached a .zip file to the project. Maybe this is the problem?

      Cheers,
      Jacek
  • quarta-feira, 1 de julho de 2009 10:16Yi-Lun LuoMSFT, ModeradorMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    I can't access the site. It requires authentication... Can you please upload the project to SkyDrive?
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
  • quarta-feira, 1 de julho de 2009 11:30jacek_ Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Sorry, I forgot about that.
    I've put it to SkyDrive under my public folder. Please follow this link: http://tinyurl.com/km8n23
  • quinta-feira, 2 de julho de 2009 3:10Yi-Lun LuoMSFT, ModeradorMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Excuse me, but I still cannot access it. 404 not found...
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
  • quinta-feira, 2 de julho de 2009 7:57jacek_ Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Strange, so try one of the following links:

    http://cid-bc38327788ac8b17.skydrive.live.com/self.aspx/.Public/RScriptEngine2.zip

    http://ukfj2a.bay.livefilestore.com/y1psNSqB6oM0KQmEITlgYTLeTfv7c3LFTrPPV6C3Rx0LVFIwu1ZkDMNaXTSnYmosWa-bffH4LNhavReA2qV2f4zfQ/RScriptEngine2.zip?download

      Cheers,
      Jacek
  • quinta-feira, 2 de julho de 2009 9:21Yi-Lun LuoMSFT, ModeradorMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Respondido
    I see. You've set Copy to Output Directory to Copy if newer. That's why it get copied for multiple times. Since the Build Action is already set to Content, you do not need to set Copy to Output Directory to Copy if newer. Please set it to never.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marcado como Respostajacek_ quinta-feira, 2 de julho de 2009 10:49
    •  
  • quinta-feira, 2 de julho de 2009 10:49jacek_ Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Perfect! This was the problem. Actually, I could not find any clear explanation of relation between 'Build Actions' and 'Copy To Output Directory' settings. MSDN help is not very exhaustive, maybe you could point to some good source of info.