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
1 answer
17 views

How to install and use a project template using dotnet CLI

I recently made a reddit post in which I was asking about how to disable implicit usings in Visual Studio 2022. From that post I understood a couple of things: This can only be done per project basis ...
user avatar
  • 157
-1 votes
0 answers
8 views

What Open-source SAST Static code analysis good for Security [closed]

I am trying to find an open-source security static code analysis, to check the security flaws and vulnerabilities in a source code. code language is dotnet C# I found many options like SonarQube. but ...
user avatar
  • 1
0 votes
0 answers
59 views

Can't build projects anymore after installing visual studio 2022

When VisualStudio 2022 is installed on the system I cant build projects anymore that have .resx References like this in the XAML code: {x:Static local:Resources.ITEM} It shows the Error: Error ...
user avatar
0 votes
1 answer
25 views

How do I disable "GroupBy" for searches via registry in Windows?

I'm building a tool to override the worst decisions Microsoft made for Windows which includes all things "group by". Thanks to a previous question, I have the registry arrangement used for ...
user avatar
0 votes
0 answers
55 views

Is there a way to stop VSCode from opening the OUTPUT tab each time I open a C# file for the first time?

I noticed that when I start VSCode and open any C# file, the OUTPUT tab always opens with this super annoying message: Installing C# dependencies... Platform: linux, x86_64, name=ubuntu, version=20.04 ...
user avatar
  • 113
0 votes
0 answers
25 views

Attach to running process in windows

I am working with application A, which I launch in the terminal. Before Process A finishes to run, it launches process B on a separate terminal. From this post: https://stackoverflow.com/questions/...
user avatar
  • 3
0 votes
0 answers
50 views

How to know if a computer is being used remotely

Is there a way to know that a computer (win10) is currently being controlled remotely? (via RDP) -And if so, can I know the user-name connected to it? I have several computers that me and my coworkers ...
user avatar
  • 1
1 vote
0 answers
121 views

Enable Windows Defender Tamper Protection using PowerShell or C#

I understand completely that it's not possible to disable tamper protection programmatically, as this would defeat the point. Though, seeing as it's possible with an InTune or Endpoint license, then ...
user avatar
  • 163
0 votes
1 answer
237 views

How can I intercept the content's of a window's spool file?

I have files being printed from a client's computer and would like to intercept and archive the printed file as text or pdf. The client will most likely be using a specific software to print and I do ...
user avatar
0 votes
0 answers
30 views

I can't run an exe file completely hidden

I tried to run a program called MSIAfterburner with no windows But nothing works I tried Quiet.exe Nircmd.exe I tried some python scripts and JavaScript & Powershell and VBS. And every time it was ...
user avatar
0 votes
0 answers
102 views

Need help on possible causes of FTP client timeout

My company is hosting a FTP server through Windows IIS. We have a client program (Windows Form program written in C# programming language) which is installed on our client's server for downloading ...
user avatar
0 votes
0 answers
74 views

Automate Windows Hello PIN setup

I am investigating the feasibility of deploying Windows Hello in a busy work environment. The area contains 40+ shared PCs, with 200+ roaming users. Also, a subset of the users are replaced regularly (...
user avatar
  • 1
0 votes
3 answers
124 views

Connect a socket to another PC in same NAT

Hey I've got two machines on the same network. They get their IP info back from an external webserver. Same IP due to NAT but different ports locally. Hmm that's weird.. they can't socket up or even ...
user avatar
  • 11
2 votes
1 answer
529 views

Net User information VS Get-ADUser

Very generic question regarding different output for Net User, and Get-ADUser. What is really going on "under the hood" when I run each command? I bring this up only due to getting different ...
user avatar
0 votes
0 answers
26 views

Application crashes with error could not create ssl/tls secure channel

I contacted the customer care and this is what they have to say - kindly make sure that the SSL certificate used for the SMTP service offered by the Microsoft Exchange Server is not expired and the ...
user avatar
0 votes
1 answer
45 views

C# Math.POW and Manually calculating are coming out with completely different answers... Can anyone tell me why? [closed]

Forgive me if this is already on here somewhere but I couldn't find it. SO, I am doing a simple calculation. double radius = 2.50; //double pi = Math.PI; //double areaOfCircle; double radSquared = ...
user avatar
0 votes
1 answer
60 views

Attack on a Linux file server | What is the damage of this file contents?

TCP Networking This file was uploaded using a loophole in a file uploading network program I was writing. The ability to access the server itself was too simple and the techniques I used resulted in ...
user avatar
  • 11
0 votes
4 answers
325 views

developing a CLI C# application without installing 16GB of Visual Studio?

I'm trying to develop a simple C# to test some interoperability stuff and to that end I'm trying to install Visual Studio Community 2019. To that end the only two options I have selected are as ...
user avatar
  • 5,910
2 votes
1 answer
22k views

The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Authentication Required

I'm attempting to send email using G Suite's SMTP relay service. Using C#, my code snippet looks like this: string message = "<em>It's great to use HTML in mail!!</em>" var ...
user avatar
  • 143
0 votes
1 answer
448 views

System.UnauthorizedAccessException with VSCode 1.48.1 and C# exception

Running the latest Visual Studio Code (v1.48.1 at the time of posting this) with C# Extension, I'm seeing this errors: Razor.VSCode version 6.0.0-alpha.1.20418.9 ... [Error - 4:20:16 PM] Server ...
user avatar
  • 2,171
3 votes
1 answer
3k views

Better Windows mouse sensitivity multiplier control?

(I know this question has been posted before; I reposted a more detailed explanation on the situation because the previous question isn't answered and has over 6k views.) The mouse speed Windows ...
user avatar
  • 33
0 votes
0 answers
34 views

Sandboxing a program under windows

I was searching on internet for an easy way of sandboxing an application under windows. Apparently there isn't an easy way of doing it in a comnplete way. I did find an application on github that does ...
user avatar
  • 119
1 vote
1 answer
308 views

Ctrl + V paste UTF-8 string from Clipboard to MS WORD result in ??? characters

I've develop application on Windows form [C#], then copy text using System.Windows.Form.Clipboard.SetText("โปรแกรม Microsoft Word ใช้งานได้"); After sending keybd_event "Ctrl+V" [...
user avatar
1 vote
1 answer
441 views

Error "The User Profile Service service failed the sign-in. User profile cannot be loaded"

I have a trouble when run win 10 "The User Profile Service service failed the sign-in. User profile cannot be loaded" I tried the way, but not working And now, My PC just working in command promt ...
user avatar
0 votes
1 answer
654 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 ...
user avatar
  • 179
0 votes
1 answer
1k 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 ...
user avatar
  • 101
1 vote
1 answer
862 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-...
user avatar
-1 votes
1 answer
373 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 ...
user avatar
  • 9
2 votes
0 answers
500 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 ...
user avatar
1 vote
1 answer
510 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://...
user avatar
2 votes
0 answers
830 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 ...
user avatar
  • 141
1 vote
0 answers
48 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 ...
user avatar
1 vote
0 answers
308 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 ...
user avatar
-1 votes
1 answer
37 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 ...
user avatar
3 votes
2 answers
4k 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 ...
user avatar
  • 81
0 votes
0 answers
28 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. ...
user avatar
  • 1
1 vote
1 answer
68 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 ...
user avatar
  • 2,422
0 votes
1 answer
241 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 ...
user avatar
  • 101
1 vote
0 answers
240 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 ...
user avatar
  • 11
1 vote
0 answers
316 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 ...
user avatar
  • 11
1 vote
0 answers
305 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-...
user avatar
  • 11
0 votes
1 answer
655 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 (...
user avatar
0 votes
1 answer
119 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 ...
user avatar
0 votes
0 answers
186 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# & ...
user avatar
  • 1
1 vote
2 answers
12k 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 ...
user avatar
0 votes
1 answer
25 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 ...
user avatar
  • 1
0 votes
1 answer
164 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 ...
user avatar
  • 101
2 votes
2 answers
5k 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?
user avatar
0 votes
1 answer
136 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.
user avatar
  • 1
0 votes
0 answers
126 views

C# app corrupts cortana and other windows apps

I wrote an update for one of my C# apps, basic bug fixing stuff like Empty-Checks for textboxes and UI make up, no new features, same external DLL versions. While testing it on my VM's I noticed ...
user avatar

1
2 3 4 5
7