Upgrading application from .net 2.0 to .net 4.7 - visual-studio

I am solution architect. I need to upgrade my application from .net 2.0 to .net 4.7
What will be the roadmap for that there is no change code or architecture of application
I have Windows server 10 ready it comes with .net 4.5 or higher.
What should I do with IIS ?
Does that needs to be changed to ?
What are the other steps to follow?
Thank you
Suji

Related

how to resolve target .NET Framework with Xamarin

i am new to development with Xamarian platform.Now i just want to run application to targetFramework 4.5. but there diff targetframework listed as below. how i resolve that please help me out.
See https://learn.microsoft.com/en-us/dotnet/standard/net-standard - in the table, note that .Net Framework 4.5 supports the newer net-standard up to 1.1. So choose .NET Standard 1.1. Or if you can require .Net Framework 4.5.1 and newer, choose .NET Standard 1.2.
Or better, whatever dependency is forcing you to use Framework 4.5, talk to the vendor, get them to rebuild for .NET Core 3.1 or the new .NET 6.
If you really must support .Net "Framework" APIs, see https://learn.microsoft.com/en-us/archive/msdn-magazine/2017/connect/net-introducing-the-windows-compatibility-pack-for-net-core, for a (no longer being updated) solution that allows your newer code to be "Net Core", yet work with legacy .net APIs.
Be aware all this is "legacy" - Microsoft's goal is to move everyone to .NET 6.

Can't install Microsoft.EntityFrameworkCore.SqlServer for a .NET 4.7.2 Framework project

I have a VB.NET Windows Forms project targeting the .NET Framework 4.7.2:
I am trying to install Microsoft.EntityFrameworkCore.SqlServer of which the latest stable version is 5.0.8:
However after clicking install and accepting all terms I get an error:
Could not install package 'Microsoft.EntityFrameworkCore.SqlServer 5.0.8'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
Does anyone know what the heck its moaning about version for?
Does anyone know what the heck its moaning about version for?
EF Core 5 requires .NET Standard 2.1. .NET Framework only supports .NET Standard 2.0. So it will never work.
EF Core 3.1 is the last version to support .NET Standard 2.0, and so it's the last version of EF Core compatible with .NET Framework.
But .NET Core 5 supports Windows Forms.
So the options are:
upgrade everything to .NET Core 5
downgrade EF Core to version 3.1
switch from EF Core to EF 6, which is mature, stable and supports .NET Framework

Is there a way to use enterprise library in .NET Core 1.1.2 web api

I am planning to use Enterprise Library for database access on a Web API project which is going to be built using .Net core app.
But I am unable to install Enterprise library using NuGet as the latest version of Enterprise Library is not compatible with.Net core app framework.
Note, I don't want to use Entity Framework.
Appreciate if the community can help on this.
If you can migrate your application to .Net Core 2.0 which is still in preview mode, but Microsoft promised to release it by Q3 2017, I have forked out the Enterprise Library project and ported that to .Net Core 2.0 which you can find it under this repository:
https://github.com/Chavoshi/EnterpriseLibrary.NetCore
And also this is the Nuget package for Data Application Block:
https://www.nuget.org/packages/EnterpriseLibrary.Data.NetCore
Still there are some missing parts such as OdbcFactory and OleDbFactory which they are not available in .Net ported APIs (Or Nuget package is not published yet), but I am keep working on them to maybe port them by myself or update it since the API will be available. I appreciate anyone who can contribute on this project as well. :)

How can we migrate existing web applications from .net 2.0 to 4.0 in installshield project

We have a number of Installshield projects that install and configure IIS applications. We have shipped several versions of the different applications (over 7 versions of 3 applications) and would now like to upgrade to use .net 4.0 instead of 2.0 & 3.5.
After modifying the "Internet Information Services" settings to change the ASP.NET Version on the web sites/application to 4.0.30319 and the .Net Framework version to v4.0 under the application pool, the installer correctly creates an application with the 4.0 version in IIS 6 and below, and in IIS 7 and above it correctly sets the pool to use v4.0, but upgrades do not work for any targets.
The upgrades install OK, but the .Net version of the virtual directory or application pool remain unchanged. Changing it manually works of course, but this would lead to increased support issues.
I have tried changing the upgrade to be a major upgrade, with no success, I am currently working on a custom action to change the .Net version after installation, but I don't have much experience with this feature of Installshield.
Has anyone experienced this issue? Are there any preferred ways of achieving this? (custom actions, or a .Net installer class, WIX is not an option)
Thanks
Without spending hours to dig into it... one quick solution would be to rename the app pools in your new installer and let a major upgrade create the new and remove the old. After all, if you are changing from .NET 2.0 to 4.0, in a sense you are creating a component that is not backwards compatible and thus should be a new component.

Can't Install Powershell 2.0 on XP SP3

I'm trying to install powershell 2.0 on winxp SP3 with .Net Framework 4.0 installed on my machine but I can't install it. It asks for .Net 2.0. It makes no sense to me at all, since I have an upgraded version of such framework. Here's the full message:
"Cannot Install windows powershell v2 because it requires an updated version of the .Net framework. Please, install .Net framework 2.0."
Anyone can lend a hand here? Tnx.
You need 2.0 installed. 4.0 is a side-by-side version of the .NET CLR. It's not an in-place upgrade, so something that demands 2.0 specifically will not accept 4.0. Confusingly, .NET 3.5 SP1 is the latest version of 2.0 and is what you want.
3.0, 3.5 and 4.5** are not new versions of the CLR (.NET's JRE) and are more like libraries/service packs to CLR2 and CLR4.
** well, actually 4.5 is a bit muddier than that but the comparison is sufficient.

Resources