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.
class-library
1,033
questions
0
votes
0
answers
21
views
I want to encrypt my Localdatabase and my application involves xamarin.forms,xamarin.mac,and a classlibrary. I am using package sqlite-net-sqlcipher
STRUCTURE:
I am using xamarin.forms and Cocoa app(xamarin.mac) in integration with it.
My xamarin.forms deals with all the UI, and the Cocoa app(xamarin.mac) does interaction with all the mac API's.
I ...
-1
votes
0
answers
16
views
SerilogAdapter needs More Encapsulation & Information Hiding in order to Completely encapsulate & hide 3rd-party Seilog API modules from Client code
Here is info about our technical development environment :
Microsoft Visual Studio 2022
.NET 6.0
C# 10
Serilog
Serilog.Sinks.Datadog.Logs
Serilog.Sinks.PeriodicBatching
I created an Adapter ...
0
votes
0
answers
34
views
Send an email from SQL Server using CLR Assembly (microsoft modern authentication)
I have created a class library project to send an email using Azure.Identity, Microsoft.Graph. after that, I complied into DLL when I tried to create Assembly in SQL Server it threw error
Assembly '...
0
votes
1
answer
56
views
How to register DI Services in .net core class library?
I want to add some services in my class library project and I found some ways on Google for this https://mcguirev10.com/2018/01/31/net-core-class-library-dependency-injection.html. However, I don't ...
0
votes
0
answers
61
views
Load Class library dll in powershell
I have made a C# Class Library that has some NuGet packages installed in it, like Azure.Core.
When the library has been compiled, I get my library as a MyLibrary.dll which is all fine.
The only files ...
0
votes
0
answers
19
views
Mah apps resource not found in a wpf class library
My application is using a wpf library (uilib.vcproj) which itself uses another ( corelib.vcproj).
In coreLib a resource dictionary (MahAppsMetroStyles.xaml) exist whic define mah app style and it s in ...
0
votes
3
answers
2k
views
How do I add a class library here in Microsoft Visual Studio Code?
enter image description here
I don't know how to add a class library here, how does it turn into this?
enter image description here
I am really lost right now since our prof did not teach much about ...
0
votes
1
answer
79
views
.NET Framework 4.5.2-based Console application compatibility problems with .NET 6-based Class Library project
Here is the info associated with the development environment:
I have a Console project created using:
Microsoft Visual Studio 2019 Enterprise
.NET Framework 4.5.2
C# 5.0
I have a Class Library ...
-1
votes
1
answer
139
views
How to create a class library (c#) in visual studio code using .net 4.7 version
I am trying to create a class library from visual studio code, as i cannot use visual studio because of some organizational limits.
So when i tried to create the class library i was able to use the c# ...
0
votes
1
answer
156
views
How can I log to a specific file path with log4j2 in a library?
I have a Java Library (SDK) that will be consumed as a JAR in other applications. I'm using log4j2 and SLF4J to log right now, but when my library is consumed by the other application (also using ...
0
votes
1
answer
92
views
How to send data between Class Library and Winforms (both are different projects)
I'm currently working on a scenario where I am developing an activity for UiPath. The class library is a project setting where I am creating this activity. Specifically, for this activity, I am using ...
0
votes
1
answer
155
views
Error adding a WinUI 3 class library reference to a WinUI 3 blank app
First I create a blank Visual Studio Solution, then a add a WinUI3 class library(dll) project and then i add a WinUI3 blank app project.
In this stage both the project compile without errors
Now I go ...
0
votes
0
answers
65
views
Error on BlazorWebView and Class Library with Winform
I have a class library (CL) project which has a class I register to COM. This CL has a project reference to a Razor Class Library which has some components I want to show on a Windows Forms dialog ...
2
votes
1
answer
494
views
Source Generators for class library project in c#
Is this possible to generate code with Source Generator in c# into class library project? I would like this auto-generated code to be packed into Nuget package then.
When I try to build a project made ...
0
votes
0
answers
55
views
Class library is not found while building the ASP.NET Core 7 Web API with Github Actions
I wrote this dotnet.yml to build my application and push the docker image to docker hub, placed in the root of my project under the folder .github/workflows/.
name: .NET Docker CI/CD
on:
push:
...
0
votes
1
answer
432
views
Blazor WebAssembly stuck on Loading... when configuring dependency injection for a class library
So I built a class library that I will use for various different projects in the future. Now when I want to implement it and set the options in my Program.cs file, my blazor app gets stuck on the ...
0
votes
0
answers
21
views
Blazor a Class Library reference in the WebAssembly client is failing to connect .NET 6
I have a folder called Services; it is in fact in program.cs and a simple GET localStorage operation works fine.
Now I am adding another function in the same file (Cache). This function needs to Set ...
0
votes
0
answers
118
views
Shared class library - MAUI and ASP.NET Core
Is it possible to share a class library between a .NET MAUI app and an ASP.NET Core app?
I have an API and MAUI api that share the same model which I would like to put into a class library but I can't ...
0
votes
0
answers
21
views
NU1102 Unable to find package Communications.Interface with version (>= 6.0.0)
I have a .net class library called Communications.Interface, this is the .csproj of this project :
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework&...
0
votes
1
answer
183
views
how to build dockerfile when there is a class library in another folder [duplicate]
I have a dotnet project and a class library project like this:
..solution-folder/
app1/
- app1.csproj
- dockerfile
- other ...
0
votes
2
answers
445
views
Trouble Running a Multi-Project .NET 6 Application in Docker
I'm working on a .NET 6 application that includes multiple projects (web, services, data), and I'm trying to containerize it using Docker. I've organized my Dockerfile and project structure as follows:...
1
vote
1
answer
370
views
Register dependency of class library which is not directly referenced in ASP.NET Core Web API
I have an ASP.NET Core Web API project with class libraries. I can register dependency of class library which are directly added as references into the project. But I am not able to find way to ...
0
votes
1
answer
186
views
Reference to System.Windows.Forms in .net7.0 class library project
I need to add a reference to System.Windows.Forms in class library project written in .net7.0 that will be distributed in NuGet for my young students.
How can this be done?
The class that I want to ...
0
votes
0
answers
58
views
Integrate Blazor components with Sdk Microsoft.Net.Sdk in the project type "class library"
Is it possible to integrate Blazor components in the Microsoft.Net.Sdk, class library project. Target: net7.0. It is a custom plugin in Nocommerce framework.
if I try with the new MVC Web project (...
0
votes
1
answer
212
views
Unable to add Microsoft.AspNetCore package to the class library project [duplicate]
I have an ASP.NET Core 7 project which has a reference from a shared class library project. In my shared class library, I have a method which access a webApplication object as argument.
The problem is ...
0
votes
2
answers
1k
views
.Net Maui iOS Native Binding to create a .Net Maui Nuget package
I have a .net Maui Native iOS binding of some iOS framework. I managed to bind successfully. However, I want to create a .Net Maui Class library to consume the iOS native binding. See my project ...
-1
votes
1
answer
657
views
C# Run Class Library
I am building a C# project in Jetbrains Rider. When the project is finished, I want to include it in another project by building a dll and adding the dll to the project. To generate a dll, I need to ...
0
votes
0
answers
62
views
Trigger method of different class library from another class library in C#
I have a two class library
A and B. A is written in VB and B is written in C#
A has a reference of B. So that I cannot instantiate a method from B on A class library.
Now I have a scenario where if ...
1
vote
0
answers
179
views
Read info.plist in swift macOS library app
I am building a Library of classes in macOS swift. I created an empty Info.plist file in the root of the app folder and added a single entry (LibraryPath). Now I want to read the contents of the plist ...
0
votes
1
answer
209
views
What's wrong with my Class Library? 'Fatal Execution Engine Error'
I am trying to make an Plug In for Navisworks manage that will rename a batch of selected clashes with a prefix or suffix. I am running this on Visual Studio.
using Autodesk.Navisworks.Api;
using ...
0
votes
0
answers
49
views
ServicePointManager not initialised when in CLR class library?
I've inherited a CLR class library (.NET Framework 4.7.2) that provides a function which queries table storage in Azure. The function, called from a native C++ executable, is currently failing because ...
0
votes
0
answers
26
views
MAximDL plugin fails accessing filesystem
I want to write the x,y, coordinates of a dragRectangle to a certain line in a text file(help.txt) by executing a plugin dll. Compilation runs fine. Writing is executed by sub ChangeFile. The plugin ...
0
votes
0
answers
71
views
create dll for MaxImDL VB.Net - mainly solved
Found partial Solution:
I ran Visual Studio 2019 as administrator. Then I copied Interop.MAxIm.dll to the program directory that contains Maxim_dl.exe.
The plugin can now be loaded manually and adds ...
0
votes
1
answer
2k
views
Failed to AOT compile MyLibrary.dll, the AOT compiler exited with code 1 (ProjectName)
I have a MAUI application (.NET 7) referencing a custom class library (.dll) with an EF Core infrastructure (.NET 6) which nicely compiles and deploys in Debug mode on all platforms. Unfortunately, ...
0
votes
1
answer
656
views
Where do I perform startup in a .NET class library?
Haven't done .NET for years, getting back into it.
I would like to know where I perform startup in a class library I am developing. This class library will have several different HttpClients, and I ...
3
votes
1
answer
3k
views
Cannot See Class Library (.NET Core) in Visual Studio 2022 while adding/creating new class library projects
I have .NET Core 6 SDK, Runtime Installed in my System.
Visual Studio Workload Components Installed:
Web & Cloud:
ASP.NET Web Development
Azure Development
Desktop & Mobile
.NET Desktop ...
2
votes
1
answer
877
views
.Net Maui Balzor App crashes during startup on local ios device
Currently I try to program a ios mobile app with .net maui. This app works in the ios simulator, android simulator and on the windows machine itself. But when I try this app with a local ios device ...
0
votes
0
answers
59
views
C# Show Class Library from another Project
Here are the steps I have used to create the winforms Project OneB
Using Visual Studio 2019 with Net 4.8 I created OneB
Then I created a Windows Forms Class Library named CLP.
Opened OneB and Added ...
0
votes
1
answer
447
views
.Net 6.0 Web SDK class library creation
We've got a class library we've built internally that, among other things, exposes some HTTP clients specifically for authorizing other requests (acquiring/refreshing tokens, etc.). Until now, it has ...
0
votes
0
answers
86
views
Static Class returnig null in C# class library
I have a solution that has 3 projects. Using visual studio 2022
project 1: lib (console App)
Class cAgvMgr - Manager class
project 2 - Util(Class Library)
Static Class named AgvMgvinterface
Project 3 -...
1
vote
3
answers
291
views
Custom dependency injection in a class library file
I am working on a project(asp.net mvc-5 with jQuery) in which whole validation is happening in front-end and we are executing APIs using $.ajax call, now as there are no validations on API level or ...
0
votes
1
answer
123
views
Asp.net c# Class library dlls right version not loading correctly
I created a class library and called id sharepointClassSample library.
It has a reference to Microsoft.Sharepoint.Client.dll version 16.1.0.0 along other ones.
I compiled the library and moved the ...
0
votes
0
answers
125
views
How do I get the name of the project/assembly that called a class library from within the class library when a method logs an exception?
I'm not sure if this is possible, but I figured I'd ask before having to make dozens of changes to my code. Note that the class library is part of a nuget package and the project for it IS NOT ...
0
votes
2
answers
199
views
Get custom configuration .cs file path in a class library project that is being referenced by a console application
I have a class library created with dot net core 3.1. There are two files which I am using for logging and reading appsetting.json file.
For this I am using two custom class files respectively for ...
2
votes
1
answer
171
views
Possible to increment DLL version automatically
I have a C#/VB .Net Class Library which is used in multiple projects.
One of the issues we face is if a change is made to this Class Library it needs to be deployed to multiple projects.
As you can ...
0
votes
1
answer
394
views
I created class library in .net6.0 and added my ViewComponent.I want to access my viewcomponent Default page in asp.net core mvc application
Hi I created my classlib and added my viewcomponents to that library and I added DLL file of my class library to asp.net mvc application I can able to use class and models but I don't know how to ...
0
votes
1
answer
193
views
Custom Attribute For Class Library Classes and Functions in C#
I'm developing 3rd party API connector bridge in class library NOT in ASP.NET.
User Levels
API has 3 user levels, lets say:
UserGoer
UserDoer
UserMaker
Service Restriction
Each API operation can ...
2
votes
4
answers
1k
views
develop shared library alongside another project without having them be in the same solution
Let's say I have a c# project Foo and a classlibrary called Bar
I'm wanting to develop Bar alongside Foo which will use Bar as a shared library. I'd like to keep these Foo and Bar in their own git ...
-1
votes
1
answer
514
views
Quartz .net 6 : Execute method does not work
Exetuce method in Ijob is not triggered.
class library code:
public static async void Start()
{
try
{
using (var dbContext = new SqlDbContext())
...
0
votes
2
answers
160
views
Can I use the same function in different ASP.NET pages?
protected void DropDownMainProduct_SelectedIndexChanged(object sender, EventArgs e)
{
string mainProductCode = DropDownMainProduct.SelectedValue;
if (mainProductCode == "0")
{
...