msbuild调用Windows 7下的powershell脚本获取签名错误
发布时间:2021-03-05 17:22:45 所属栏目:Windows 来源:网络整理
导读:我们有一个powerhell构建脚本,可以调用其他脚本,这些脚本在 Windows 7 64位下给我带来麻烦.它在XP下工作正常.我已经运行set-executionpolicy到RemoteSigned(并尝试使用Bypass和Unrestricted).我可以从错误信息中拉出命令行,并自行运行,并且运行正常. 构建错
我们有一个powerhell构建脚本,可以调用其他脚本,这些脚本在 Windows 7 64位下给我带来麻烦.它在XP下工作正常.我已经运行set-executionpolicy到RemoteSigned(并尝试使用Bypass和Unrestricted).我可以从错误信息中拉出命令行,并自行运行,并且运行正常. 构建错误在这里看起来很糟糕但是我还包括他们的完整性. Project "C:dev7SourceDashPortalDashboardGeneratorDashboardGenerator.csproj" (2) is building "C:dev7SourceDashPo rtalDashboardControllerDashboardController.csproj" (15) on node 0 (default targets). File C:Userspmckinney.NADocumentsWindowsPowerShellprofile.ps1 cannot be lo aded because the execution of scripts is disabled on this system. Please see "g et-help about_signing" for more details. At line:1 char:2 + . <<<< 'C:Userspmckinney.NADocumentsWindowsPowerShellprofile.ps1' + CategoryInfo : NotSpecified: (:) [],PSSecurityException + FullyQualifiedErrorId : RuntimeException File C:dev7SourceDashPortalDashboardController......BuildcreateReportI nstallScript.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details. At line:1 char:87 + C:dev7SourceDashPortalDashboardController......BuildcreateReportInst allScript <<<< -t C:dev7SourceDashPortalDashboardController......Sourc eDashPortalDashboardReportsReportSetupScriptTemplate.sql -l C:dev7SourceD ashPortalDashboardController......SourceDashPortalDashboardReportsRepor tSetupReportList.xml -c C:dev7SourceDashPortalDashboardController...... SourceDashPortalConfig + CategoryInfo : NotSpecified: (:) [],PSSecurityException + FullyQualifiedErrorId : RuntimeException C:dev7SourceDashPortalDashboardControllerDashboardController.csproj(265,5): error MSB3073: The command "powershell C:dev7SourceDashPortalDashboardController......BuildcreateReportInstallScript -t C:dev7SourceDashPortalDa shboardController......SourceDashPortalDashboardReportsReportSetupScriptTemplate.sql -l C:dev7SourceDashPorta lDashboardController......SourceDashPortalDashboardReportsReportSetupReportList.xml -c C:dev7SourceDashPorta lDashboardController......SourceDashPortalConfig" exited with code 1.只是猜测:您在x64 PowerShell中运行了Set-ExecutionPolicy,构建运行x86 PowerShell? 也许在两个shell中尝试Get-ExcutionPolicy. (编辑:晋中站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
站长推荐
热点阅读