I have an MSI file with .NET Framework 2.0 Prerequisite. In windows 8 .NEt framework 2.0 is not installed by default and when i run the .msi, it says you need to install .NET framework 2.0.
But Windows 8 already comes with .NET framework 4.0 or 4.5 which supports older versions and indeed would be able to run the msi file if i could say this msi file can also run on .NET framework 4.0. How can i do that?
More precisely, how can i configure an msi file to have a prerequisite such that min .net framework version 2.0 but can run on newer versions?
I can do this for assemblies adding the configuration below.
<configuration>
<startup>
<supportedRuntime version="v2.0.50727" />
<supportedRuntime version="v3.0" />
<supportedRuntime version="v3.5" />
<supportedRuntime version="v4.0" />
</startup>
</configuration>
Thanks
The SO question How can I detect .net 3.5 in WiX? appears to answer this. It also points to another post that discusses this when not using WiX
If you install the .Net framework 3.5, that will provide 2.0 as well. Only 4.5 is installed by default. Go to the Windows features and turn on .Net framework 3.5.
Related
I am using VS code and not Visual Studio to run my .NET core 3.1 web app.
I have a .NET core 3.1 app. As I am using an Client VDI machine ( It is using Win 7 SP1 operating system) which is blocking the Nuget.Org URL currently.
so as a work around, I have copied over all the Nuget package into an folder in my VDI and updated the path in the Nuget.Config.
But still I am getting below
Missing Package" error. My App do not DIRECTLY depends on these packages.
following is my Nuget.Config file,
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!-- add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" / -->
<add key="nuget.org" value="C:\NugetPackageDownloadLocation" / >
</packageSources>
</configuration>
any help will be appriciated.
Have you tried adding a package source via the CLI? Given how .NET Core handles transitive dependencies getting all the packages required for a relatively complex solution might be tricky.
nuget sources Add -Name "MyServer" -Source \\myserver\packages
I am trying to check for .net Version with Wix 3.11 via Condition. This works fine until 4.5 like this:
<PropertyRef Id="NETFRAMEWORK45" />
<Condition Message="This application requires .NET Framework 4.5. Please install the .NET Framework then run this installer again.">
<![CDATA[Installed OR NETFRAMEWORK45]]>
</Condition>
Checking for anything above 4.5 seems not to be possible - at least not with this mechanism. How can I do that?
That method (PropertyRef) is syntactical sugar. The NetFxExtension preprocessor injects the implementation at compile time. WiX is currently lagging behind. The implementation you are looking for would be something like:
<PropertyRef Id="NETFRAMEWORK45" />
<Condition Message="This application requires .NET Framework 4.7.1. Please install the .NET Framework then run this installer again."><![CDATA[Installed OR NETFRAMEWORK45>=#461308]]>
</Condition>
https://github.com/wixtoolset/issues/issues/5575
Update (hot33331): Added a # before the number 461308. Without that it did not work for me.
In my Windows Server 2012, I have installed .NET Framework 4.5.2, but it is not listing in IIS when I tried to change one application pool's .NET Framework.
The application pool should be set to .net 4.0, that includes all updates like 4.5.1 and 4.5.2
All other settings are through config, for example:
<system.web>
<compilation debug="true" targetFramework="4.5.1" />
<httpRuntime targetFramework="4.5.1" />
</system.web>
install Microsoft .NET Framework 4.5.2 Developer Pack https://www.microsoft.com/en-us/download/details.aspx?id=42637
In my WiX installer, I do not want .NET installed automatically if it isn't installed. It should just give a warning or merely error out.
The reason to avoid it is explained here:
One HUGE word of
caution here: Because the .Net installer will technically be part of
your install chain, if the user installs .Net but then cancels your
install, your installer will still be listed in the Add/Remove
programs since one if it’s components (the .Net installer) completed.
Tread with caution.
He seems to be intentionally including it. But I'm not and I happened to set <supportedRuntime version="v4.5" /> which I guess isn't a real version (4.5 => 4.0 as far as this is concerned?). My WiX managed bootstrapper application exe automatically prompted me to download and install the "missing" .NET Framework.
For computers that ARE missing 4.0, I don't want this to happen. WiX also complains if I leave out:
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="..." />
<WixVariable Id="WixMbaPrereqPackageId" Value="..." />
in which I literally leave in ... because I don't want it to work anyway.
In this thread, #Shruthi asks
Is there a way to replace the prerequisite .Net install UI with just an notification to the user that they need to install a particular version of .Net before they can install the bundle?
And Rob Mensching replies:
Yes, that is possible now.
... BUT HE DOESN'T ELABORATE. How is it possible now?
Thanks!
===============
In my Bundle's Bootstrap.Config:
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v6" /> <!-- Pretending it's the future! -->
</startup>
The Bundle itself does not reference any .NET stuff and does not reference WixNetFxExtension and uses the custom <BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost" />
To answer how to handle checking for the .Net 4.0 Framework include the WixNetfxExtension in your project
then under product add a reference to the property NETFRAMEWORK40FULL and put a condition on it.
<PropertyRef Id="NETFRAMEWORK40FULL"/>
<Condition Message="This application requires .NET Framework 4.0. Please install the .NET Framework then run this installer again.">
<![CDATA[Installed OR NETFRAMEWORK40FULL]]>
</Condition>
for the chained case again include wixnetfxextension and include NetFx40Redist package group
<PackageGroupRef Id="NetFx40Redist"/>
I'm trying to load a mixed managed application compiled and targeted for Framework 3.5 in the 4.0 CLR.
We have a .config file next to the .exe where I've added this node:
<?xml version="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v4.0.21006" />
</startup>
Unfortunately, the app crashes out on startup with a nasty callstack. Can someone in the know confirm that a mixed managed app (.exe is C++/CLI) will not load in 4.0 if it was compiled for 3.5?
I'm watching a Channel9 video about side-by-side CLR hosting, and one of the devs seems to imply that this is the case:
http://channel9.msdn.com/shows/Going+Deep/CLR-4-Side-by-Side-In-Process-What-How-Why/
Thanks!
You need to set useLegacyV2RuntimeActivationPolicy if you want to load a CLR 2 (.NET 3.5) mixed mode assembly in a CLR 4 process:
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
Without this, you'll get a nasty exception.
You should be able to run 3.5 and 4.0 in the same process. However forcing the app to use 4.0 instead of 3.5 doesn't look possible.
What are you trying to accomplish?