Page 1 of 1

How to enable .NET 3.5 in Windows 10

Posted: Tue Apr 26, 2016 2:23 pm
by mwilner
I just updated to IA X4 in the hopes that it will allow to enable .NET 3.5 during the installation.
We are installing an older application that is relying on .NET 3.5 on Windows 10 but it will not enable this feature even though it is selected in the Application Runtimes. Other runtimes like Visual Studio C++ Runtime 10.0 is getting installed no problem.

Is there anything I am missing what I need to do?
I understand that in Windows 10 you need enable this feature through the Windows features and not download and install.
dotnet35.PNG
dotnet35.PNG (18.09 KiB) Viewed 5845 times


So is there a way in the install compiler to do this?

Best regards,

Re: How to enable .NET 3.5 in Windows 10

Posted: Wed Apr 27, 2016 4:39 am
by bokkie
Manfred,

If you expand the node you selected in your screenshot does it list the features you require? I'd like to know if it contains what you want enabled?

I did some searching aroud on this and it seems you can do it using an external batch file and then run that as an unattended DOS command. I found some references to a command called "pkgmgr" which takes command line arguments where you define the resource you want to enable. Whether it's OS-agnostic I don't know as I've not used it but it might be worth looking at as an option.

If you manage to get a command line to work then that's what you could put in a batch file. There are programmatic options but from what I see you'd essentially pump the same command and arguments into a C# process start method.

Maybe this might kickstart your search a bit further?

Re: How to enable .NET 3.5 in Windows 10

Posted: Wed Apr 27, 2016 6:08 am
by FrancescoT
Dear Manfred,

in reality what you are searching for it's already available.
If you select "Net 3.5" RTMs in Application Runtimes, the generated setup package will enable the ".NET 3.5" features on Windows 10.

However, the selection of "Net 3.5" RTMs in Application Runtimes will also include the various physical RTM files. This because the same Application Runtime can be used to install these RTMs on those target systems where the ".NET 3.5" RTMs are not pre-installed.

In case you what to release a setup package which is exclusively targeted to those systems where ".NET 3.5" RTMs are pre-installed, you can replicate in a custom script the same identical approach used by the IA "Net 3.5" scripts.

I suggest you to have a look at of the script file; "setupnet20sp2_x64.mia" (...or "setupnet2sp2.mia").
- These files are part of the "Net 3.5 sp1" Application Runtime package depending on the selected target platform (x64 or x86).-

This file executes the "DISM" command-line tool (code line #11) to enable the ".NET 3.5" feature on those systems where those RTMs are pre-installed.

Code: Select all

Run Program $NATIVESYSTEM32DIR$\dism.exe /online /Enable-Feature /all /FeatureName:NetFx3 /NoRestart (WAIT, get result into variable DOTNET20SP2_RESULT_X64)

Hope this helps you.

Re: How to enable .NET 3.5 in Windows 10

Posted: Thu Apr 28, 2016 1:04 pm
by mwilner
Thank you, Francesco.
I didn't realize that I have to add the runtime for .Net 2.0 SP2. After adding it the install worked well even with the older installers.

Best regards,

Re: How to enable .NET 3.5 in Windows 10

Posted: Thu Apr 28, 2016 1:45 pm
by FrancescoT
Happy you solved!

Regards