Skip to content

Commit

Permalink
.net5.0-remove-runtimes-folder.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
simonchen committed Apr 5, 2024
1 parent 0521eb2 commit 35b84ba
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Documentations/.net5.0-remove-runtimes-folder.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
https://stackoverflow.com/questions/67920055/superfluous-runtimes-folder-created-in-output-directory-for-net-5-project
That's pretty easy to change: In your csproj file, inside the PropertyGroup, set the SelfContained property to "false" and specify a RuntimeIdentifier; like this:

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<SelfContained>false</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>


注意输出文件夹会自动加win-x64子目录

0 comments on commit 35b84ba

Please sign in to comment.