Add .NET 2.0 SP1 as a prerequisite for deployment project - .net-2.0

I have a .NET 2.0 application that has recently had contributions that are Service Pack 1 dependent. The deployment project has detected .NET 2.0 as a prerequisite, but NOT SP1. How do I include SP1 as a dependency/prerequisite in my deployment project?

You'll want to setup launch condition in your deployment project to make sure version 2.0 SP1 is installed. You'll want to set a requirement based off the MsiNetAssemblySupport variable, tied to the version number of .NET 2.0 SP1 (2.0.50727.1433 and above according to this page.)
Bootstrapping the project to actually download the framework if it isn't installed is a different matter, and there are plenty of articles out there on how to do that.

Related

Can not select .NET Frameworks above 4.8

Hey I tried to install the latest .NET Framework 6.0.1 from the official Microsoft Website and it shows as installed inside the Visual Studio Installer but I am somehow not able to select it. Neither can I upgrade existing Applications to 6.0 nor create Applications with .NET Framework 6.0.
So i tried installing .NET Framework 5.0 instead but it has the excatly same issues.
The highest Version that I can choose is .NET Framework 4.8.
In case it is important I am on Windows 10 - 21H1 - 19044.1415.
Image 1
Image 2
Image 3
Last version of .NET Framework is 4.8. Last version of .NET is .NET 6. They are not the same thing, .NET is a successor of .NET Core.

Is the NuGetToolInstaller task supposed to require .Net 4.7.2 and should using the task add .Net framework 4.7.2 as a demand?

We have a build VM that's on an older version of Windows 10 because we have a 3rd party component that can't be installed on newer versions. That version of Windows 10 doesn't support installing .Net Framework 4.7.2, and this appears to be required for the NuGetToolInstaller to work. Is there anyway to get NuGet working in a build that will work with all Windows 10 builds (or even Windows 7)?
I can force it to only choose to build on a VM with a later build of Windows 10 by manually adding a demand for .Net Framework 4.7.2, but shouldn't the NuGetToolInstaller task already include that demand (in the same way that the Visual Studio Build task does)?
and this appears to be required for the NuGetToolInstaller to work.
Check this json file, it shows all the supported versions in task NuGettoolinstaller, we can see that it can be installed from version 2.8.6, I try to install it with the version 2.8.6 and it works, check the pic below.
According to the description, it seems that you are using self-hosted agent, it will check the configuration of the local machine. If you have another version installed on your local agent machine, we can also use the NuGet version.

Will .Net framework 4.8 support Microsoft enterprise library v6.0?

Since some of our applications are written in .Net framework 2.0 & 4.5, We've plan to migrate our applications to .Net framework 4.8 and we have used MS enterprise library v3.0 & v5.0 and would like to uplift to enterprise library v6.0 Before going to migrate, need to know will the latest .Net framework 4.8 support enterprise library v6.0.
There is a port of Enterprise Library 6.0 that is supports .Net Core and .Net Standard 2.0.
I have not used that yet, so I cannot tell anything about its quality but based on the Nuget stats it seems tell that people are using these packages.
Also the original Microsoft Enterprise Library source code was published on GitHub so you could recompile the whole project using updated references, not sure how much effort would that cost.

Is service fabric compatible with .netstandard2.0 or .netcore2.0

I have a set of service projects that i build about 12 months ago. I've tried updating nuget packages as often as possible but with .netstandard and core 2.0 I assumed it would be ready to port to the new sdk and packages without too much trouble.
I've managed to update most of my libraries to .netstandard2.0 but any of the services using service fabric packages won't work.
I've had to default my libraries to 4.6.2
I've tried by updating the csproj to use the new style layout. I've also tried by creating a new service fabric project, selecting the .net core option template and copy the settings from there but that doesn't work either.
Service Fabric is compatible with .netstandard 2.0 and .net core 2.0 (where the project is actually netcore2.0 and not net462) but with this 2 conditions:
Visual studio 2017 15.5 (only in preview as of now)
Service Fabric Tools 2.0 (only in preview as of now)
The good news is that you can create the project/solution from the preview version and then reopen it from the regular version and it will work.
Here's an example of such a solution

How to detect .Net 2.0 SP1 in my installer?

How can I detect if .Net 2.0 SP1 is installed from my installer msi, and abort the install if it is not present?
I know how to do this in code, but it seems cleaner do it in the vdproj. It feels more declarative.
All you need is a Launch Condition Editor where you can set minimum .net version installed on the client machine to 2.2.30729 (.net 2.0 sp1). Hopes it helps.
You could check the value of the MsiNetAssemblySupport property, comparing it to the version number for Fusion.dll when .Net 2.0 SP1 is installed.
Details from MSDN - http://msdn.microsoft.com/en-us/library/aa370325%28VS.85%29.aspx