nuget包模板
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> <PropertyGroup> <TargetFrameworks>net45;net46</TargetFrameworks> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <Version>1.0.13-pre9.2</Version> <Authors>wpf academy</Authors> <UseWpf>True</UseWpf> <UseWindowsForms>true</UseWindowsForms> <RepositoryUrl></RepositoryUrl> <PackageProjectUrl></PackageProjectUrl> <PackageIconUrl></PackageIconUrl> <RepositoryType>git</RepositoryType> <Description>系统已安装应用列表</Description> <LangVersion>latest</LangVersion> <OutputType>Library</OutputType> <Platforms>AnyCPU;x64;x86</Platforms> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
</PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net45|AnyCPU'"> <DocumentationFile>InstalledApps.xml</DocumentationFile> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net45|AnyCPU'"> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net4.7.2|AnyCPU'"> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> <ItemGroup> <COMReference Include="IWshRuntimeLibrary"> <WrapperTool>tlbimp</WrapperTool> <VersionMinor>0</VersionMinor> <VersionMajor>1</VersionMajor> <Guid>f935dc20-1cf0-11d0-adb9-00c04fd58a0b</Guid> <Lcid>0</Lcid> <Isolated>false</Isolated> <EmbedInteropTypes>true</EmbedInteropTypes> </COMReference> </ItemGroup> <ItemGroup> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> <PackageReference Include="WindowsAPICodePack-Shell" Version="1.1.1" /> </ItemGroup> </Project>
.csproject文件
参考 SDK 样式项目中的目标框架 - .NET | Microsoft Learn