2

ビルドをパッケージ化して Azure Cloud Services にデプロイする PowerShell スクリプトがあります。このスクリプトは SDK 2.3 では問題なく実行されていましたが、SDK 2.5 にアップグレードすると、プロジェクトのビルド中に次のエラーが発生し始めました。

CorePublish:
  CorePublish: PackageWebRole = True
  Publishing starting...
  RolePlugins       is 
  Importedmodules is 
  Publishing to 'bin\Release\app.publish\'
  Creating directory "bin\Release\app.publish\".
  TargetServiceDefinition is bin\Release\ServiceDefinition.csdef
  TargetServiceConfiguration is bin\Release\ServiceConfiguration.cscfg
  Roles is E:\Preview\temp\Azure\obj\Release\App\
error MSB4018: The "CSPack" task failed unexpectedly. 
System.Runtime.Remoting.RemotingException: Object '/54628d54_42c6_4d39_bc4c_958b6bfaeb90/6y8efa6v6y8omskqeetyix8g_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.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() 

VS2013 の MSBuild を使用して Windows Server 2008 R2 で実行されており、MSBuild は次のパラメーターのように (powershell から) 実行されます。

& $msBuildPath "$tempPath\Azure\Azure.ccproj" /p:TargetProfile=Cloud /p:Configuration=Release /target:publish /flp:"Verbosity=quiet;logfile=E:\AzurePreview\msbuild.log"
I could not find anything connected to this issue.

一般的に、powershell、VS、またはAzureに接続されている可能性のあるVS、SDK、およびツールのすべての痕跡を削除しようとし、必要な部品を再度インストールしましたが、何も役に立ちませんでした.

この問題の解決を手伝っていただけますか?

4

1 に答える 1

0

この問題について Microsoft サポートに相談したところ、CSPack コマンド ライン ツールを使用してプロジェクトをパッケージ化できたので、これを回避策として使用しています。

編集: この問題は Azure SDK 2.7 で修正されたようです

于 2015-01-13T14:15:06.677 に答える