dotnet / install-scripts

MIT License
127 stars 70 forks source link

Error regarding installation of .NET 7.0 Acquisition Failed: Cannot set property #376

Closed ip240Z closed 11 months ago

ip240Z commented 11 months ago

Repro steps:

1.

Extension Version: 1.0.0 Error Message: .NET Acquisition Failed: Installation failed: Cannot set property. Property setting is supported only on core types in this language mode. At line:1 char:5

C:\Users***.vscode\extensions\ms-dotnettools.vscode-dotnet-runtime-1.6.0\dist\install scripts\dotnet-install.ps1 : Cannot invoke method. Method invocation is supported only on core types in this language mode. At line:1 char:136

Error Stack: Error: .NET Acquisition Failed: Installation failed: Cannot set property. Property setting is supported only on core types in this language mode. At line:1 char:5

C:\Users\.vscode\extensions\ms-dotnettools.vscode-dotnet-runtime-1.6.0\dist\install scripts\dotnet-install.ps1 : Cannot invoke method. Method invocation is supported only on core types in this language mode. At line:1 char:136

baronfel commented 11 months ago

I'm not sure that the install scripts work in Powershell's Constrained Language Mode.

baronfel commented 11 months ago

I'm going to transfer this one to the install-scripts team to investigate the interaction here.

YuliiaKovalova commented 11 months ago

Hi @ip240Z,

I assume this issue is related to set policies on your workstation.

Could you check your $ExecutionContext.SessionState.LanguageMode in PS and share the result with us?

YuliiaKovalova commented 11 months ago

Feel free to reopen if it is still relevant for you.