Skip to content

Commit

Permalink
Merge pull request #1 from mikanyg/net-standard-2.0
Browse files Browse the repository at this point in the history
Net standard 2.0 support

Converted servicefabric.autorest project to netstandard20 and updated SF dependencies to V3.0 which are netstandard compliant.

Converted unit test project to netcore nunit project template based on dotnet cli

Updated samples to .NET 4.6.2 in order to be .NET Standard 2.0 compliant and updated to v2.0.0 of ServiceFabric.AutoRest
  • Loading branch information
mikanyg authored Apr 6, 2018
2 parents 7df00b1 + 6c4e8f7 commit 612ad4a
Show file tree
Hide file tree
Showing 35 changed files with 636 additions and 836 deletions.
47 changes: 25 additions & 22 deletions ServiceFabric.AutoRest.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.27428.2011
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2D14A411-178E-48BD-B053-0DBDD5DD0DBD}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -13,11 +13,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoadTest", "Test\LoadTest\LoadTest.csproj", "{7EB170B6-A18E-44DA-B325-334851D6DFB5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceFabric.AutoRest.Communication.Test", "Test\ServiceFabric.AutoRest.Communication.Test\ServiceFabric.AutoRest.Communication.Test.csproj", "{E04EDB5F-D2DF-4E4D-919D-E70555CDA063}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{C842AE20-5D36-4A5C-BD50-4A149F9C0443}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceFabric.AutoRest.Communication", "Src\ServiceFabric.AutoRest.Communication\ServiceFabric.AutoRest.Communication.csproj", "{6EC66346-310D-4D9D-A4A8-10537601063D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceFabric.AutoRest.Communication", "Src\ServiceFabric.AutoRest.Communication\ServiceFabric.AutoRest.Communication.csproj", "{9C18F054-716B-4F28-9AD6-399EEC5F7259}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{C842AE20-5D36-4A5C-BD50-4A149F9C0443}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceFabric.AutoRest.Communication.Test", "Test\ServiceFabric.AutoRest.Communication.Test\ServiceFabric.AutoRest.Communication.Test.csproj", "{742AE677-6AA7-4320-8435-7CF8E283B829}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -35,28 +35,31 @@ Global
{7EB170B6-A18E-44DA-B325-334851D6DFB5}.Release|Any CPU.Build.0 = Release|Any CPU
{7EB170B6-A18E-44DA-B325-334851D6DFB5}.Release|x64.ActiveCfg = Release|Any CPU
{7EB170B6-A18E-44DA-B325-334851D6DFB5}.Release|x64.Build.0 = Release|Any CPU
{E04EDB5F-D2DF-4E4D-919D-E70555CDA063}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E04EDB5F-D2DF-4E4D-919D-E70555CDA063}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E04EDB5F-D2DF-4E4D-919D-E70555CDA063}.Debug|x64.ActiveCfg = Debug|x64
{E04EDB5F-D2DF-4E4D-919D-E70555CDA063}.Debug|x64.Build.0 = Debug|x64
{E04EDB5F-D2DF-4E4D-919D-E70555CDA063}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E04EDB5F-D2DF-4E4D-919D-E70555CDA063}.Release|Any CPU.Build.0 = Release|Any CPU
{E04EDB5F-D2DF-4E4D-919D-E70555CDA063}.Release|x64.ActiveCfg = Release|x64
{E04EDB5F-D2DF-4E4D-919D-E70555CDA063}.Release|x64.Build.0 = Release|x64
{6EC66346-310D-4D9D-A4A8-10537601063D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6EC66346-310D-4D9D-A4A8-10537601063D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6EC66346-310D-4D9D-A4A8-10537601063D}.Debug|x64.ActiveCfg = Debug|x64
{6EC66346-310D-4D9D-A4A8-10537601063D}.Debug|x64.Build.0 = Debug|x64
{6EC66346-310D-4D9D-A4A8-10537601063D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6EC66346-310D-4D9D-A4A8-10537601063D}.Release|Any CPU.Build.0 = Release|Any CPU
{6EC66346-310D-4D9D-A4A8-10537601063D}.Release|x64.ActiveCfg = Release|x64
{6EC66346-310D-4D9D-A4A8-10537601063D}.Release|x64.Build.0 = Release|x64
{9C18F054-716B-4F28-9AD6-399EEC5F7259}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C18F054-716B-4F28-9AD6-399EEC5F7259}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C18F054-716B-4F28-9AD6-399EEC5F7259}.Debug|x64.ActiveCfg = Debug|Any CPU
{9C18F054-716B-4F28-9AD6-399EEC5F7259}.Debug|x64.Build.0 = Debug|Any CPU
{9C18F054-716B-4F28-9AD6-399EEC5F7259}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9C18F054-716B-4F28-9AD6-399EEC5F7259}.Release|Any CPU.Build.0 = Release|Any CPU
{9C18F054-716B-4F28-9AD6-399EEC5F7259}.Release|x64.ActiveCfg = Release|Any CPU
{9C18F054-716B-4F28-9AD6-399EEC5F7259}.Release|x64.Build.0 = Release|Any CPU
{742AE677-6AA7-4320-8435-7CF8E283B829}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{742AE677-6AA7-4320-8435-7CF8E283B829}.Debug|Any CPU.Build.0 = Debug|Any CPU
{742AE677-6AA7-4320-8435-7CF8E283B829}.Debug|x64.ActiveCfg = Debug|Any CPU
{742AE677-6AA7-4320-8435-7CF8E283B829}.Debug|x64.Build.0 = Debug|Any CPU
{742AE677-6AA7-4320-8435-7CF8E283B829}.Release|Any CPU.ActiveCfg = Release|Any CPU
{742AE677-6AA7-4320-8435-7CF8E283B829}.Release|Any CPU.Build.0 = Release|Any CPU
{742AE677-6AA7-4320-8435-7CF8E283B829}.Release|x64.ActiveCfg = Release|Any CPU
{742AE677-6AA7-4320-8435-7CF8E283B829}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{7EB170B6-A18E-44DA-B325-334851D6DFB5} = {C842AE20-5D36-4A5C-BD50-4A149F9C0443}
{E04EDB5F-D2DF-4E4D-919D-E70555CDA063} = {C842AE20-5D36-4A5C-BD50-4A149F9C0443}
{742AE677-6AA7-4320-8435-7CF8E283B829} = {C842AE20-5D36-4A5C-BD50-4A149F9C0443}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {216F46A7-6B6C-42B3-B5DA-0412EB39ED55}
EndGlobalSection
EndGlobal

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,135 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6EC66346-310D-4D9D-A4A8-10537601063D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>ServiceFabric.AutoRest</PackageId>
<Version>2.0.0</Version>
<PackageLicenseUrl>https://raw.githubusercontent.com/mikanyg/ServiceFabric.AutoRest/master/LICENSE.txt</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/mikanyg/ServiceFabric.AutoRest</PackageProjectUrl>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<RepositoryType>Git</RepositoryType>
<RepositoryUrl>https://github.com/mikanyg/ServiceFabric.AutoRest.git</RepositoryUrl>
<PackageReleaseNotes>
2.0.0
- Now targeting netstandard2.0
1.4.1
- Added Newtonsoft.Json as a dependency in the proper version.
1.4.0
- Primary dependencies (ServiceFabric and AutoRest) updated to latest version.
1.3.0
- BREAKING CHANGE: RestCommunicationClient now implements ICommunicationClient interface explicitly. Cast to ICommunicationClient to get acces to its members.
- Dependent package versions updated to latest version.
- More trace output added when events are being triggered.
1.2.0
- RestCommunicationClient now has a properties dictionary for storing metadata. Usable for subscribers.
- New event ClientCreated fired by RestCommunicationClientFactory after a client has been created.
- New event ClientValidating fired by RestCommunicationClientFactory during client validation. Allows subscribers to determine client validity.
1.1.0
- Added support for resolving credentials at communication client creation time, through an instance of ICredentialsManager.
1.0.1
- Added Trace output for improved diagnostics.
1.0.0
- Initial release version.
</PackageReleaseNotes>
<PackageTags>ServiceFabric Azure Fabric AutoRest ClientRuntime REST</PackageTags>
<Copyright>Copyright © 2018</Copyright>
<Product>ServiceFabric.AutoRest</Product>
<Authors>mikanyg</Authors>
<Company>mikanyg</Company>
<Description>Service Fabric communication library that can be used with AutoRest generated client libraries.</Description>
<RootNamespace>ServiceFabric.AutoRest.Communication.Client</RootNamespace>
<AssemblyName>ServiceFabric.AutoRest</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.10\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ServiceFabric.Data, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\packages\Microsoft.ServiceFabric.Data.2.8.232\lib\net45\Microsoft.ServiceFabric.Data.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ServiceFabric.Data.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\packages\Microsoft.ServiceFabric.Data.2.8.232\lib\net45\Microsoft.ServiceFabric.Data.Interfaces.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.ServiceFabric.Diagnostics, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\packages\Microsoft.ServiceFabric.Diagnostics.Internal.2.8.232\lib\net45\Microsoft.ServiceFabric.Diagnostics.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ServiceFabric.Internal, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\packages\Microsoft.ServiceFabric.6.0.232\lib\net45\Microsoft.ServiceFabric.Internal.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ServiceFabric.Internal.Strings, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\packages\Microsoft.ServiceFabric.6.0.232\lib\net45\Microsoft.ServiceFabric.Internal.Strings.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ServiceFabric.Preview, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\packages\Microsoft.ServiceFabric.6.0.232\lib\net45\Microsoft.ServiceFabric.Preview.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ServiceFabric.Services, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\packages\Microsoft.ServiceFabric.Services.2.8.232\lib\net45\Microsoft.ServiceFabric.Services.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Fabric, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\packages\Microsoft.ServiceFabric.6.0.232\lib\net45\System.Fabric.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Fabric.Management.ServiceModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\packages\Microsoft.ServiceFabric.6.0.232\lib\net45\System.Fabric.Management.ServiceModel.dll</HintPath>
</Reference>
<Reference Include="System.Fabric.Management.ServiceModel.XmlSerializers, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.ServiceFabric.6.0.232\lib\net45\System.Fabric.Management.ServiceModel.XmlSerializers.dll</HintPath>
</Reference>
<Reference Include="System.Fabric.Strings, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\packages\Microsoft.ServiceFabric.6.0.232\lib\net45\System.Fabric.Strings.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CommunicationClientValidatingEventArgs.cs" />
<Compile Include="ICredentialsManager.cs" />
<Compile Include="RestCommunicationClient.cs" />
<Compile Include="RestCommunicationClientFactory.cs" />
<Compile Include="HttpOperationExceptionHandler.cs" />
<Compile Include="IRestServicePartitionClient.cs" />
<Compile Include="IRestServicePartitionClientFactory.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RestServicePartitionClient.cs" />
<Compile Include="RestServicePartitionClientFactory.cs" />
<Compile Include="TypeExtensions.cs" />
</ItemGroup>

<ItemGroup>
<None Include="app.config" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
<None Include="ServiceFabric.AutoRest.nuspec" />
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.10" />
<PackageReference Include="Microsoft.ServiceFabric.Services" Version="3.0.456" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

</Project>

This file was deleted.

11 changes: 0 additions & 11 deletions Src/ServiceFabric.AutoRest.Communication/app.config

This file was deleted.

Loading

0 comments on commit 612ad4a

Please sign in to comment.