1

Bir powershell dosya engellemesi nedeniyle mvc6 uygulamamı yayınlamaya çalışırken ciddi bir keder yaşıyorum. Powershell'i yönetici olarak çalıştırdım ve yürütme politikasını ayarladım. Ancak, yayın sürecine vs2015'te herhangi bir etkisi yok gibi görünüyor. Dahası, NPM'deki Unblock-File cmdlet'ini çalıştırmak için boşuna bile çalıştım.vs2015 invokepowershell hatası nedeniyle mvc6 uygulamasını yayınlayamıyor

Bunun için nasıl çalışabileceğimiz hakkında herhangi bir fikri olan var mı? Tam hata aşağıdadır: Ben yerel kök benim bütün proje klasörü kopyalayarak yayınlamak için başardı

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. 
+0

VS'yi yönetici olarak çalıştırmayı deneyin. – dburner

+0

Üzgünüm, denediğim ilk şeylerden biri olduğunu da söylemeliydi. – xxdefaultxx

cevap

0

. Bir yerde klasör izinleri sorunu olmalı ...

2

Başka bir yayın profili oluşturun ve tekrar deneyin. Benim için bu çalışır.

İlgili konular