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
0 answers

CSC.exe hanging while building code

I have a solution developed in VS 2013 containing some 20 odd projects which used to build fine initially but now for past couple of days we are facing an issue where the build randonly hangs. I looked up in Task manager and noticed the process…
abhu85
  • 33
  • 3
2
votes
3 answers

Build project in VS2015: "csc.exe" exited with code -1073741571

I was using Visual studio 2013. Yesterday, I installed VS2015(enterprise update 3). The build process for my solution crashes in VS2015 for one of the projects. The same exception occurs with VS2017 RC. The solution was building succesfully in…
oOnez
  • 887
  • 2
  • 11
  • 23
2
votes
1 answer

Visual Studio 2015 Error: “csc.exe” exited with code 255

Every time I try to run my code, I am having this error: "Csc.exe" exited with code - 255. I removed and re-installed Visual Studio 2015 and it did not help.
ymax
  • 31
  • 1
  • 7
2
votes
1 answer

Using routing with webforms - CreateInstanceFromVirtualPath sometimes very slow

I am using routing with my ASP.NET WebForms application, using the technique described by Phil Haack: http://haacked.com/archive/2008/03/11/using-routing-with-webforms.aspx This works well most of the time, however on on occasion the first call to…
Richard Ev
  • 52,939
  • 59
  • 191
  • 278
2
votes
2 answers

Different IL generated when adding one more int variable

I have this program in c#: using System; class Program { public static void Main() { int i = 4; double d = 12.34; double PI = Math.PI; string name = "Ehsan"; } } and when i compile it, following is the IL generated by…
Ehsan Sajjad
  • 61,834
  • 16
  • 105
  • 160
2
votes
1 answer

What does the acronym csc in csc.exe stand for?

A silly question, my google-fu is failing me, I know that the csc.exe is the command line compiler, but I am curious what the letters csc are an acronym of?
Paul Spencer
  • 860
  • 5
  • 14
2
votes
0 answers

Visual Studio 2015 Error: "csc.exe" exited with code -1

If I try to debug an application in VS2015, I Always get the error "csc.exe" exited with code -1. If I try another project (winforms/console application/...) I always get the same error. I previously had VS2008 installed for developing apps for WIN…
Marcel
  • 917
  • 3
  • 19
  • 48
2
votes
0 answers

Visual C# command line compiler has stopped working - can't compile anything

I am getting an error of Visual C# command line compiler has stopped working It's not the same as this one Visual C# command Line compiler has stopped working because that one says it happens with specific projects.. Clearly my one happens with…
barlop
  • 12,887
  • 8
  • 80
  • 109
2
votes
0 answers

How can I set the target .Net Framework version (.Net 4.0, or .Net 4.5, or .Net 4.5.1) when I use the tools (csc.exe) manually?

Each of .Net Framework version has own versions of csc.exe, msbuild.exe, etc. On my notebook all .Net Framework versions (newer than .Net 1.0) are installed. I see such directories: I created some new Windows-variables: %NET30% =…
Andrey Bushman
  • 11,712
  • 17
  • 87
  • 182
2
votes
1 answer

How does the MSBuild CoreCompile Target Identify Reference Assemblies

Can anyone shed any light on how the CoreCompile task in TFS2010 (RC) Microsoft.TeamFoundation.Build targets generates the assembly references that are passed to csc.exe? We are seeing references to both version 2.0 and 4.0 of System.Xml.dll (shown…
Nick Heppleston
  • 1,973
  • 11
  • 18
2
votes
2 answers

Compile a separate C# file against older .NET framework

I have a short C# script that uses various features of the languages and different .NET libraries: using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.IO.Compression; using System.Net; using…
imslavko
  • 6,596
  • 2
  • 34
  • 43
2
votes
1 answer

Error referencing System.Web.Mvc from csc in Visual Studio 2010 RTM

csc /target:library /reference:System.dll,System.Web.dll,System.Web.Mvc.dll Foo.cs Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1 Copyright (C) Microsoft Corporation. All rights reserved. error CS0006: Metadata file …
ripper234
  • 222,824
  • 274
  • 634
  • 905
2
votes
0 answers

How can I prevent my application from causing a 0xc0000142 error in csc.exe?

The application in question is written in C#. We are late in the development cycle, close to launch on our application. One of my coworkers is seeing the following issue: When he logs out of his Windows 7 session while the application is running, he…
danBhentschel
  • 863
  • 7
  • 24
2
votes
3 answers

Does msbuild come with a compiler?

I know that Visual studio internally uses a tool called msbuild to compile C# code. Does msbuild internally use csc.exe (that comes with the .net framework) for compiling code? Or does Visual studio come with its own compiler? Update (A little…
Foo
  • 4,206
  • 10
  • 39
  • 54
2
votes
1 answer

Generating two dlls from one project in csproj

I need two dlls General.BL and General.UI from one project. I am getting an error on General.UI.dll. Error is: The type or namespace name 'Window' could not be found (are you missing a using directive or an assembly reference?)
Ahror Kayumov
  • 433
  • 4
  • 18