Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ExecutionPolicy and NoProfile to powershell command #4295

Merged
merged 1 commit into from
Jan 24, 2022

Conversation

eerhardt
Copy link
Member

This fixes build errors like the following:

"File C:\git\maui\bin\dotnet-install.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170."

We pass the same parameters when we call powershell in dotnet/runtime. For example:

https://github.com/dotnet/arcade/blob/e7ede87875f41a9b3df898ae08da5ebc96e24f56/eng/common/dotnet-install.cmd#L2

https://github.com/dotnet/runtime/blob/ad3f1c135bfb4fbb0c4bd0b4492eb10fc5ca4323/eng/testing/workloads-testing.targets#L54

This fixes build errors like the following:

"File C:\git\maui\bin\dotnet-install.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170."
@rmarinho
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@Redth Redth merged commit 4c72897 into dotnet:main Jan 24, 2022
@eerhardt eerhardt deleted the FixPowershellRestriction branch January 27, 2022 16:54
eerhardt added a commit to eerhardt/maui that referenced this pull request Feb 14, 2022
This fixes build errors like the following:

"File C:\git\maui\bin\dotnet-install.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170."

Refixing dotnet#4295 after it was removed by dotnet@eaf66d0.
rmarinho pushed a commit that referenced this pull request Feb 15, 2022
This fixes build errors like the following:

"File C:\git\maui\bin\dotnet-install.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170."

Refixing #4295 after it was removed by eaf66d0.
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants