gpt4 book ai didi

powershell - 使用 MSBuild 打包云服务项目时出现 CSPack RemotingException

转载 作者:行者123 更新时间:2023-12-03 00:18:16 27 4
gpt4 key购买 nike

我有一个 powershell 脚本,用于打包我们的构建并将其部署到 Azure 云服务。该脚本在 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()

它在 Windows Server 2008 R2 上运行,使用 VS2013 中的 MSBuild,并且 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 和工具的痕迹,并再次安装必要的部件,但没有任何帮助。

您能帮我解决这个问题吗?

最佳答案

与 Microsoft 支持人员讨论此问题后,我能够使用 CSPack 命令行工具打包该项目,因此我将其用作解决方法。

编辑:此问题似乎已在 Azure SDK 2.7 中修复

关于powershell - 使用 MSBuild 打包云服务项目时出现 CSPack RemotingException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27839669/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com