Can I call a .NET 4.7.1 DLL from a 4.6.1 web app? - asp.net

I am developing an ASP.NET application and, for various reasons, I am using .NET 4.6.1 for this, with no option to upgrade to 4.7.1. From this web app I would like to call a DLL that has been compiled for 4.7.1. Is it possible?

No.Calling up higher versions in low versions is not possible

Related

ASP.NET Core application can be run in .NET 4.7.2 environment?

I built an ASP.NET Core application, but I have a hosting server which allows .NET 4.7.2 version only.
Is it possible to deploy to that environment?
As #marc_s already said that you cannot run .NET Core on .Net xxx
run time as two version has it's own runtime and they are different in
regards of its architecture.
If you have a .NET Core application, depending on its version, you could choose your runtime.
Here is the official release of all .NET Core versions:
Note
If you have any requirement where you need to communicate both .NET Core xxx version along with the Classic .NET xxx version, there is a way to build a bridge between them that is .NET Standard library.
The main goal behind .NET Standard was to establish greater uniformity in the .NET ecosystem. You can get more details in the official document here
Hope above explanation guided you accordingly.

Asp.Net Core 2.1 with .Net Framework 4.6.1 error after deployment using dotnet publish or visual studio publish

I am trying to deploy Asp.Net Core 2.1 application with target framework 4.6.1 on server. I am using dotnet publish command and copying the publish folder on the server where deployment is intended. Everything works fine on local machine. But when I am trying to run the application on the server , it is throwing the exception ".Net Framework 4.6.1 not installed, please install it.".
I thought .Net framework is not installed but when I checked installed software , I can see .Net 4.6.1 is installed. Not sure why the error is occurring.
Here is screenshot for the application error and installed software
That error is odd, since you do indeed seem to have that version installed. However, I believe it may be a red herring. I haven't personally tried to run ASP.NET Core 2.1 on .NET Framework, but I suspect it may not work at the moment. The full framework support depends on .NET Standard compatibility which only goes up to .NET Core 2.0. (With .NET Standard 2.0). ASP.NET Core requires .NET Core 2.1. You can try targeting a later version of .NET Framework - something recent like 4.7.2. You may need to downgrade to ASP.NET Core 2.0, if you need to target .NET Framework.
Your list only shows development packages to support targeting and developing for .NET Framework 4.6.1
See How to: Determine which .NET Framework versions are installed for ways to check the .NET Framework version on the machine.

How to force web app on Azure to work with .net Framework 4.5.2?

My web app was running without any problem with web app referring to .net framework 4.5.2 earlier.
But after Azure portal decided to make a shift to .net framework 4.6, my application started giving exception.
I have entry for but that does not seems to be working.
Any way by which I can force web app to use .net framework 4.5.2?
A given VM can only have one version of the .NET 4.x framework, and at present Azure App Service has 4.6.2 (and soon 4.7)
Note that it has had 4.6 or higher for several years, so I suspect your issue is not directly related to this.
If you think you do have a situation where something that worked on 4.5.2 breaks on 4.6.2, I encourage you top post a separate question. But the answer to this question is that you don't control the 4.x version running on App Service.

which asp.net mvc version is compatible with .net framework 4.6

I am new to ASP.NET MVC applications and I'm building a web project in Visual Studio 2015. My project targets .Net framework 4.6. I want to know which version of ASP.NET MVC is installed with this version of the framework. I have browsed a lot and also looked for answers at the ASP.NET official website, but could not find the answer.
A relevant, but not specific, answer was found at:
https://softwareengineering.stackexchange.com/questions/157717/what-is-dependency-of-asp-net-mvc-on-net-framework-and-how-to-use-it-with-net
It would be great if someone could list the versions of ASP.NET MVC alongside the versions of the .Net framework they depend upon.
Try using Visual Studio 2017, because it is not dependent on the OS you are using or targeting.
As for your question, which version of MVC are you currently using, and what are the requirements for the project?
If you're building a website that uses Entity Framework or APIs, then I recommend using framework 4.6 and MVC 5 or Core.
According to MSDN:
Runtime Changes Runtime changes affect all apps that are running under
the .NET Framework 4.6 and that use a particular feature. Retargeting
Changes Retargeting changes affect apps that are recompiled to target
the .NET Framework 4.5, 4.5.1, or 4.5.2, or 4.6. They include: Changes
in the design-time environment. For example, build tools may emit
warnings when previously they did not. Changes in the runtime
environment. These affect only apps that specifically target the .NET
Framework 4.6. Apps that target previous versions of the .NET
Framework behave as they did when running under those versions.
I hope this helps you.

Difference between asp.net core projects in Visual Studio

In Visual Studio we can create three types of project templates:
ASP.NET Web Application
ASP.NET Core Web Application (.NET Core)
ASP.NET Core Web Application (.NET Framework)
Based on the question and answer found here:
Visual Studio 2015 Web Application .NET Core vs .NET Framework
I understand that when using first option I always will be hosting my app on Windows. The same happens when I pick option 3. For the second option I can host my app on Windows, Mac or Linux. I still don't understand why option 2 and three are both called Core Web Application if for the third option I will be using .net framework. What is the difference between option 1 and 3? Both will use .net framework and both can be hosted only on Windows so why the third option is called Core?
It's all about the runtime
The first option is ASP.NET (Full, legacy, whatever you want to call it) running on the .net 4.x runtime.
The second option is ASP.NET Core (a reduced set of common functions that work on all platforms) running on .NET Core Runtime.
The third option is ASP.NET Core running on .NET 4.x runtime. This option is there so that you can write .NET Core applications today, even though you may need functionality that is only available on .net 4.x (ie, you have legacy libraries that have not been ported to .net core, or that cannot run on .net core)
In the third case, you may at a later time convert to a full core application when the dependencies become core, or when the .net core framework matures to include the functionality you need.

Resources