Reference documents:
To modify a .vcxproj file
- Add
<TargetFramework>net8.0-windows</TargetFramework>.
Note: For
TargetFramework, use net8.0 if there is not a specific Windows dependency.
- Change
<CLRSupport>true</CLRSupport> to
<CLRSupport>NetCore</CLRSupport> for Release and Debug.
- Remove all .NET Framework references (such as System, System.Core, and System.Data).
- Then, rebuild only the project in Visual Studio.