c# .net7.0 winform, wpf to local code AOT actual combat against dnspy, c# traditional encryption companies have no jobs

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 --infocan display the following information

image.png
First of all, this document explains winform and wpf. If it is not winform, you don’t need to read the content behind wpf. You can read my other articles about rd.xml and source generation

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,

Guess you like

Origin blog.csdn.net/u010042660/article/details/130430169