Enable offline 'NetFx3' feature in Windows 8.1 OS - msbuild

I am creating a installer with 'Windows 8.1' OS for my applications. I am using MSBUILD. By default 'Windows 8.1' OS contains .NET framework 4.5. But I need .NET framework 3.5 to run my applications.
First I install Windows OS using WinPE and then my applications on Windows - without user interfere.
I tried to enable 'NetFx3' feature (adding 'selection name="NetFx3" state="true"' in answer file) in windows image using Window SIM but as per Microsoft website it needs internet connection. I tried and it fails.
After windows install if I run DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:d:\sources\sxs then it works fine on offline computer.
My other option is to run batch file with this command after windows install.
But I will prefer to install .NET framework through windows install. So my question is, how to make 'NetFx3' feature enabled in ISO itself (without internet connection), so that .NET framework 3.5 get installed during windows installation?
Thank you!

After some trial and errors, I found the solution -
First I mounted iso file in Build\WindowsMount directory.
Remember to use latest dism 6.3.x from Windows 8.1 ADK.
An finally enable feature using this command dism /image:Build\WindowsMount /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:Source\Windows\sxs
And finally save image.

Try followings
Add NET Framework 3.5 Features from "Windows Feature" in control panel
Run following command in command prompt as Administrator
dism /online /enable-feature /featurename:NetFx3
/source:d:\sources\sxs
Then try re-installing the sql again. It works for me. Check here more detail article

Related

How to install the Microsoft.NET.Sdk on Windows Server 2019 Core?

I want to build my project in a docker desktop windows container.
The OS is Windows Server 2019 Core (no interface, just a console).
If I want to build my solution with MSBuild like that:
msbuild MySolution.sln
I get this error message:
MyProject.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
Which means for me that I need to install Microsoft.NET.Sdk, for which I need to install the 'App Installer' (to get the 'winget' commands).
And for that I need the Microsoft Store which is not supported in Windows Server 2019 Core.
Does anyone know how to solve this problem?
Edit:
projects in the solution are mixed of .NET Framework and .NET Core/.NET
msbuild is installed via 'Build Tools for Visual Studio' installation
How can I install the framework with command line?
In the Microsoft documentation "Install .NET on Windows" there are sections for installations methods that don't use winget:
"Install with Windows Installer"
"Install with PowerShell automation"

How to automatically uninstall DirectX 9?

I am putting together a WiX installer that includes silently installing DirectX 9:
dxsetup.exe /silent
How do I tell WiX how to un-install DirectX? Is there another switch on the command line?
I need to be able to configure the installer to un-install DirectX automatically, else users complain if they can't uninstall.
For the DirectX End-User Runtime (aka DirectSetup or DXSETUP), it has long been recommended that you don't even try to uninstall it.
In any case, on most versions of Windows you can't 'uninstall' DirectX and running DXSETUP doesn't actually "Install DirectX" either as it's built into the OS. It can only be updated by installing a new version of the OS, installing a Service Pack, or applying a Windows Update. This applies to all versions of Windows starting with Windows XP Service Pack 2, Windows Server 2003 Service Pack 1, and Windows XP x64 Edition.
DXSETUP is still useful for deploying stuff like legacy D3DX9, D3DX10, D3DX11, XACTEngine, XAudio 2.7, XInput 1.3, D3DCompile #43 or earlier, etc. It just doesn't ever install "DirectX".
See No So Direct Setup. If after reading this article you still think you need to run DXSETUP as part of your deployment, you should pick up the latest version of DXSETUP to avoid some potential issues, and trim it down to just those CABs you actually use in your application.

redistributable offline .NET Framework 3.5 installer for Windows 8

Our company was testing our product (compiled for .NET Framework 3.5) on Windows 8. We have discovered that there is no .NET Framework 3.5 on Windows 8 and there are two possibilities to resolve this issue:
online installation
install from Windows 8 installation DVD or ISO
But, we need to have redistributable offline installer for everyone without internet and without Windows installation DVD.
Is there a way how to resolve this issue?
Thanks.
UPDATE:
This should apply to Windows 10 as well.
Try this command:
Dism.exe /online /enable-feature /featurename:NetFX3 /Source:I:\Sources\sxs /LimitAccess
I: partition of your Windows DVD.
Looks like you need the package from the installation media if you're you're offline (located at D:\sources\sxs) You could copy this to each machine that you require .NET 3.5 on (so technically you only need the installation media once to get the package) and get each machine to run the command:
Dism.exe /online /enable-feature /featurename:NetFX3 /All
/Source:c:\dotnet35 /LimitAccess
There's a guide on MSDN.
After several month without real solution for this problem, I suppose that the best solution is to upgrade the application to .NET framework 4.0, which is supported by Windows 8, Windows 10 and Windows 2012 Server by default and it is still available as offline installation for Windows XP.
You don't have to copy everything to C:\dotnet35. Usually all the files are already copied to the folder C:\Windows\WinSxS. Then the command becomes (assuming Windows was installed to C:):
"Dism.exe /online /enable-feature /featurename:NetFX3 /All /Source:C:\Windows\WinSxS /LimitAccess"
If not you can also point the command to the DVD directly. Then the command becomes (assuming DVD is mounted to D:):
"Dism.exe /online /enable-feature /featurename:NetFX3 /All /Source:D:\sources\sxs /LimitAccess".
Microsoft .NET framework 3.5 can be installed on windows 10 without having installation media. The file you need is called microsoft-windows-netfx3-ondemand-package.cab. Just google it and you will get the download links.
After downloading it, copy that file to C:\dotnet35 and run the following command.
Dism.exe /online /enable-feature /featurename:NetFX3 /All /Source:c:\dotnet35 /LimitAccess
Tested and worked in Windows 10 without any issue.

aspnet_regiis.exe -ir does not work on windows 8

I am trying to deploy an ASP.NET MVC3 app to my Windows 8 box with IIS8. When I try to route to the site I get the following error:
Pretty much everything I can find on this issue says to run:
aspnet_regiis.exe -ir
When I run this on my Windows 8 box, I get the following message:
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.
C:\Users\Justin>C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe
-ir
Microsoft (R) ASP.NET RegIIS version 4.0.30319.17929
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation. All rights reserved.
Start installing ASP.NET (4.0.30319.17929) without changing existing web
applications to use this version of ASP.Net. This option is not supported on
this version of the operating system. Administrators should instead install /
uninstall ASP.NET 4.5 with IIS8 using the "Turn Windows Features On/Off" dialog,
the Server Manager management tool, or the dism.exe command line tool. For more
details please see http://go.microsoft.com/fwlink/?LinkID=216771.
Finished installing ASP.NET (4.0.30319.17929) without changing existing web
applications to use this version of ASP.Net.
ASP.NET 4.5 is already installed on my system.
My application runs correctly in Visual Studio, but I can not deploy it to save my life. I am completely at a loss on where to go from here. I have tried both integrated and classic pipeline modes for this site as well.
Run the following command, which will install and register ASP.NET 4.5 in IIS:
dism /online /enable-feature /featurename:IIS-ASPNET45 /all
I'm having the same problem. So far I only found this forum thread of which one of the answers states that installing via Web Platform Installer solved the problem, though this doesn't work for me. The IIS ASP.NET 4.5 feature is disabled as it is already installed.
UPDATE:
I got it to work finally.
Follow the instructions from this SO question to enable the wcf service in IIS:
WCF on IIS8; *.svc handler mapping doesn't work
Here is also some information about how to get the handler mapping installed
what worked for me is:
- unchecking the 4.5 and 3.5 in remove/add windows features
- restarted the computer
- checked the 4.5 and 3.5 in remove/add windows features.
And from that point it all worked again.

WCF REST starter kit fails to install

I just, quite anxiously, downloaded the spankin new WCF REST starter kit. The installed failed. Anyone else had this problem?
http://msdn.microsoft.com/en-us/netframework/cc950529.aspx
Edit: The install fails during the template installation. The VS JIT debugger window pops up. Nothing else is running the PC, I am running as an admin on XP Pro, and the error occurs from either the EXE or the MSI.
Yes, it just failed for me too. Got a warning about replacing an existing file during the template install, then a hard crash after I told it to continue.
EDIT: Just tried again - it worked. Did 3 things different:
Closed all running VS2008 SP1 instances
Read the install guide closer and chose to run setup.exe instead of the msi, and did "Run As Administrator"
Didn't close the MSI installer until the delayed template installer had completed.
Here's the Install Guide:
SYSTEM REQUIREMENTS:
Windows Vista OR Windows Server 2008 OR Windows Server 2003
Visual Studio 2008 SP1
INSTALL AND USAGE STEPS:
Before installing, remember to uninstall any versions you have installed on the machine (see the Uninstall section below for steps to uninstall).
Run the setup.exe in administrator mode (right click on setup.exe and select 'Run as Administrator')
The install process will launch a visual studio installer. Remember to click through the visual studio installer to install the templates. NOTE: You may miss the vsi that is launched, so be sure to finish both the vsi and setup.exe installs to ensure that the whole install process is complete.
While running the vsi, you will get a prompt, which you can safely accept to continue.
Once installed, build the Microsoft.ServiceModel.web project installed on your machine.
You need to reference the Microsoft.ServiceModel.Web.dll assembly from the template generated projects, as well as from the samples. Please remember to verify this while using your templates and projects.
Note that you may also use a project reference instead.
There is a solution that includes all the samples provided in the "WCF REST Starter Kit\Samples\WCF REST Starter Kit Samples" location. This gives you a way to easily try out all the samples from one place.