I have a single C# file (Source code.cs) that I compile with a PowerShell file (Compile.ps1) using Microsoft's compiler:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe -out:"Program.exe" -target:winexe "Source code.cs"
It creates the…
I have a test project that built successfully in VS2015, but the build fails due to a StackOverflowException when I attempt to build it in VS2017/2019. The final statement printed in the diagnostic log at the point before the exception occurs is…
I am using team city to call a nant script, currently this nant script is very simplistic and only calls an msbuild task on a single project in the solution.
The build is failing, it looks like msbuild 3.5 is being called, but it is incorrectly…
If I need to use microsoft C# compiler from the normal command prompt, it says right here how and it says right here how I set the environment variable (by running VSVARS32.BAT). I execute it and after that I can run "csc" (the compiler). However…
CSC error CS0006: Metadata file
'C:\BuildAgent\work\cbcbc45410f50008\Output\bin\Release\abc.xyz.dll'
could not be found.
On a teamcity build that worked fine until now, the build starts intermittently failing for the CS0006 error.
I see a lot…
I am having am having or have run into a very strange thing.
I wonder if others have and why it's happening.
Having run a one line program with this line System.Console.WriteLine(System.Console.OutputEncoding.EncodingName); I see the Encoding is…
I have a method that returns an IEnumerable. I call this method form two places, and in one of those places I do not do anything with the results.
It looks like the C# compiler removes the call to that method even if I decorate it with…
I am compiling a project using csc.exe, with the /analyzer: flag pointing to the paths of ErrorProne.Net.CoreAnalyzers.dll and ErrorProne.Net.Core.dll, which are built from my clone of the library here.
However, I see several error messages like…
Having a bit of an issue getting this error to clear when compiling with csc.exe on Win10. I am very new to C#. Doing a bit of self learning before I start attending classes in Jan.
Following a "TeamTreehouse" tutorial on doing this. They are using…
I have error in my project on time of build csc.exe exited with code -2146232797 visual studio 2017(Professional) in other Team's computer project building and running fine, so I not want to update nuget compiler,
Is there any permanent solutions…
I'm trying to build this Android Xamarin project, and am getting the compile time error:
./ResilientServices/ResilientServices.Droid/CSC:
Error CS1703: Multiple assemblies with equivalent identity have been…
Im trying to automate our build process. To do this i need to compile the app_code in a asp.Net website to a dll so i can run NUnit test against the code. Before you suggest that i just use a class library, i will say that i agree with you, my…
As a naive tip, you often hear to use IEnumerable.Any() because then the entire enumerable does not necessarily need to be traversed.
I just wrote a little segment of code that tries to see if the Enumerable contains a single item or multiple.
if…
One may wonder - how to make a .bat file with embedded c# code to compile and execute it 'on-the-fly'?
Is it possible to have both batch-instructions and c# code in one file?