Questions tagged [c#]

C# is a programming language. Questions about programming are off topic. Please direct these questions to Stack Overflow.

Filter by
Sorted by
Tagged with
0
votes
0answers
21 views

UI Automation Events on Powershell

I'm trying to listen UIAutomation events using Powershell, and wrote somethings like this. $propChangeHandler= [System.Windows.Automation.AutomationPropertyChangedEventHandler] # <summary> # ...
0
votes
0answers
6 views

how to execute a process while system starting using c# service [migrated]

I have a c# service i need to execute a particular process while device is starting. How can i do this using c#. I don't know how to detect windows is starting. System.Diagnostics.Process proc = new ...
0
votes
1answer
32 views

What is the OpenSSL equivalent of this given C# hashing code?

I've got C# server code which verifies a hash using the following logic. I have no control over the server code and cannot change it. string key = "xZBn34L4myg[...]cebvr7A=="; var hmacSha256 = new ...
0
votes
1answer
42 views

How to install .Net v4x framework in Windows 10 when v4 installation is blocked?

OS: Windows 10 64 bit 10.0 Build 18363 After recent windows update .NET v4 frame work using software's stopped working. While trying to install the v4.8 or 4.7.2 .NET framework Getting the message ...
1
vote
1answer
30 views

How to uninstall/install the nic card, network properties protocol using powershell command or windows command line?

I need to uninstall/install the protocol list in the nic card network properties list through command or code. I tried the below command it's list the network properties list only. Get-...
-1
votes
1answer
15 views

Allow only two instances of a character using RegEx

I am new to using regular expressions and I am trying to figure out something that would seem to be pretty easy. I would like to identify if a character exists only twice within a string. The ...
0
votes
0answers
81 views

C# Unity Client SocketException: Connection refused

I got referred here from StackOverflow. When I try to run an application on Unity, I get an error (SocketException: Connection refused) on the line: using (TcpClient tcpClient = new TcpClient("127.0....
2
votes
0answers
44 views

update assembly version on git commit in Visual Studio

I am facing a nightmate of keeping track of not one, but 5 applications that regularly update and work together in tandem. On each update, I must manually update AssemblyInfo.cs file with ...
0
votes
0answers
20 views

How do I conditionally hide a title when the field below it is empty?

I'm updating an existing Word template that is used to generate a PDF programmatically, based on functional data. In the template there is: Country {FIELD companyCountryDisplayName} The backend ...
0
votes
0answers
15 views

Hide “You're about to be signed out” pop-up [duplicate]

I would like to hide pop-up that appears when I use Process.Start("shutdown.exe", "-r -t 1"); Any ideas?
1
vote
1answer
107 views

Udp packages bigger than 1472 are not being received

I have a c# client app. It sends data to my server using UDP. However, this stops working after I upgrade to Windows 2019 Server. the reason it stopped working is contained in this link: https://...
1
vote
0answers
154 views

Disable playback/recording device programmatically (cmd, c#) Windows

I am trying to disable the microphone from cmd or c#. I tried to use devcon.exe, but it disables the device in Device Manager but not in the sound properties. I tried to write to the registry: reg ...
1
vote
0answers
31 views

Jenkins with .net core, angular 8 and postgre

My question is related with automation. In our project we are using BackEnd- .Net Core 2.2 (right now in localhost but will be dockerize) FrontEnd- Angular 8 (right now in localhost but will be ...
0
votes
0answers
135 views

Omnisharp not working on Manjaro Linux

today I've installed .NET Core 3.0 on my newly setup Manjaro system but I get an error everytime I want to open a Project with VS Code. The following is the output of "dotnet --info": .NET Core SDK ...
0
votes
0answers
16 views

bug c# XML comments dosn't show params in vscode and visual studio

When I type "///" intellisense adds an XML comment. /// < summary > /// this function writes the value of an object to a file /// < /summary > /// < param name = "objects" > input parameter ...
-1
votes
1answer
33 views

My exe file is autoclosing after start

I wrote application in c# and when I try to open it on VM (vmware 15.1) in task manager i can see that it starts, then changes status to stopped and then autoclosed. I need to add that when I try to ...
1
vote
2answers
1k views

Edit and continue not working for asp.net core 3.0 with VS 2019 (C#)

I have VS 2017 latest Community edition installed on my machine. I was able to edit any class file and razor pages (cshtml) of my ASP.Net Core web application while debugging. I installed VS 2019 ...
0
votes
0answers
25 views

How to Create a single setup file for many of them?

I've written an C# application that must run on Windows and I want to create a single setup file for my customers. The Packages that I want to inclusion in the setup file are: vcredits ...
0
votes
0answers
31 views

Force application_start code in global asax cs to run

I can't seem to get my application_start code to run on my web host as per: I have a simple ASP.NET Web API project on my development machine. Everything is fine on the machine. I have not changed ...
0
votes
0answers
11 views

Website in web hosting service and DB in local server

I have my webapp (ASP.NET) and database (SQL SERVER) in my own server. I plan on moving the website to a web hosting service like GoDaddy but I need to keep the DB in my server. Is there a way to get ...
0
votes
0answers
20 views

Visual Studio 2019 show errors on source files which are building properly

I have Visual Studio 2019 Installed and I noticed that I receive build errors in csx files are opened. However the solution does build successfully but when I got to the file I see a lot of red lines. ...
1
vote
1answer
42 views

Open a spreadsheet with broken formulas

I am using code the generate a spreadsheet, including a formula for a cell on certain rows. When I do this, there is something wrong with the formula, and when I try and open the spreadsheet, Excel ...
0
votes
1answer
55 views

CS-Script for SublimeText not working (C# Intellisense)

I'd like to use C# Intellisense for SublimeText 3 (OS X). I need it to develop games with Unity3D. So I installed OmniSharp and CS-Script for it. OmniSharp works so far but CS-Script doesn't. When I ...
1
vote
0answers
56 views

Visual Studio Code not opening c# files

In Windows, if I double-click a C# cs file, or select "Open With Code" from the context menu, the file isn't opened in VS Code, even though it immediately appears in the "Recently Opened Files" list ...
0
votes
0answers
6 views

Blocking files from network location

I developed small windows service for my company's needs, and I recieved claim about files being blocked(exe, and dll distributed via mail), so user have to go to the properties of each exe or dll and ...
1
vote
0answers
119 views

What is C# RSACryptoServiceProvider doing under the hood when Encrypting using RSA?

When I drill down into the .Net source code I cannot find the code that actually runs when rsa.Encrypt is called, maybe it's running code within a DLL because I cannot find where the method is ...
0
votes
0answers
98 views

CAST (scope_identity () AS int) returns a bad value MS SQL

I have been developing a program for a long time which, after executing SQL INSERT using CAST (scope_identity () AS int) returned the new id number like this: EndID = (Int32) cmd.ExecuteNonQuery (); ...
0
votes
0answers
72 views

ffmpeg image2pipe input showing win32 IO BROKEN_PIPE C# unity3d

I am trying to create a mp4 file from live screen capture image bytes, and i get error as "System.IO.IOException: Win32 IO returned ERROR_BROKEN_PIPE. Path: D:\My_Projects\ffmpeg_test[Unknown] at ...
1
vote
0answers
188 views

Building managed Assembly-CSharp dlls for standalone build without Unity Editor

I have a working Unity-made linux standalone build I created. In this build, there is a folder of Managed code where the dlls are stored. Two of the dlls are the Assembly-CSharp.dll and Assembly-...
0
votes
0answers
5 views

Steps to force user to have a key file local to their computer in order to run an executable

I've made a program in c# that I want to distribute, but I want the user to be forced to have a keyfile (.PEM, .PPK, etc...) local on their machine in order to use it. I don't need to know how to ...
0
votes
0answers
175 views

Spec Flow Scenarios are not showing in Test Explorer for Visual Studio 2019

I have the following Packages: I have tried the by deleting the temp ...
0
votes
1answer
117 views

Visual Studio Community does not recognise double type

using System; namespace Excellent_Result { class Program { static void Main(string[] args) { double grade = double.Parse(Console.ReadLine()); if (...
0
votes
1answer
53 views

Randomly Failing Azure SignalR Auction Hub Method

Thank you ahead of time. I can't figure this out. It worked 100% of the time with the local signalr but if I use the Azure Signalr service it randomly has an error like this: Error: There was an error ...
0
votes
0answers
17 views

How can I set up an explorer context menu entry to open multiple selected files of different specified types in my program?

I have an application (a music player) which can receive a list of file and/or folder paths. If I click and drag the files and folders onto the application, it runs them fine, but I want to add an ...
0
votes
0answers
26 views

Asp.net application - Key not valid for use in specified state - ELB

I've deployed my ASP.net application (.net 4.7) to a couple of amazon ec2 instances, and set up a classic load-balancer. I enabled Sticky Sessions (LB managed) and configured the machine keys to be ...
0
votes
0answers
99 views

Different behavior of C# WPF DataGrid on different computers

I have a problem troubleshooting what's wrong with software I've been working on. This is my company's code so I can go into details (pasting code and so on). Anyway - I have a piece of C# & ...
0
votes
0answers
124 views

Anaconda's ml-agents gives me a KeyboardInterrupt error

https://section31.jp/gamedevelopment/unity/ml-agents081001/ https://www.fast-system.jp/unity-ml-agents-version-0-8-0-howto/ I got a KeyError with ml-agents0.9.0 referring to the above two sites. When ...
0
votes
0answers
38 views

.Net core 2.0 lucene 4.8 query special characters don't work

I'm indexing a file using the code Analyzer analyzer = new StandardAnalyzer(LuceneVersion.LUCENE_48); IndexWriterConfig iwc = new IndexWriterConfig(LuceneVersion.LUCENE_48, analyzer); iwc.OpenMode = ...
0
votes
1answer
1k views

Vscode … Unable to generate assets to build and debug. OmniSharp server is not running

I have a problem and searched over the internet and tried their solutions but nothing happend. When i try to debug my code in VSCode , nothing happens. I found in Debug menu there is no configuration ...
0
votes
1answer
20 views

Restrict IE from asking save dialogue pop up and it should save automatically in selenium c#

Have added image for referenceAm automating a functionality where on button click the IE download the file with a dialogue box pop with save /open and cancel instead i want to download the file ...
0
votes
0answers
39 views

Long compiling time on new laptop

I have recently bought a new computer and I have a little annoying problem. After installing Visual Studio 2019 I tried running some basic programs to check whether it works as expected. It turns out ...
0
votes
0answers
64 views

OnBase Unity Editor and Visual Stuidio

I started a new job which requires me to write some c# scripts for OnBase. OnBase is an enterprise document management tool. OnBase has a development tool called OnBase Studio which is utilized to ...
1
vote
2answers
1k views

Step Back to previous line in visual studio code

Is there any way to step back to previous line in Visual Studio Code while debugging c# , just like drag to previous code or any line in visual studio 17 or 19 in windows?
0
votes
1answer
57 views

Visual Studio 2017&2019 > User Control + Started Timer = Crash :|

When I add a Timer to User Control with Visual Studio 2017 Or 2019 and Start() it the Visual studio Crash when add the User Control contains a Working Timer to a Form.
0
votes
0answers
10 views

Setting up Jetbrains Rider and Google OR-tools on Mac

I recently started programming in C#, and started using the Rider IDE from JetBrains. I want to experiment with Google OR-tools, which should be possible to do in C#, but I don't know how to include ...
0
votes
0answers
20 views

Connection to Google Cloud

I want to connect to a sql database in google cloud. I always get the error message:"SSL Connection error." if I want to connect. How can I limit the error? My stringbuilder: Server = ...
0
votes
0answers
9 views

How do I deal with JAR executable files? Using Main-Class and the Class-Path?

I am new to handle the JAR files, I have below requirements. I have set off.JAR executable files, the purpose of this JAR file is to communicate to the UDP server. Below is MANIFEST.MF file. ...
0
votes
0answers
42 views

About get ManagementObject int ManagementObjectCollection by foreach is too slowly

I want to get port name, but When I change another product, the serial port name also changes. So I need Location Information or Address to get the port name, here the problem, it is too slowly to get ...
0
votes
0answers
5 views

System.ArgumentException when Configuring Service Reference In VS

SUMMARY At my company I am currently in charge of migrating over our old WCF Platform over to Dell Boomi's new platform. In order to do so I have to update all services inside their respected ...
0
votes
0answers
20 views

(c#) Some garbled in Sublim Text3 Console

I don't know why if i use c# to run,i always meet some garbled in my Sublim Text3 Console? (1) my c# path is

1
2 3 4 5
7