Questions tagged [csc]

Csc.exe is the command-line compiler for C# from Microsoft.

Csc.exe is the command-line compiler for C# from Microsoft.

301 questions
2
votes
3 answers

How can I find and use the latest version of CSC.exe when using Visual Studio Code?

I'm setting up Visual Studio Code to write and learn C#. I'm not able to find and use the latest version of C# compiler with Visual Studio Code. Enquiring enquiring my compiler version with the Visual Studio Code terminal command csc -langversion:?…
Olli
  • 31
  • 1
  • 5
2
votes
1 answer

XmlSerializer deserializing bug with CSC.EXE

I created a program that works well on my computer(s) and normally also on other computers. However there is one person which is having a problem when run it and I really don't understand why, the Stacktrace…
Francesco Belladonna
  • 11,361
  • 12
  • 77
  • 147
2
votes
1 answer

Can csc.exe enforce conformance to a particular .net standard?

This question refers specifically to CSC, not msbuild. I can not use msbuild for my project. If I am using csc.exe from a .net5 SDK, can I use it to compile source code and enforce conformance to .net standard 2.0? As in, can I invoke csc.exe so…
papplesharp
  • 272
  • 1
  • 9
2
votes
0 answers

How to get hash of the compiled source files in dotnet core?

I have a .net core 5.0 solution. I would like to ensure that the files were not modified between the source code check out and a compilation step on a build machine. I don't want to re-invent a wheel but couldn't find an existing solution. There's a…
oleksii
  • 35,458
  • 16
  • 93
  • 163
2
votes
0 answers

Is there an efficient way to incrementally update columns of a sparse Armadillo matrix?

I want to gradually add sparse columns to a sparse matrix. Something like: for ( int ieig_insert= 0; ieig_insert < 5000 ; ieig_insert++ ) { arma::sp_vec tempVec( nSources_Total ) ; // nSources_Total ~= 60,000 createColValues( ieig_insert,…
2
votes
5 answers

How do I address this MSB6006 csc.exe error (-2146232797) with VS2019?

I just updated my VS2019 community edition to Version 16.7.2. My project started failing to build (maybe link step?) with this error (it was previously building just fine, I think on v16.6.something): > Severity Code Description Project File …
D. A.
  • 3,369
  • 3
  • 31
  • 34
2
votes
1 answer

How to include app.config file with fsc.exe (F#) or csc.exe (C#)?

I have a console application that uses an app.config file however I can't figure out how to include that in the command line parameters so that the output will create the Program.exe.config when I compile it programmatically with fsc.exe. Right now…
Beaker
  • 2,804
  • 5
  • 33
  • 54
2
votes
2 answers

How does the Roslyn C# compiler know where to find .NET assembly files?

I've downloaded a copy of Roslyn using nuget.exe into a empty directory on my computer. I've then created a few small test files in C# to play with the compiler. In my code, I'm using features from the .NET Framework such as SqlDataReader. When…
2
votes
0 answers

Overcoming MSBuild verbosity when logging from custom C# compiler in Visual Studio

I have added a custom compiler in the build step for my Visual Studio 2017 project using amy_compiler.exe tag in the csproj file. Everything is working great, except that I can't figure out how to make the compiler properly…
2
votes
1 answer

C# can't find namespace vs code

I'm just learning C# so I don't know if I'm just messing up the setup or what, but I used dotnet to create a new project where I'm keeping ALL of my little test scripts. I'm using VS Code as my editor. I create a path variable for csc to compile. I…
Peter Nguyen
  • 129
  • 2
  • 7
2
votes
0 answers

Csc.exe running in AppDomain is getting arguments from caller's command line

I'm trying to run csc.exe (the C# compiler) from within an AppDomain created from my executable. However, what I'm seeing is that any argument passed to my executable also seems to be passed to csc.exe, even though I'm not providing any…
Nathan
  • 1,591
  • 4
  • 17
  • 22
2
votes
0 answers

csc stopped working in visual studio 2017 IIS Express

in visual studio i'm working with asp.net core i have created a new MVC Project but when i tried to run it on IIS Express it gives error CSC.exe has stopped working it shows this error when i click close this program then this error i have tried…
Faisal
  • 584
  • 3
  • 11
  • 33
2
votes
2 answers

CSC compiler error in Sitecore application

We have an issue where the editors in Sitecore experience trouble with change language in the Content Editor. This happens because a compiled dll was not found. Exception: System.IO.FileNotFoundException Message: Could not find file…
Dinirex
  • 105
  • 1
  • 10
2
votes
1 answer

COO to CSC format with the same I,J vectors

Right now, I am calling K = sparse(I,J,V,n,n) function to create sparse (symmetric) K matrix in Julia. And, I am doing this for many steps. Due to memory and efficiency considerations, I would like to modify the K.nzval values, instead of creating…
berkin
  • 33
  • 5
2
votes
2 answers

minimal self-contained WPF/C# for generating splash screen that displays for x seconds

I'm wondering, why doesn't my splash screen disappear after x seconds in the code below? In C#, I start a thread, that waits x seconds, then tries to dispatch a close() to the splash window while its being shown on the screen. // FILE:…
Bimo
  • 5,987
  • 2
  • 39
  • 61