[wix-users] .Net Framework install not working
Farrukh Waheed
farrukh1 at gmail.com
Mon Sep 21 22:25:24 PDT 2015
Hi Patterson, Brent
I faced similar issue and now solved it.
Please tell me, if you are using WixNetFxExtension and how you are packing
.Net framework in your bundle?
Here is my working BootstrapperCore.config file I'm using:
<configuration>
<configSections>
<sectionGroup name="wix.bootstrapper"
type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup,
BootstrapperCore">
<section name="host"
type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection,
BootstrapperCore" />
</sectionGroup>
</configSections>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
<supportedFramework version="v4\Client" />
</startup>
<wix.bootstrapper>
<!-- Example only. Replace the host/@assemblyName attribute with
assembly that implements BootstrapperApplication. -->
<!--Following won't work.
<host assemblyName="$(var.MyWPF.Bootstrapper.TargetPath)" />
It actually takes assemly name while
$(var.MyWPF.Bootstrapper.TargetPath)
would expand to full Assembly File Name i.e C:\Bin\MyWPF.Bootstrapper.dll
<host assemblyName="MyWPF.Bootstrapper" />
-->
*<host assemblyName="**CustomUI" />*
</wix.bootstrapper>
</configuration>
For packing .net framework installer with my bundle, due to the
requirements, I'm avoiding using web based installer. Instead, packaging
full installer so that user's doesn't have to download it.
If you use WixNetFxExtension, while referencing and PackageGroupRef, most
probably, it would be setup with Compressed='no' attribute. and it would be
placed in redist folder parallel to where your Bundle.exe would be
generated.
In my case, I wanted to pack everything into one Bundle.exe, so *avoiding
WixNetFxExtension*, while copying following fragment into bundle.wxs and
modified it accordingly:
<?define NetFx451MinRelease = 378675 ?>
<?define NetFx45MinRelease = 378389?>
<?define NetFx45WebLink = http://go.microsoft.com/fwlink/?LinkId=225704 ?>
<?define NetFx45RedistLink = http://go.microsoft.com/fwlink/?LinkId=225702 ?>
<?define NetFx45EulaLink = http://go.microsoft.com/fwlink/?LinkID=260867 ?>
<Fragment>
<util:RegistrySearch
Id="NETFRAMEWORK45"
Variable="NETFRAMEWORK45"
Root="HKLM"
Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"
Value="Release"
Result="value" />
</Fragment>
<Fragment>
<util:RegistrySearchRef Id="NETFRAMEWORK45"/>
<PackageGroup Id="NetFx451Redist">
<ExePackage Id="NetFx451Redist"
InstallCommand="/q /norestart /ChainingPackage
"[WixBundleName]" /log "[NetFx451FullLog].html""
PerMachine="yes"
DetectCondition="NETFRAMEWORK45 >=
$(var.NetFx451MinRelease)"
Vital="yes"
Permanent="yes"
Protocol="netfx4"
LogPathVariable="NetFx451FullLog"
Compressed="yes"
Name="NDP451-KB2858728-x86-x64-AllOS-ENU.exe"
SourceFile="C:\Program Files (x86)\Microsoft
SDKs\Windows\v8.1A\Bootstrapper\Packages\DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe"
>
</ExePackage>
</PackageGroup>
Please note, I've removed Repair and Uninstall Commands, because I don't
want it to be repaired or uninstalled by same Bundle installation. Once
installed, it would have its own reference in Control Panel --> Programs
and Features.
Also See the Name and Compressed attributes in ExePackage Element.
Now referencing this in my Chain:
<PackageGroupRef Id = "NetFx451Redist" />
One more thing if you haven't done yet. Define following as well:
<WixVariable Id="WixMbaPrereqPackageId" Value="NetFx451Redist" />
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf"
/>
Hope this helps.
Farrukh
On 22 September 2015 at 05:34, Sean Hall <r.sean.hall at gmail.com> wrote:
> We really need to the bundle log in %temp% to diagnose the issue, but there
> are some issues with the BootstrapperCore.config.
>
> The host element is used to tell mbapreq which assembly contains your
> BootstrapperApplication class, you should only specify one host element.
>
> The order of the supportedRuntime elements shouldn't cause your problem,
> but be aware that by putting 4.0 first that you will be running in the v4
> CLR if it's installed.
>
> By leaving out supportedFramework elements, you're saying that the BA can
> be loaded under the v2 CLR without the 3.5 upgrade. Since you say your BA
> requires .NET 3.5, you should add a supportedFramework for 3.5 under the
> host element.
>
> Finally, be aware that there is no redistributable to install .NET 3.5 on
> Windows 8/Server 2012 or later.
>
> On Mon, Sep 21, 2015 at 4:13 PM, Phill Hogland <phill.hogland at rimage.com>
> wrote:
>
> > Maybe I should not try to comment on this, as others may understand the
> > issue better than I. It seems like your supportedRuntime is saying that
> > you prefer to use .Net 4.0 (but if the mba is not compiled for .Net 4.0
> > that seems like a problem.) Your wix.bootstraper statement does not
> have a
> > supportedFramework so I am not sure how Burn is to negotiate the correct
> > framework.
> >
> >
> >
> http://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_dotnet.html
> >
> >
> > -----Original Message-----
> > From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
> Behalf
> > Of Patterson, Brent
> > Sent: Monday, September 21, 2015 3:43 PM
> > To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> > Subject: Re: [wix-users] .Net Framework install not working
> >
> > Sorry, yes you're correct. It's my managed bootstrapper application that
> > I was referring to, not the burn itself. This is what I have in
> > configuration:
> >
> > <startup useLegacyV2RuntimeActivationPolicy="true">
> > <supportedRuntime version="v4.0" />
> > <supportedRuntime version="v2.0.50727" />
> > </startup>
> > <wix.bootstrapper>
> > <host assemblyName="CustomUI" />
> > <host assemblyName="CustomUI.Res" />
> > </wix.bootstrapper>
> >
> > Apparently 3 and 3.5 is "v2.0.50727" according to MSDN help. The thing
> > is, it DOES show the prompt that the user needs to install .NET framework
> > to run the application, but after the user confirms, it closes and does
> > nothing. Is this a bug with Windows Installer or something, or with my
> > application? The target framework for the bootstrapper application is
> 3.5.
> >
> > -----Original Message-----
> > From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
> Behalf
> > Of Phill Hogland
> > Sent: Monday, September 21, 2015 1:33 PM
> > To: WiX Toolset Users Mailing List
> > Subject: Re: [wix-users] .Net Framework install not working
> >
> > Burn does not require any .Net support. If you have a managed
> > bootstrapper application then the dependency on .Net is introduced and
> you
> > control which version of .Net you need in your
> > managedApp.BottstrapperCore.config file. It sounds like your
> > supportedRuntime does not match your expectations.
> >
> > This is from a mba which runs on 4.5 or later
> > <startup>
> > <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"
> />
> > <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
> > </startup>
> > <wix.bootstrapper>
> > <host assemblyName="MyMbaAssembly">
> > <supportedFramework version="v4\Client" />
> > <supportedFramework version="v4\Full" />
> > </host>
> > </wix.bootstrapper>
> >
> > Then the first item in the in the bundle chain should be the package ID
> > for the .Net required by your managed bootstrapper application (in this
> > case 4.5.1.
> > <PackageGroupRef Id="NetFx451Web" />
> >
> > Any other .Net dependencies would be later in your chain.
> >
> >
> > -----Original Message-----
> > From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
> Behalf
> > Of Patterson, Brent
> > Sent: Monday, September 21, 2015 2:01 PM
> > To: wix-users at lists.wixtoolset.org
> > Subject: [wix-users] .Net Framework install not working
> >
> > I've ran into a problem with .NET framework. My burn bundle requires 3.5
> > to run, and installs 4.5.2 as part of pre-req mechanism for the software
> > it's installing. The 4.5.2 part works correctly. But if the machine the
> > user is installing on does not have 3.5 or higher installed, it prompts
> the
> > user with Microsoft's "Download and Install .Net Framework" when
> launching
> > the bundle. If the user clicks cancel, it simply closes and not launch
> the
> > burn bundle. If the user clicks "Download & Install", it seem to do
> > something for a short while, then closes. But it doesn't install 3.5
> > .Net. I don't see a progress bar or anything to indicate that it's
> > running. Checking task manager does not reveal anything.
> >
> > To clarify, this is NOT a part of the burn bundle pre-req install, as the
> > burn requires 3.5 to operate. Is there some kind of setting or something
> > for when building the burn bundle that affects this? Why is this not
> > working? We're targeting operating systems that should have 3.5 already
> > installed at minimum, but need to handle cases where some users may have
> > all .net framework uninstalled. I would assume that with the burn
> > targeting 3.5, Windows should handle .Net installation required to run
> the
> > bundle. We're currently using WiX 3.9.
> >
> > ________________________________
> >
> > Join us for Xactware User Conference 2016 on Feb. 9-10 in Salt Lake City.
> > Stay February 11 for an extra day of free training. Visit
> > xactwareuserconference.com for more information.
> >
> > ________________________________
> >
> > This email is intended solely for the recipient. It may contain
> > privileged, proprietary or confidential information or material. If you
> are
> > not the intended recipient, please delete this email and any attachments
> > and notify the sender of the error.
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > http://www.firegiant.com/
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > http://www.firegiant.com/
> >
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > http://www.firegiant.com/
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > http://www.firegiant.com/
> >
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
More information about the wix-users
mailing list