Build Instructions
Closed this issue · 2 comments
I cloned the repository and built it.
It took me a while to find the correct solution and project to look for, but that's ok.
However, to my surprise, on the output folder of the dscom.client
project instead of a single .exe
file, I had a truckload of files, as shown in the image.
When I copied the dscom.exe
to another folder to test a modification I made, the program blew up on me with the following error:
Failed to run as a self-contained app.
- The application was run as a self-contained app because 'C:\path\dscom.runtimeconfig.json' was not found.
- If this should be a framework-dependent app, add the 'C:\path\dscom.runtimeconfig.json' file
and specify the appropriate framework.
How can I build the project to generate a self-contained .exe
as exposed in the Releases?
In the git workflow folder, you can find some information how to compile or publish the dscom library and the dscom client.
In your case you can compile the cli tool with this command:
dotnet publish .\src\dscom.client\dscom.client.csproj --no-self-contained -c Release -r win-x64 -f net6.0 /p:PublishSingleFile=true
After that the exe is available in the publish folder (as a "PublishSingleFile" compile):
src\dscom.client\bin\Release\net6.0\win-x64\publish
For further information:
https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file/overview?tabs=cli
@PaulStSmith
Does this help you and can we close the issue?