Starting with PowerShell 5.1 - powershell

I start learning Windows PowerShell 5.1 on Windows 10, newest version. I use the Microsoft PowerShell documentation https://learn.microsoft.com/en-us/powershell/
Q1: It is mentioned that you need Windows Management Framework (WMF) 5.1 for Windows PowerShell 5.1 but in Windows 10 PowerShell 5.1 is allready installed by default. So there is no WMF 5.1 needed, or is WMF 5.1 installed in Windows 10? How can I see if WMF is installed and which version?
Q2: There are also Microsoft .NET Framework requirements for Windows PowerShell 5.1: It requires the full installation of Microsoft .NET Framework 4.5. How can I find which version of .NET Framework is installed on my PC? I see there allready is a version 4.8 runtime and 4.8 developer pack. So I think the best I can do is install 4.8 Developer Pack?
The reason is that if I want to use and install packages from the PowerShell Gallery I need the PowerShellGet module and the PowerShellGet module requires .NET Framework 4.5 or above.

To determine the DotNet Framework version you can check the registry or use a 3rd party tool: link
For example, you can run this:
(Get-ItemProperty "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full").Release
and then check the release table:
.NET Framework 4.5 378389
.NET Framework 4.5.1 378675
.NET Framework 4.5.2 379893
.NET Framework 4.6 393295
.NET Framework 4.6.1 394254
.NET Framework 4.6.2 394802
.NET Framework 4.7 460798
.NET Framework 4.7.1 461308
.NET Framework 4.7.2 461808
.NET Framework 4.8 528040

Related

.NET Framework 4.8 redistributable does not apply to this operating system

Tried to install Remote Desktop and it required .NET Framework 4.8
While installing this version, this problem appeared
**The .NET Framework 4.8 redistributable does not apply to this operating system. Please download the .NET Framework 4.8 for your operating system**
look the image
enter image description here

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 LiteDB known to work with dotnet Core 5.0?

I am about to port a Windows forms application (dotnet 4.7x) to dotNet Core 5. The application uses LiteDB (all else is straight c# winforms stuff). Before starting I need to determine if LiteDB 5.10 will work with Core 5.0.
LiteDB 5.x is .NET Framework 4.5 and .NET Standard 2.0 compatible. You can work with LiteDB in any target framework that .NE TStantard 2.0 is compatible, like:
.NET 5
.NET Core 2+
.NET Framework 4.6.1
Mono 5.4
Xamarin.iOS 10.14
Xamarin.Mac 3.8
Xamarin.Android 8
UWP 10.0.16299
Unity 2018.1
https://learn.microsoft.com/pt-br/dotnet/standard/net-standard

PowerShell not working on Windows 2008 R2

I have accidently installed .Net 4.5 on my Windows Server 2008 R2 for PowerShell 5.1, but now I have reverted to .Net 4.0 version and now the PowerShell is not working. It gives below error.
Windows PowerShell terminated with the following error: Method not found: 'System.Threading.Tasks.Task System.Threading.Tasks.Task.Run(System.Action)'
What should I do to resolve this?
Perhaps this is the same issue you have: https://michlstechblog.info/blog/powershell-method-not-found-system-threading-tasks-task-system-threading-tasks-task-runsystem-action/
If that does not work for you, you can always reinstall Powershell 3.0. Download it from https://www.microsoft.com/en-us/download/details.aspx?id=34595
You can also install a higher version if you would like. It would do no harm. Reinstall will require a reboot as they come in the form of KBs.
You will need to download Windows Management Framework 3.0 or install Microsoft .NET Framework 4.5 to correct your issue.
Windows Management Framework 3.0 - link
Microsoft .NET Framework 4.0 - link
or you can get
Windows Management Framework 4.0 - link
Microsoft .NET Framework 4.5 - link

.Net framework 4.0 issue on windows 10 os

I am trying to install one windows application on windows 10 platform. My application need to install Dot Net Framework 4.0 when trying to install then error message will appear and say to install Dot Net Framework 4.0 after that when I try to install Dot Net Framework 4.0 then error message shows me Dot Net Framework 4.0 already install in this system so I can't understand what is the issue with that.
Windows 10 included Dot Net Framework 4.0 and above.
Windows 10 (all editions) includes the .NET Framework 4.6 as an OS component, and it is installed by default. It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default. The .NET Framework 3.5 SP1 can be added or removed via the Programs and Features control panel.
https://blogs.msdn.microsoft.com/astebner/2007/03/14/mailbag-what-version-of-the-net-framework-is-included-in-what-version-of-the-os/
So you don't need to install as already "Installed"...