Category "c++sharp"

How can I generate .csproj Project file only in C# Console App?

I already have a Program.cs in the folder/directory and no other files. When I do dotnet new console, it won't let me create it unless I use --force to overwrit

How can I generate .csproj Project file only in C# Console App?

I already have a Program.cs in the folder/directory and no other files. When I do dotnet new console, it won't let me create it unless I use --force to overwrit

Synology File Station API C#

I encounter a trouble with the file station API using RestSharp I would like to upload a file, I follow the document describe in the official API doc ( here ) T

Transforming JSON template based on JSON values posted into API

I have got a requirement of building an azure function which transforms data in our COSMOS DB based on the value posted by a calling service. So consider this J

Azure Functions: StatusCode cannot be set because the response has already started

I am trying to stream data from my Azure Function and all is fine but I get an error after it has executed. This is the code: [FunctionName("QueryData")] public

Horizontal movement of player causes egregious numbers when checking vertical velocity

Player movement is working (at least somewhat) now, however one issue remains, and that's the insane numbers the y velocity of the Rigidbody2D on the player. Si

Serilog with Graylog not logging

I have a Web API and I'm trying to log messages into Graylog, using Serilog. Now matter what I do, no messages are shown in my Graylog application. This is what

Cannot implicitly convert type void to microsoft.win32.registrykey

Error: cannot implicitly convert type void to microsoft.win32.registrykey Code: using Microsft.Win32; RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Sofwar

system.security.cryptography.protecteddata ,this error I'm getting in code build time. I'm was added Nuget package related to cryptography

Error MSB3027 Could not copy "C:\Users\surendra.reddy.nuget\packages\system.security.cryptography.protecteddata\4.5.0\runtimes\win\lib\netstandard2.0\System.Se

Cannot authenticate using API Key with NLog.Targets.ElasticSearch

I cannot get NLog.Targets.ElasticSearch to connect to a local ElasticSearch instance using an APIKey. My nlog.config has the following: <target xsi:type=

Cannot get Alerts to show on iPhone no matter what way I code it and I have tried 4 different ways

Of these 4 methods mentioned, they all work in the simulator, but non of them work on the iPhone. Here are the pieces of code that come into play here. <List

How to validate list of email in winform C# with specific rules

Mine concern is the following. I have these 2 classes : public class Campaign { public string name { get; set; } public string description {

Molecular MC simulation is not equilibrating

Suppose, a polymer has N monomers in its chain. I want to simulate its movement using the bead-spring model. However, there was no periodic boundary condition a

Backingfield is null in EF Core 3.1 , Lazy loading enabled

I am using Lazy Loading in EF core 3.1 and when i try to get the navigation data,it doesn't load. public class Template { private readonly List<Spec>

Convert a short DateTime string with date and time to DateTime

Having trouble with my Android project here trying to convert a string of DateTime into an actual DateTime object. here's the code I wrote: string strDateTime =

Converting SQL Server DataRequest class to NpgSQL

Trying to convert a SQL Server DataRequest class for use with PostgreSQL. Stuck on the DBTypes in this code. Can anyone give me a hand in this conversion? /// &

Non-nullable enum as generic parameter [duplicate]

I am trying to implement this helper function in C# 7.3: public static T? ToEnum<T>(this string enumName) where T : Enum =>

Addig User And Role to my UserRole table - Never used column name is missing

I am trying to add Role to my User and store the UserID and the RoleID in the UsersRoles table. var userRole = await _roleManager.FindByNameAsyn

NUKE Build: Could not find a suitable MSBuild instance (Visual Studio 2022)

After upgrade Visual Studio 2019 to 2022, I got the following error when I try to build the project with NUKE Build (Debug/Release): ╬═══

RestSharp baseUrl with a space

I google it and I pass hours try figure how to do it and I can't figure: I try get Response from web Api with RestSharp v107 in .net 5 Is works well when I do t