{"id":120,"date":"2026-09-20T15:48:07","date_gmt":"2026-09-20T15:48:07","guid":{"rendered":"https:\/\/kraeftigerkaese.xyz\/tech\/?p=120"},"modified":"2026-09-20T15:48:08","modified_gmt":"2026-09-20T15:48:08","slug":"compile-standalone-exe-file-in-visual-studio","status":"publish","type":"post","link":"https:\/\/kraeftigerkaese.xyz\/tech\/compile-standalone-exe-file-in-visual-studio\/","title":{"rendered":"Compile Standalone EXE file in Visual Studio"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This one is quite fascinating, generally speaking i had been able to use the exe file from .\\bin\\debug when creating a project using the default template creation process in VS 2022 for a console application. Lately, it doesn&#8217;t seem to work.  I would need to publish it to win-x64. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">dotnet new console -n YourAppName &#8211;framework net10.0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;Project Sdk=&#8221;Microsoft.NET.Sdk&#8221;&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp; &lt;PropertyGroup&gt;<br>&nbsp; &nbsp; &lt;OutputType&gt;Exe&lt;\/OutputType&gt;<br>&nbsp; &nbsp; &lt;TargetFramework&gt;net10.0&lt;\/TargetFramework&gt;<br>&nbsp; &nbsp; &lt;ImplicitUsings&gt;enable&lt;\/ImplicitUsings&gt;<br>&nbsp; &nbsp; &lt;Nullable&gt;enable&lt;\/Nullable&gt;<br><br>&nbsp; &nbsp; &lt;!&#8211; Forces the app to build into a single executable &#8211;&gt;<br>&nbsp; &nbsp; &lt;PublishSingleFile&gt;true&lt;\/PublishSingleFile&gt;<br>&nbsp; &nbsp; &lt;!&#8211; Trims unused code to reduce the self-contained file size &#8211;&gt;<br>&nbsp; &nbsp; &lt;PublishTrimmed&gt;true&lt;\/PublishTrimmed&gt;<br>&nbsp; &lt;\/PropertyGroup&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;\/Project&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">dotnet publish -c Release -r win-x64 &#8211;self-contained true<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This one is quite fascinating, generally speaking i had been able to use the exe file from .\\bin\\debug when creating a project using the default template creation process in VS 2022 for a console application. Lately, it doesn&#8217;t seem to work. I would need to publish it to win-x64. dotnet new console -n YourAppName &#8211;framework&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,11],"tags":[],"class_list":["post-120","post","type-post","status-publish","format-standard","hentry","category-blog","category-dotnet"],"_links":{"self":[{"href":"https:\/\/kraeftigerkaese.xyz\/tech\/wp-json\/wp\/v2\/posts\/120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kraeftigerkaese.xyz\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kraeftigerkaese.xyz\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kraeftigerkaese.xyz\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kraeftigerkaese.xyz\/tech\/wp-json\/wp\/v2\/comments?post=120"}],"version-history":[{"count":1,"href":"https:\/\/kraeftigerkaese.xyz\/tech\/wp-json\/wp\/v2\/posts\/120\/revisions"}],"predecessor-version":[{"id":121,"href":"https:\/\/kraeftigerkaese.xyz\/tech\/wp-json\/wp\/v2\/posts\/120\/revisions\/121"}],"wp:attachment":[{"href":"https:\/\/kraeftigerkaese.xyz\/tech\/wp-json\/wp\/v2\/media?parent=120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kraeftigerkaese.xyz\/tech\/wp-json\/wp\/v2\/categories?post=120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kraeftigerkaese.xyz\/tech\/wp-json\/wp\/v2\/tags?post=120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}