Make complaints
If you want to protect the code when writing code, I don’t think about c# first when making form programs, but the threshold for writing other programming languages is slightly higher. Sometimes, in order to write a free software without being taken by others and change it into your own, I really don’t want to write it. The plagiarism of c# and java is plagiarized from the source code level, which greatly reduces the motivation to write free software and paid software.
Now, with this technology, no more fear
preparation conditions
condition one
First of all, it needs to be explained that winform (.net framework) and .net winform are different,
so if you want to practice this skill, you must first convert the code to a non-.net framework first, and then you can set net7.0 in the project
Condition 2
Prepare the development tools and configure the environment
to ensure that the input dotnet --info
can display the following information
Configure project csproject
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework><CustomResourceTypesSupport>true</CustomResourceTypesSupport>
<Nullable>enable</Nullable>
<PublishAot>true</PublishAot>
<TrimMode>partial</TrimMode>
<TrimmerSingleWarn>false</TrimmerSingleWarn> <!-- close IL3053警告-->
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
After configuration, you will find that you either disable cropping, disable cropping and say that winform is not supported, contradictory,
so how to solve it,