Reputation: 123
I am trying to use Windows Sandbox to do quick tests of new releases of an application I support for basic functionality (login, etc.). I was able to set up a .wsb config file and have it run a powershell script upon logon to install the application and any system requirements.... The issue I am having is that the application requires .Net Framework 3.5 and .Net Framework 4.8 in order to function correctly. I added the following line to the login powershell script (script is run in elevated powershell window as administrator) in my .wsb file where it runs the following DISM command:
DISM /online /enable-feature /featurename:NetFX3 /All /Source:C:\users\wdagutilityaccount\desktop\WindowsSandboxScripts\sources\sxs /LimitAccess
When the script hits that line and "Error: 87" appears. See below
Has anyone tried running a .Net application in Windows Sandbox? If you were able to install .Net 3.5 (and 4.8) please let me know what steps I need to take to get .Net set up in Windows Sandbox. I found this post that references some problematic Windows updates but my host Windows 10 machine has neither installed.
TIA, Chris
Upvotes: 3
Views: 3012
Reputation: 6163
I was able to to enable .NET Framework 3.5 but on sandbox 24H2 (Win11):
Open PoweShell prompt
Modify Windows Update Settings: Open PowerShell with administrative privileges and run the following command to ensure Windows can download the necessary components:
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "UseWUServer" -Value 0
Restart the Windows Update Service: Restart the service to apply the changes by executing:
Restart-Service wuauserv
Repair the System Image: (This step may take some time)
dism /online /Cleanup-Image /RestoreHealth
Download and Install the Framework (Additional Notes Bellow) :
NET_Framework_3.5_Windows_10.zip
package.https://github.com/tutorialnacional/dotnetsandbox
Upvotes: 0