Example when I compile all cs files to a single assembly(say Single.dll), but When I mention the file extension as random text, as mentioned below
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc -target:library -out:Single.abc *.cs
It is not throwing error, but creates a file as "Single.abc"
what is the purpose of doing this kind of compilation?
See example here: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/command-line-building-with-csc-exe
.abcextension, why does your file archiver of choice allow you to create a ZIP file with an.abcextension, why will any operating system's file manager allow you to change to any file's extension to any string of characters you want, whether it accurately reflects the contents or not? Or, better yet, why shouldn't those applications allow you to do that? That is, why should they care what extension you use? - Lance U. Matthewscscdoesn't impose any restrictions on input file extensions, either.. Related: C# compiler compiles .txt .obj .java files. - Lance U. Matthews