After switching to Visual Studio 2015, we have noticed that some changes made to how lambdas are compiled to MSIL in Roslyn (described in this thread and on GitHub) introduce runtime failures under certain conditions.
Since Roslyn is obviously the…
I want to know about how msbuild.exe execute a C# application.
As i searched in google i came to know csc.exe,PE File, JIT, IL File. And msbuild.exe internally calls csc.exe to compile a C# Application. So I opened csc.exe in reflector. But There is…
My application generates a bunch of serialization assemblies on start up. In this case I am getting an error because the XmlSerializer is failing to generate one of the serialization assemblies. I can go and check the temporary code file being…
I'm upgrading a solution from .NET 2.0 to 3.5. One of the projects is a code-generator app that is compiled and then executed via a post-build event. When it is run, it generates some code and invokes csc.exe to compile the generated code. The way…
The #line processor directive in C# increases the line number for each line to the end of file or until it reaches another #line processor directive; an auto incremental line number.
That was interesting! For example:
try
{
#line 110
act();
…
Is there a way to run csc against a folder other than the current working directory, or is the best practice to copy .cs files to the current working directory and then run csc?
I'm using a System.CodeDom.Compiler.CodeDomProvider.CreateProvider("CSharp") to compile C# classes on the fly. Recently I've switched from Visual Studio 2010 to Vistual Studio 2012. I also uninstalled SQL 2005. Since these events I've been unable to…
I usually use web applications in Visual Studio and the MSBUILD taks in Nant builds them without any problems:
arg value="/property:Configuration=release" />
I now have a website (not a web…
For example when you introduce an static class in your source code, csc compiler turns it into a sealed abstract class (Correct me if I am wrong, please).
But how about Interface; Does the CLR knows what an interface is? Or compiler converts it to…
I'm having some trouble with namespacing for a web application project - front-end files are being compiled into separate assemblies under the ASPX.directory1_director2_directoryn_filename namespace format and I want everything in one dll.
I found…
The entire solution builds fine in Visual Studio, but when I run the Nant script to compile the website I get several errors on this line:
string[] qs = (Request.QueryString["e"] ?? String.Empty)
.Split(new[] { '?' },…
I can build my project with the following command...
csc /reference:lib\Newtonsoft.Json.dll SomeSourceFile.cs
... but when I use this command...
msbuild MyProject.csproj
... with the following .csproj file my .dll reference isn't included. Any…
I'm using an overload of String.Split that the docs says is a valid overload (string, then StringSplitOptions).
string separatingString = "<<";
string text = "one<
I enabled XML documentation generation for my project.
true
This generates a lot of warnings for my project because I don't compulsively add or update the XML…
I am compiling a simple hello world .NET Core (net5.0-windows) app with MSBuild.exe.
Every time I build, I get the following warnings:
CSC : warning CS1668: Invalid search path 'C:\Program Files (x86)\Microsoft Visual…