2

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

enter image description here

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

reebo
  • 103
  • 8
  • @Hans Passant, updated my post to mention the login script is run in elevated powershell window when getting the error. – reebo Apr 13 '23 at 22:32
  • [Install the .NET Framework 3.5 on Windows 11, Windows 10, Windows 8.1, and Windows 8](https://learn.microsoft.com/en-us/dotnet/framework/install/dotnet-35-windows) ? Following that link you probably end up here: [Download .NET 5.0 (5.0.17)](https://dotnet.microsoft.com/en-us/download/dotnet/5.0), which is already end-of-life, so all previous version are tooo – Luuk Jul 18 '23 at 15:37
  • 3
    That is incorrect. .NET Framework 3.5 SP1 is support until 2029 and 4.8 has no specified end date yet: https://learn.microsoft.com/en-ca/lifecycle/products/microsoft-net-framework – mark.monteiro Jul 19 '23 at 17:16
  • Apps for .NET Framework 4.8 should work fine in the sandbox w/o installing anything. As for .NET 3.5 apps you may not need the Framework 3.5, you can configure them to run on 4.8. Just add a `` in the `.exe.config file` (or create that file if you don't have it) as explained here https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-configure-an-app-to-support-net-framework-4-or-4-5 – Simon Mourier Jul 20 '23 at 07:21

0 Answers0