Skip to content

Commit

Permalink
Nuspec for .NetCore and .NET4.5.2 as separate packages (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
poornas authored and harshavardhana committed May 16, 2017
1 parent ac67680 commit 571fa41
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Minio.Core/Minio.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
<TargetFramework>netstandard1.6</TargetFramework>
<AssemblyName>Minio</AssemblyName>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<RootNamespace>Minio</RootNamespace>
Expand All @@ -12,7 +12,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>..\..\..\lib\</OutputPath>
<OutputPath>..\..\core\lib\</OutputPath>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Minio.Net452/Minio.Net452.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\..\lib\net452\</OutputPath>
<OutputPath>..\..\lib\net452\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down
4 changes: 3 additions & 1 deletion Minio.Tests/Minio.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
Expand Down
31 changes: 31 additions & 0 deletions Minio.core.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>Minio.NetCore</id>
<version>1.0.0</version>
<authors>Minio, Inc.</authors>
<owners>Minio, Inc</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>
<projectUrl>https://github.com/minio/minio-dotnet</projectUrl>
<iconUrl>https://www.minio.io/logo/</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Minio .NET SDK for Amazon S3 Compatible Cloud Storage</description>
<releaseNotes>Rewrite of .NET sdk for support of .NetCore and .NET4.5.2 framework</releaseNotes>
<copyright>Copyright 2017</copyright>
<tags>minio cloud storage</tags>
<dependencies>
<group targetFramework=".NETStandard1.6">
<dependency id="RestSharp.NetCore" version="105.2.3" />
<dependency id="Newtonsoft.Json" version="10.0.2" />
<dependency id="System.Reactive.Linq" version="3.1.1" />
<dependency id="System.Runtime.Serialization.Xml" version="4.3.0" />
<dependency id="Microsoft.Win32.Registry" version="4.3.0" />
<dependency id="Microsoft.Build.Utilities.Core" version="15.1.548" />
</group>
</dependencies>

</metadata>
<files>
<file src="..\core\lib\**" target="lib" />
</files>
</package>
12 changes: 2 additions & 10 deletions Minio.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,11 @@
<dependency id="System.Reactive.Windows.Threading" version="3.1.1" />
<dependency id="System.Xml.Linq" version="3.5.21022.801" />
</group>
<group targetFramework="netcoreapp1.0">
<dependency id="RestSharp.NetCore" version="105.2.3" />
<dependency id="Newtonsoft.Json" version="10.0.2" />
<dependency id="System.Reactive.Linq" version="3.1.1" />
<dependency id="System.Runtime.Serialization.Xml" version="4.3.0" />
<dependency id="Microsoft.Win32.Registry" version="4.3.0" />
<dependency id="Microsoft.Build.Utilities.Core" version="15.1.548" />
</group>

</dependencies>

</metadata>
<files>
<file src="..\..\lib\net452\Minio.dll" target="lib\net452\Minio.dll" />
<file src="..\..\lib\netcoreapp1.0\Minio.dll" target="lib\netcore\Minio.dll" />
<file src="..\lib\**" target="lib" />
</files>
</package>
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@
Minio Client SDK provides higher level APIs for Minio and Amazon S3 compatible cloud storage services.For a complete list of APIs and examples, please take a look at the [Dotnet Client API Reference](https://docs.minio.io/docs/dotnet-client-api-reference).This document assumes that you have a working VisualStudio development environment.

## Minimum Requirements
* .NET 4.5.2, .NetCoreApp 1.0.0 or higher
* .NET 4.5.2, .NetStandard1.6 or higher
* Visual Studio 2017 RC

## Install from NuGet

To install Minio .NET package, run the following command in Nuget Package Manager Console.
To install Minio .NET package for .NET Framework, run the following command in Nuget Package Manager Console.
```powershell
PM> Install-Package Minio
PM> Install-Package Minio
```
To install Minio .NET package for .NetCore, run the following command in Nuget Package Manager Console.
```powershell
PM> Install-Package Minio.NetCore
```

## Minio Client Example
To connect to an Amazon S3 compatible cloud storage service, you will need to specify the following parameters.

Expand Down Expand Up @@ -83,7 +85,7 @@ namespace FileUploader
var bucketName = "mymusic";
var location = "us-east-1";
var objectName = "golden-oldies.zip";
var filePath = "/tmp/golden-oldies.zip";
var filePath = "C:\\Users\\username\\Downloads\\golden_oldies.mp3";
var contentType = "application/zip";

try
Expand Down

0 comments on commit 571fa41

Please sign in to comment.