How can I programatically detect ASP.NET 3.5? - asp.net-3.5

I am creating a diagnostic page for ASP.NET and would like to programatically detect if ASP.NET 3.5 has been installed on the server. Any ideas on how to best do this?

System.Environment.Version gives you the CLR version.
For ASP.NET 2.0, 3.0 and 3.5 it will return the same CLR version: 2.0.50727.3053
As for ASP.NET 4.0 the CLR version will change to 4.*

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 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

Is Entity Framework 7 going to work with .NET Framework 4.5?

Is Entity Framework 7.0 RTM release going to work with .NET Framework 4.5?
According to comments in issue 2443 EF 7.0 was supposed to support Mono which requires 4.5 version of framework.
Recent code changes suggest an upgrade to 4.5.1, is this going to stay that way?
EF.Relational now (RC2) requires .NET 4.5.1
The latest versions of Mono have updated to the Microsoft reference source, so compiling against 4.5.1 should work just fine on Mono now.

Sharepoint 2010 Foundation with .Net Framework 4.0

I am having a Web Application with build target as .Net Framework 4.0.
I want to interact with the Sharepoint Object Model API's but it gives a framework 4.0 runtime does not supports Sharepoint.dll error.
Is their any tweak such that I can use Sharepoint 2010 with .Net Framework4.0.
Note: I cannnot change the build target of the web app to any other framework as I am using some exclusive features of .net 4.0 in my application.
Sorry you probably will have no luck:
There appears to be some confusion
around whether or not ASP.NET 4 is
supported for both MOSS and SharePoint
2010 - in short, the answer is that it
is not currently supported in either
product.
Whilst it is possible to use ASP.NET
3.5 in MOSS by making some modifications to the SharePoint site
web.config (instructions for doing
that in MOSS here; SP2010 uses 3.5 by
default), this is unfortunately not
the case with version 4.
The reason? ASP.NET 4 uses a new
version of the Common Language Runtime
(CLR). Whilst .NET 2.0, 3.0 and 3.5
all used version 2.0 of the CLR, .NET
4 uses version 4. I'm not entirely
sure what happened to version 3. There
is a decent post on stack overflow
with further details.
from SharePoint 2010 and .NET 4: confused?
Maybe .NET 4.0 Support will be added in a future update (SP1?) who knows...
Unfortunately, .Net 2.0 to 3.5 use a different application pool type from .Net 4.0; Mixing in the same app pool is not going to work.
What features of .Net 4.0 are you using, and perhaps the community can help you with a 3.5 solution?

.net 2.0 accessing .net 4.0 dll via assembly bindings

I have a .net 2.0 webservices using .net 2.0 librarys (dll). My config uses assembly binding to use the latest builds,Now the .net2.0 will be migrated to .net 4.0, does this mean i have to move my service to 4.0 as well?
Thanks
Gauls
running web app under clr 4.0 which can be done by changing IIS applicaton pool for the site to use .net 4.0.