Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do Portable Class Libraries work with .net 3.5?

I am running Windows 8 and have both Visual Studio 2010 Ultimate w/sp1 and Visual Studio 2012 Ultimate and I am trying to create a Portable Class Library that supports .net 3.5 and greater.

When I first try to create a PCL I get a screen like this:PCL selection screen

I noticed that .net 3.5 is not in the list so I clicked on "Install additional frameworks" and found a Targeting Pack for version 3.5. But when I download and run "dotnetfx35setup.exe" nothing happens. And when I go back into VS and try to create a new Portable Class Library, it lists the same target frameworks as before.

I have also turned on the Windows Features for .NET Framework 3.5 and am now out of ideas. Here is a screen shot in case I missed something else.

Windows Features

Thanks,

like image 300
Eric Avatar asked Oct 24 '12 14:10

Eric


People also ask

What is .NET portable library?

The Portable Class Library project enables you to write and build managed assemblies that work on more than one . NET Framework platform. You can create classes that contain code you wish to share across many projects, such as shared business logic, and then reference those classes from different types of projects.

How do I create a portable class library in Visual Studio 2019?

Select the Visual C# → Windows template in the left pane and select Class Library (Portable) in the middle pane. Enter StringLibrary in the name field and click OK to create this project.

Can we use NET Framework class library in .NET core?

All aspects of . NET Core are open-source including class libraries, runtime, compilers, languages as well as application frameworks. . NET Core also supports C#, Visual Basic, and F#.

When should you use .NET core class library?

Use a . NET Core library when you want to increase the . NET API surface area your library can access, and you are okay with allowing only . NET Core applications to be compatible with your library.


1 Answers

.NET Framework 3.5 didn't have a portable profile. Do you have this problem within Visual Studio 2010? I noticed once I installed Visual Studio 2012 on my own computer, the .NET Framework 3.5 was actually removed, likely because .NET 4.5 contains it.

Because you can still target to the .NET 3.5 if you want, just not a portable profile ( PCL ), which is easily proven by this article what you want is simply not supported.

like image 103
Security Hound Avatar answered Sep 23 '22 07:09

Security Hound