Reputation: 31
I have an assembly written in C # compiled with version 3.5 that uses WCF. This library must be used by another application written in vb.net an outside firm that compiled with version 2.0 .
Is it possible ?
Upvotes: 3
Views: 56
Reputation: 12874
No, you cannot do it.
But you can do one thing. You can give your other application the necessary dll
needed to run WCF code and any other dll that you have used in your application.
I am not sure about that but you can have a try.
Upvotes: 0
Reputation: 161773
No, that's not possible, but not because of the framework difference. It's not possible because your client doesn't have the assemblies necessary for WCF.
Actually, .NET 2.0 and .NET 3.5 use the same CLR. If you compile code for .NET 3.5, but don't use any of the new assemblies, then it should be possible for that code to be consumed by a .NET 2.0 application. .NET 3.5 is just .NET 2.0 SP2 plus some new assemblies.
In fact, .NET 3.0 is .NET 2.0 SP1 plus some new assemblies. .NET 3.5 is .NET 2.0 SP2 plus .NET 3.0 SP1 plus more new assemblies. All three use the .NET 2.0 CLR.
.NET 4.0 uses a new CLR and is a new release. .NET 4.0 code cannot run on a .NET 2.0 machine. However, there is a feature to permit .NET 2.0 and .NET 4.0 CLRs to run at the same time.
Upvotes: 5