ToB企服应用市场:ToB评测及商务社交产业平台
标题:
NuGet常用基本配置和命令
[打印本页]
作者:
老婆出轨
时间:
2023-9-2 00:00
标题:
NuGet常用基本配置和命令
基本配置文件
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>
net35;
net40;
net45;
net451;
net452;
net46;
net461;
net462;
net47;
net471;
net472;
net48;
netstandard2.0;
netstandard2.1;
netcoreapp3.1;
net5.0;
net6.0;
</TargetFrameworks>
<PackageId>Aliang.Common.Helper</PackageId>
<Title>Aliang.Common.Helper</Title>
<PackageTags>NET;Csharp;Helper;</PackageTags>
<IsPublishable>False</IsPublishable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Authors>码农阿亮</Authors>
<Company />
<Description>这是一个通用的帮助工具类库</Description>
<PackageProjectUrl>https://gitee.com/mingliang_it/Aliang.Common.Helper</PackageProjectUrl>
<PackageIcon>Aliang.jpg</PackageIcon>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<AssemblyVersion>1.0.1</AssemblyVersion>
<FileVersion>1.0.1</FileVersion>
<Version>1.0.1</Version>
<Platforms>AnyCPU;x86;x64</Platforms>
<RepositoryUrl>https://gitee.com/mingliang_it</RepositoryUrl>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<PackageReadmeFile>ReadMe.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<None Include="Aliang.jpg" Pack="<PropertyGroup>
<IsPackable>true</IsPackable>
</PropertyGroup>" PackagePath="" />
<None Include="Aliang.png" Pack="<PropertyGroup>
<IsPackable>true</IsPackable>
</PropertyGroup>" PackagePath="" />
<None Include="ReadMe.md" Pack="<PropertyGroup>
<IsPackable>true</IsPackable>
</PropertyGroup>" PackagePath="" />
</ItemGroup>
</Project>
复制代码
基本命令
设置Key
nuget setApiKey [Your-API-Key] -Source https://www.nuget.org/api/v2/package/
复制代码
打包
nuget pack Aliang.Common.Helper.csproj -Prop Configuration=Release
复制代码
上传
nuget push Aliang.Common.Helper.1.0.1.nupkg -Source https://www.nuget.org/api/v2/package/
复制代码
删除(搜索不显示)
nuget delete Aliang.Common.Helper 1.0.1 -Source https://www.nuget.org/api/v2/package/
复制代码
打包非类库程序配置
<PropertyGroup>
<IsPackable>true</IsPackable>
</PropertyGroup>
复制代码
Nuget打包命令
nuget pack
复制代码
dotnet打包命令
dotnet pack
复制代码
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
欢迎光临 ToB企服应用市场:ToB评测及商务社交产业平台 (https://dis.qidao123.com/)
Powered by Discuz! X3.4