csc Questions

2

The command dotnet build for a razor page app with .net-6.0 throws lots of warnings like CSC : warning RSG002: TargetPath not specified for additional file: C:\dev\Foo\Foo\Pages\Admin\Administrat...
Epiphyte asked 22/10, 2022 at 9:0

4

Solved

I want to do a build from the command line, but I'd like to get the exact command line syntax from Visual Studio (2012), so that I don't have to manually figure out all of the flags, imports, and o...
Reindeer asked 6/11, 2013 at 20:53

6

Solved

In old .NET we used to be able to run the csc compiler to compile a single .cs file or several files. With .NET Core we have dotnet build that insists on having a proper project file. Is there a s...
Arathorn asked 6/9, 2017 at 2:13

2

I am using Visual Studio Code because it is more lightweight than Visual Studio but still gives me the intellisense. However I could not find a way for Code to build a .csproj or .sln automatically...
Antre asked 22/3, 2017 at 23:18

12

Solved

I am pretty new in C# development and I have the following problem. When I try to build the application on which I am working I obtain the followings errors message: Error 2 Source file 'Log\LogU...
Lowell asked 16/7, 2014 at 8:37

10

Is there a way to get path for the latest .NET Framework's csc.exe? The file usually in: c:\Windows\Microsoft.NET\Framework\vX.X.XXX but the problem is there can be multiple versions installed + t...
Serf asked 12/7, 2011 at 6:54

1

I have just developed a small internal application and I'm using Octopus Deploy as the deployment software. I've been using Octopus for a number of years now without issue. However, I've just hit a...
Avelar asked 20/1, 2020 at 15:36

4

I have a project on TFS that is working on everyone else's machine, except mine. When building I get the error that can be seen in the image. "The specified task executable location csc.exe is inva...
Bosquet asked 3/7, 2018 at 18:23

2

Solved

I'm able to develop .NET Core based C# apps through VS for Mac, and now I've created a "compiler" which generates C# for a language I created. I would like to at least run the output (a single file...
Nauseate asked 5/9, 2019 at 13:24

5

Solved

For some very odd reason, my Visual Studio 2008, when trying to compile a C# project, tries to write the output of the executable to a directory with the same name as an executable, at least it see...
Badillo asked 3/8, 2010 at 14:45

2

I am compiling a basic console app using : C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\csc.exe /t:exe /out:myapp.exe Program.cs Which first prints : Microsoft (R) Visual C# Compiler version 4...
Anthracoid asked 20/4, 2016 at 8:10

3

I've discovered that the csc.exe binary that comes with Roslyn can take a -langversion:<string> command line argument in order to set the version of C# I would like to compile. But how do I c...
Liquorice asked 24/9, 2019 at 14:40

1

Solved

I want to have an overall picture what is the relationship between Visual Studio, MSBuild and CSC? I don't want to understand all of the aspects of each of them. But an overall picture is good. ...
Lavalava asked 9/7, 2019 at 7:38

1

What does the -publicsign option to the C# compiler do? I have read the documentation but still don't understand https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options...
Wargo asked 15/10, 2018 at 14:1

1

Solved

I just upgraded to VS2019 and am unable to build an existing solution. The Compiler generates the following error on some of the projects within the solution: The "DisableSdkPath" parameter is n...
Kalvn asked 5/4, 2019 at 9:27

2

Compiling a Workflow with Visual Studio 2010 and .Net Framework 3.0 results in this CSC error: "resource identifier xxxxxxxx has already been used in this assembly" where xxxxxxxx is a Workflow T...
Batruk asked 26/11, 2014 at 16:51

0

I have added a custom compiler in the build step for my Visual Studio 2017 project using a<CscToolExe>my_compiler.exe</CscToolExe> tag in the csproj file. Everything is working great, e...
Richelle asked 8/3, 2019 at 18:21

10

Solved

I am getting the following error when trying to compile and test any type of project in Visual Studio 2012 Professional. Error 1 The specified task executable "Csc.exe" could not be run....
Shum asked 8/11, 2012 at 20:59

4

Solved

I am wondering whether it is possible to change a .NET console application entry point from Main to Main2 method in the example below: class Program { static void Main(string[] args) { Consol...
Phyletic asked 14/10, 2018 at 7:48

2

I have a simple test console app. The only code it has is public class Class1 { private protected int _value = 0b_1001_0110; } which is just to test whether these C# 7.2 features will build or ...
Crandell asked 1/1, 2018 at 15:1

11

Solved

I want to build projects from the command line. Is it possible to deploy a C# compiler without installing Visual Studio?
Heteronym asked 14/5, 2009 at 3:14

1

I'm playing around with some changes to Roslyn, but unfortunately, even the unmodified solution would crash when I run VisualStudioSetup.Next, with an error trying to load an MS assembly. So I made...
Chemisette asked 24/6, 2017 at 18:35

3

Solved

I am trying to make a simple c# program using Growl C# API. I tried to compile my program in two different ways: I kept my .dll file in the same directory as my .cs file. Than I ran csc /r:Growl.C...
Unchartered asked 23/5, 2012 at 15:10

1

Solved

I'm fairly new to C# and I'm trying to use cmd to compile a basic hello world file called test.cs. It contains the following: // Similar to #include<foo.h> in C++, includes system name...
Peh asked 28/3, 2017 at 21:30

2

Solved

The following C# expression is resulting in a compiler error in my program: $"Getting image from {location.IsLatitudeLongitude ? $"{location.Latitude} - {location.Longitude}" : location.Loca...
Balakirev asked 20/1, 2017 at 11:22

© 2022 - 2024 — McMap. All rights reserved.