Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making a call to a .NET 4 library from 3.5

I have the need to make a call to the System.Xaml library in .NET 4.0. Is it possible to make a call to this library if your project is targeted to 3.5?

like image 479
mrwayne Avatar asked May 03 '10 22:05

mrwayne


People also ask

Which version of the NET Framework should I Run my App?

You might also want to configure your .NET Framework 3.5 apps to run on the .NET Framework 4 or later versions, even on computers that have the .NET Framework 3.5 installed, to take advantage of the performance improvements in versions 4 and later versions. We recommend that you always test your app on every .NET Framework version that you support.

How to write code that calls stateless methods in the class library?

Write code that calls stateless methods in the .NET Class Library Create a new instance of .NET Class Library classes to call methods that maintain state Use Intellisense to learn more about a method, its overloaded versions, its return value data type, and its input parameter data types

How to call a web API from a net client?

Call a Web API From a .NET Client (C#) Create the Console Application. The preceding code is the complete client app. RunAsync runs and blocks until it... Install the Web API Client Libraries. Use NuGet Package Manager to install the Web API Client Libraries package. From... Add a Model Class. This ...

How do I specify multiple versions of the NET Framework?

Use the following strings: .NET Framework 1.0: "v1.0.3705" .NET Framework 1.1: "v1.1.4322" .NET Framework 2.0, 3.0, and 3.5: "v2.0.50727" .NET Framework 4 and later versions: "v4.0" You can add multiple <supportedRuntime>elements, listed in order of preference, to specify support for multiple versions of the .NET Framework.


1 Answers

No. You'll need to target your project to run in .NET 4, and to use the CLR v4, in order to use .NET 4 assemblies.


On a different note - there is no real advantage here. Just change your application to target .NET 4. If you are going to add a dependency on the .NET 4 framework assemblies, you might as well just target .NET 4 in the first place...

like image 125
Reed Copsey Avatar answered Oct 11 '22 12:10

Reed Copsey