Questions tagged [c#]
C# (pronounced "see sharp") is a high-level, statically typed, multi-paradigm programming language developed by Microsoft. C# code usually targets Microsoft's .NET ecosystem, which include .NET, .NET Framework, .NET MAUI, and Xamarin among others. Use this tag for questions about code written in C# or about C#'s formal specification.
1,619,338
questions
0
votes
0
answers
5
views
OpenIDDict is not generating tables for .net framework OWIN and entity framework
I am implementing OIDC for my legacy application which is based on .net framework v4.6.2. While following the documentation from OpenIDdict website, it does not create tables which OpenIddict requires....
-1
votes
0
answers
11
views
Auto mapper - Unable to create a map expression
Please help... with this error:
Unable to create a map expression from UserGroups.Groups
(HMDS.Web.Models.Groups) to IQueryable1.groups (System.Linq.IQueryable1[HMDS.Web.Models.Groups])
Code ------
...
0
votes
0
answers
15
views
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.1.2.0
I am trying to create a .Net Standard 2.0 library (I am using visual studio 22)
I encountered the following problem while running the project:
Unhandled Exception: System.IO.FileNotFoundException: ...
-3
votes
1
answer
22
views
getting an error "cannot assign void to implicitly type variable"
IWorksheet TestActiveSheet = fpSpread1.AsWorkbook().ActiveSheet;
var image = TestActiveSheet.Cells["A2"].InsertPictureInCell(@"D:\Tmp\Image.png");
image.Sizing = SizingMode....
1
vote
1
answer
51
views
Join tables with condition that all row values are unique
I have tables Machine and Inventory. In table Machine I have last running inventory properties. In table Inventory, I have new inventory id and properties (Not yet run in machine).
I have to return a ...
0
votes
0
answers
21
views
Two different ideas - two different problems. Transparent background works = Click support does not work. How to merge these two ideas?
In the approach below, everything works fine, the logic is processed well by the program, but... It loads my images "with background". The "board" image is displayed, followed by ...
0
votes
0
answers
32
views
Getting error for COM excel when trying to build project in Visual Studio
When I build my project I am getting error saying
The type or namespace name 'Excel' does not exist in the namespace 'Microsoft.Office.Interop' (are you missing an assembly reference?)
In the ....
0
votes
0
answers
14
views
Scaling and Centering an Image using Graphics.Transforms
I am trying to load an image onto a usercontrol. I have no problem doing this. However, the result is never as expected. The image should scale to reach the border with the longest axis and be in the ...
0
votes
0
answers
11
views
template & SMS authentication & recipient fields
i have an envelope that uses a template, to which i want to add SMS authentication.
currently using TemplateRoles (without SMS authentication)
the template determines the order of the signers by ...
0
votes
0
answers
35
views
Method That Returns BOOL Relying on other Service How to Catch Exceptions
Running into a predicament. New to C# but trying to go through and catch all the exceptions that could be thrown.
I am reading Values from a PLC using twincat ADS. If it cant find a symbol/Address it ...
1
vote
1
answer
19
views
Web API - Search SQL data
Error:
The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'CumulativeP1.Models.Teacher FindTeacher(Int32)' in 'CumulativeP1.Controllers....
1
vote
1
answer
27
views
Expression Visitor access property on parameter representing local variable
Trying to write an ExpressionVisitor that would rewrite a query
Starting point
var contractSubjectKey = new ContractSubjectKey(subjectId, rank);
insurance = context.Set<Insurance>()
....
0
votes
1
answer
12
views
What is an analogue of the publishing-to-pushgateway mechanism or another in opentelemetry like in prometheus-net library?
What is an analogue of the publishing-to-pushgateway mechanism class in opentelemetry or another mechanism for sending metrics from a Windows application to the Web application (which collects all ...
-1
votes
0
answers
17
views
If Migration is not sent to the database, UseExceptionHandler Middleware will not work. Why?
I added a new property in a entity class. I didn't create migration. After that, I tried to use UseExceptionHandler middleware. It successfully triggered error action method but the view didn't appear....
0
votes
0
answers
17
views
Issue with app.MapWhen() in .NET Core routing for multiple Angular projects
I have a technical issue with the app.MapWhen() method in .NET Core for handling routes in my application.
Context
I have two Angular v15 projects serving as front-ends for my .NET Core 6 application.
...