Questions tagged [class-library]

A collection of classes combined into a unit maybe distributed by a third party. It may have dependencies to further libraries.

A collection of classes combined into a unit maybe distributed by a third party. It may have dependencies to further libraries.

Frameworks usually use this quite a lot.

1024 questions
1009
votes
13 answers

What is the difference between .NET Core and .NET Standard Class Library project types?

In Visual Studio, there are at least three different types of class libraries you can create: Class Library (.NET Framework) Class Library (.NET Standard) Class Library (.NET Core) While the first is what we've been using for years, a major point…
Gigi
  • 28,163
  • 29
  • 106
  • 188
332
votes
12 answers

How can I use external JARs in an Android project?

I have created an Android project and added an external JAR (hessian-4.0.1.jar) to my project. I then added the JAR to the build path and checked it off in Order and Export. Order and Export is ignored it seems, and all classes from the external JAR…
Fredrik Olsson
131
votes
3 answers

Adding System.Web.Script reference in class library

I am currently moving code from my app_code folder to a class library. I have tagged several methods with [System.Web.Script.Serialization.ScriptIgnore] attributes. My class library cannot see this namespace. My add references dialog cannot see…
user112799
  • 1,605
  • 2
  • 13
  • 15
126
votes
8 answers

How can I open DLL files to see what is written inside?

I lost the solution of a class library. Can I open the DLL file which is created by the class library?
HaDe
  • 1,355
  • 2
  • 9
  • 10
97
votes
10 answers

app.config for a class library

I cannot see a app.config file generated for a class library by the VS2008 wizard. In my research I found that in an application only one app.config exists. Is it a bad thing to add an app.config manually to a class library or are there any other…
logeeks
  • 4,849
  • 15
  • 62
  • 93
64
votes
12 answers

'System.Configuration.ConfigurationSettings.AppSettings' is obsolete

I got the following warning 'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: '"This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings"' How do you fix…
001
  • 62,807
  • 94
  • 230
  • 350
49
votes
7 answers

Dependency Injection in .NET Core inside a class library

How can I inject one class into another inside a .NET Core library project? Where should I configure DI as it is done in StartUp Class ConfigureServices in API project?
Dazhush
  • 1,575
  • 1
  • 12
  • 18
43
votes
5 answers

How to convert a Class Library project to a Web Application project?

Long story short, because of some issues with architecture and the fact that someone already put a few .aspx files in a class library, I'd like to just finish off the change and convert a class library to a web application. This is using Visual…
42
votes
15 answers

Java Array sort: Quick way to get a sorted list of indices of an array

The problem: Consider the following floats[]: d[i] = 1.7 -0.3 2.1 0.5 What I want is an array of int[] that represents the order of the original array with indices. s[i] = 1 3 0 2 d[s[i]] = -0.3 0.5 1.7 2.1 Of course it…
edgar.holleis
  • 4,803
  • 2
  • 23
  • 27
41
votes
5 answers

How to debug class library that called from external app?

There is an external workflow that executes C# scripts and is able to work with DLL files(my class library). Is it possible to attach debug to my class library project so breakpoint will hit once this WF will call it? Thanks
Sergejs
  • 2,540
  • 6
  • 32
  • 51
30
votes
4 answers

How to create .Net 5.0 Class Library project in Visual Studio 2019 16.8.1?

I can not see the Class Library(.NET) option on Add a New Project window in Visual Studio 16.8.1. How can I create a Class Library (.NET) project? (Not .Net Core or .Net Framework)
Tolga Cakir
  • 725
  • 1
  • 7
  • 13
30
votes
3 answers

References from class library are not copied to running project bin folder

I have a class library that represents my logic layer. To that library I've added a nuget package for Google.Apis.Analytics.v3 - it installed the package and all it's dependencies. I have a console application that uses that logic class library…
developer82
  • 13,237
  • 21
  • 88
  • 153
28
votes
8 answers

Add ResourceDictionary to class library

I created a class library which is contained of WPF Windows and some user controls inherited from my c# classes that helps me to customize certain wpf controls. Now I want to add ResourceDictionary, to help me share styles between my wpf classes. Is…
davor
  • 939
  • 2
  • 14
  • 31
27
votes
1 answer

different between class library and portable class library in visual studio

There are different types of Class libraries available in Visual Studio such as Silverlight Class Library, Portable Class library and Class Library. What are the differences between these types? How can we determine the type of a Class library with…
mehdi lotfi
  • 11,194
  • 18
  • 82
  • 128
26
votes
2 answers

Is it necessary to deploy the XML file in a class library?

I have developed a lot of class library projects in VS 2012 to be used in Windows Forms and Web forms applications. The question is simple. Do I need to deploy the DLL file itself together with the XML file that is created? For example, the class…
jstuardo
  • 3,901
  • 14
  • 61
  • 136
1
2 3
68 69