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 stand-alone command line compiler that would allow to…
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 other parameters.
Is there a way to get Visual Studio…
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 + there are both 32 and 64 bit versions.
Any solution to…
I noticed that if I write something like:
static void Main(string[] args)
{
const const const bool flag = true;
}
The compiler doesn't warn me of the multiple consts. So this seems to mimic C modifiers, as they are idempotent.
However, if I…
I can see in MS Docs how to change the file alignment for C# compilation (via project settings and the command line).
I have googled and seen articles explaining that a file alignment of 512 Bytes reduces the size of the .dll. I have tested myself…
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\LogUserManager.cs' could not be found …
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 in C++, includes system namespaces in a program
using System;
using…
I'm trying to use VS08SP1's default project system to invoke a C# compile in explicit x64 mode (as distinct from AnyCpu). When I explicitly mark a module as x64, I get a:
warning CS1607: Assembly generation -- Referenced assembly 'mscorlib.dll'…
Using the following simple file:
using System;
public class Program{
[STAThread]
public static void Main(string[] args){
Console.WriteLine("Boo");
}
}
And then using the following command:
csc /target:exe…
Let's say I want to demo to someone about the differences between foreach in C# 4.0 and 5.0.
So I write up my code snippet:
public static void Main()
{
string[] fruits = { "Apple", "Banana", "Cantelope" };
var actions = new…
Why does the code below crash the .NET compiler? It was tested on csc.exe version 4.0.
See e.g. here for online demo on different version - it crashes in the same manner while it says dynamic is not supported…
C# 4, to simplify COM interop, allow callers to COM interfaces to omit the ref keyword in front of arguments for by ref parameters.
I was surprised to see today that this also applies to extension methods that are extending COM interfaces. See the…
I'm using google JSON/Atom Custom Search API now. The problem is the total queries are only 100 per day. Need to pay for extra queries.
Is there any FREE Custom Search API? Maybe from Bing or Yahoo?
Thanks!
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 some simple changes and replaced my machine's…