Migrate Nuget package generation to MSBuild project.

This commit is contained in:
2021-06-13 06:05:01 +02:00
parent ff32ad9d1f
commit dc737187ee
4 changed files with 24 additions and 61 deletions

View File

@@ -1,20 +0,0 @@
@echo off
:: MSBuild and tools path
if exist "%ProgramFiles%\MSBuild\14.0\bin" set PATH=%ProgramFiles%\MSBuild\14.0\bin;%PATH%
if exist "%ProgramFiles(x86)%\MSBuild\14.0\bin" set PATH=%ProgramFiles(x86)%\MSBuild\14.0\bin;%PATH%
:: NuGet
set nuget="nuget"
if exist "%~dp0..\packages\NuGet.CommandLine.3.4.3\tools\NuGet.exe" set nuget="%~dp0\..\packages\NuGet.CommandLine.3.4.3\tools\NuGet.exe"
:: Release
Title Building Release
msbuild VAR.Json.csproj /t:Build /p:Configuration="Release" /p:Platform="AnyCPU"
:: Packing Nuget
Title Packing Nuget
%nuget% pack VAR.Json.csproj -Verbosity detailed -OutputDir "NuGet" -MSBuildVersion "14.0" -Properties Configuration="Release" -Prop Platform=AnyCPU
title Finished
pause

View File

@@ -1,14 +0,0 @@
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("VAR.Json")]
[assembly: AssemblyDescription(".Net library for JSON parsing")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("VAR")]
[assembly: AssemblyProduct("VAR.Json")]
[assembly: AssemblyCopyright("Copyright © VAR 2016-2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("28b3f937-145c-4fd4-a75b-a25ea4cc0428")]
[assembly: AssemblyVersion("1.2.0.*")]

View File

@@ -1,14 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Deterministic>false</Deterministic>
<IsPackable>true</IsPackable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup>
<PackageId>VAR.Json</PackageId>
<Title>VAR.Json</Title>
<Version>1.2.1</Version>
<Description>.Net library for JSON parsing</Description>
<Authors>VAR</Authors>
<Company>VAR</Company>
<Copyright>Copyright © VAR 2016-2021</Copyright>
<RequireLicenseAcceptance>false</RequireLicenseAcceptance>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageProjectUrl>https://github.com/Kableado/VAR.Json</PackageProjectUrl>
<PackageTags>JSON;JSON Library</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NuGet.CommandLine" Version="5.9.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<Content Include="..\LICENSE.txt" Link="LICENSE.txt" Pack="true" PackagePath=""/>
</ItemGroup>
<Target Name="CopyPackage" AfterTargets="Pack">
<Copy
SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg"
DestinationFolder="Nuget\"
/>
</Target>
</Project>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<licenseUrl>https://github.com/Kableado/VAR.Json/blob/master/LICENSE.txt</licenseUrl>
<projectUrl>https://github.com/Kableado/VAR.Json</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$description$</description>
<copyright>Copyright VAR 2016-2017</copyright>
<tags>JSON Library</tags>
</metadata>
<files>
<file src="bin\Release\net461\VAR.Json.dll" target="lib\net461\VAR.Json.dll" />
<file src="bin\Release\net461\VAR.Json.pdb" target="lib\net461\VAR.Json.pdb" />
<file src="bin\Release\net35\VAR.Json.dll" target="lib\net35\VAR.Json.dll" />
<file src="bin\Release\net35\VAR.Json.pdb" target="lib\net35\VAR.Json.pdb" />
</files>
</package>