I wrote a pretty simple program in C# to automatically generate csv files of a specific format from data from other spreadsheets, and I'd like to deploy it as a command line interface utility, i.e a .exe
file that can be run outside of VS Code, the IDE I'm using. I have the dotnet sdk tools installed, and I tried using dotnet msbuild
with the .csproj file below:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<Configuration>Release</Configuration>
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
</Project>
The command dotnet msbuild
in the terminal built into VS Code generates a folder in bin
called release
that contains a .dll
file, but not a .exe
file. What parameters can I add to dotnet msbuild
to generate a .exe
file, or do I have to use another tool?
EDIT: I checked Build .NET Core console application to output an EXE?
and tried dotnet publish -c Release -r win10-x64
and got this error: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
SOLUTION: msbuild was the wrong tool to use-- I believe csc is the correct tool, as it created an application file.