Skip to main content

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.

c#
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....
Snake_Eyes's user avatar
-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 ------ ...
Preet's user avatar
  • 992
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: ...
Ranel's user avatar
  • 1
-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....
jyoti Chawla's user avatar
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 ...
lawd's user avatar
  • 15
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 ...
Layla98's user avatar
  • 27
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 ....
sriram srinivasan's user avatar
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 ...
Keerry King's user avatar
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 ...
symbiont's user avatar
  • 1,504
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 ...
CG33's user avatar
  • 15
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....
Flora Jiang's user avatar
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>() ....
Matus's user avatar
  • 179
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 ...
Ксения Юдина's user avatar
-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....
Onur's user avatar
  • 1
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. ...
Antoine a.k.a Zesso Renoux's user avatar

15 30 50 per page
1
2 3 4 5
107956