首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >由于vs2015中的调用程序外壳失败,无法发布mvc6应用程序

由于vs2015中的调用程序外壳失败,无法发布mvc6应用程序
EN

Stack Overflow用户
提问于 2016-03-23 17:45:30
回答 2查看 691关注 0票数 2

由于powershell文件阻塞,我在尝试发布我的mvc6应用程序时遇到了一些严重的问题。我以管理员身份运行powershell,并调整了执行策略。但它似乎对vs2015中的发布过程没有任何影响。此外,我甚至尝试在NPM中运行Unblock-File cmdlet,但徒劳无功。

有没有人知道我怎么才能让它工作?完整错误如下:

代码语言:javascript
复制
    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(386,5): Error MSB4018: The "InvokePowerShell" task failed unexpectedly.
System.Management.Automation.PSSecurityException: AuthorizationManager check failed. ---> System.Management.Automation.Host.HostException: A command that prompts the user failed because the host program or the command type does not support user interaction. The host was attempting to request confirmation with the following message: Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning message. Do you want to run G:\_PIPELINE_MANAGEMENT\_SOURCE\_MANAGEMENT\_2016\ProjMgr\src\ProjMgr\Properties\PublishProfiles\ProjMgr-publish.ps1?
   at System.Management.Automation.Internal.Host.InternalHostUserInterface.ThrowPromptNotInteractive(String promptMessage)
   at System.Management.Automation.Internal.Host.InternalHostUserInterface.PromptForChoice(String caption, String message, Collection`1 choices, Int32 defaultChoice)
   at Microsoft.PowerShell.PSAuthorizationManager.RemoteFilePrompt(String path, PSHost host)
   at Microsoft.PowerShell.PSAuthorizationManager.CheckPolicy(ExternalScriptInfo script, PSHost host, Exception& reason)
   at Microsoft.PowerShell.PSAuthorizationManager.ShouldRun(CommandInfo commandInfo, CommandOrigin origin, PSHost host, Exception& reason)
   at System.Management.Automation.AuthorizationManager.ShouldRunInternal(CommandInfo commandInfo, CommandOrigin origin, PSHost host)
   --- End of inner exception stack trace ---
   at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
   at System.Management.Automation.PowerShell.EndInvoke(IAsyncResult asyncResult)
   at Microsoft.Web.Publishing.Tasks.InvokePowerShell.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
                Done executing task "InvokePowerShell" -- FAILED.
                Done building target "PowerShellPublish" in project "ProjMgr.xproj" -- FAILED.
        Done building project "ProjMgr.xproj" -- FAILED.
        Done executing task "MSBuild" -- FAILED.
        Done building target "FileSystemPublish" in project "ProjMgr.xproj" -- FAILED.
Done building project "ProjMgr.xproj" -- FAILED.

2>Publish failed due to build errors. Check the error list for more details.
EN

回答 2

Stack Overflow用户

发布于 2016-11-06 17:48:33

创建另一个发布配置文件,然后重试。对我来说,这是可行的。

票数 3
EN

Stack Overflow用户

发布于 2016-03-23 18:18:58

我设法通过将我的整个项目文件夹复制到本地目录的根目录来发布它。一定是某处的文件夹权限问题...

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36174633

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档