3 回答

TA貢獻1820條經(jīng)驗 獲得超10個贊
$pshome\powershell.exe.config
<?xml version="1.0"?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0.30319"/> <supportedRuntime version="v2.0.50727"/> </startup> </configuration>
位置和文件在某種程度上與平臺有關;但是,它將為您提供如何使解決方案為您工作的內聯(lián)要點。
您可以通過執(zhí)行以下操作找到PowerShell在計算機上的位置 cd $pshome
在Powershell窗口中(DOS提示不起作用)。 路徑將類似于(例如) C:\Windows\System32\WindowsPowerShell\v1.0\
要在其中放置配置的文件名是: powershell.exe.config
如果你 PowerShell.exe
正在執(zhí)行中(如果需要,請創(chuàng)建配置文件)。 如果 PowerShellISE.Exe
正在運行,則需要將其配套配置文件創(chuàng)建為 PowerShellISE.Exe.config

TA貢獻1851條經(jīng)驗 獲得超3個贊

TA貢獻1863條經(jīng)驗 獲得超2個贊
reg add hklm\software\microsoft\.netframework /v OnlyUseLatestCLR /t REG_DWORD /d 1reg add hklm\software\wow6432node\microsoft\.netframework /v OnlyUseLatestCLR /t REG_DWORD /d 1
<?xml version="1.0" encoding="utf-8"?><configuration> <startup> <supportedRuntime version="v4.0.30319" /> </startup></configuration>
當您不再需要注冊表項時,請刪除它們。這些是機器范圍的密鑰,強制將所有應用程序遷移到.NET 4.0,甚至使用.NET 2和.NET 3.5的應用程序。
- 3 回答
- 0 關注
- 896 瀏覽
添加回答
舉報