From b4504f69403821409a3edf8333af3e51faf6d4b0 Mon Sep 17 00:00:00 2001 From: fw2568 Date: Wed, 12 Jun 2019 20:09:47 +0200 Subject: [PATCH] Build server support (#12) * Update azure-pipelines.yml * added meta package * missing gitversion task on meta package build * Update README.md +semver:major --- README.md | 26 ++++++++---- YaNco.sln | 12 +++++- azure-pipelines.yml | 42 ++++++++++++------- .../YaNco.Abstractions.csproj | 4 ++ src/YaNco.Core/YaNco.Core.csproj | 4 ++ src/YaNco.Native.clr/YaNco.Native.clr.vcxproj | 2 +- src/YaNco.Native/YaNco.Native.csproj | 4 ++ src/YaNco.Primitives/YaNco.Primitives.csproj | 4 ++ .../YaNco.Runtime.win-x64.csproj | 7 ---- .../YaNco.Runtime.win-x86.csproj | 7 ---- src/YaNco.Runtime/YaNco.Runtime.csproj | 4 ++ src/YaNco/YaNco.csproj | 42 +++++++++++++++++++ 12 files changed, 118 insertions(+), 40 deletions(-) create mode 100644 src/YaNco/YaNco.csproj diff --git a/README.md b/README.md index f376a748..e4e8e3b6 100644 --- a/README.md +++ b/README.md @@ -3,33 +3,32 @@ ## Description -This library provides an alternative SAP .NET Connector based on the _SAP NetWeaver RFC Library_, +This library provides an alternative SAP .NET Connector based on the _SAP NetWeaver RFC Library_. **Features**: - .NET Standard / .NET Core Project Support - DI container friendly API -- Functional API (using [Language.Ext](https://github.com/louthy/language-ext)) +- Functional programming friendly API (using [Language.Ext](https://github.com/louthy/language-ext)) - ABAP callbacks support (not possible with sapnco, see SAP note [2297083](https://launchpad.support.sap.com/#/notes/2297083)). ## Platforms & Prerequisites -The library requires .NET Framework 4.7.1. +The library requires .NET Framework 4.7.1 or .NET Core 2.0 or higher. Even if the core library itself is compatible with .NET Standard 2.0, only Windows is supported as runtime environment. -The Visual Studio 2013 (VC++ 12.0) runtime library and the Visual Studio 2017 VC runtime library have be installed. +The Visual Studio 2013 (VC++ 12.0) runtime library and the Visual Studio 2017 VC runtime library have to be installed. Both libraries can be downloaded here: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads -## Build -To build YaNco you need to obtain _SAP NW RFC Library 750_ from _SAP Service Marketplace_. +To use and build YaNco you need to obtain _SAP NW RFC Library 750_ from _SAP Service Marketplace_. A prerequisite to download is having a **customer or partner account** on _SAP Service Marketplace_ and if you are SAP employee please check [SAP Note 1037575 - Software download authorizations for SAP employees](https://launchpad.support.sap.com/#/notes/1037575). -Download both the x64 and the x86 versions and place then in the repository folder nwrfcsdk/x64 and nwrfcsdk/x86. _SAP NW RFC Library_ is fully backwards compatible, supporting all NetWeaver systems, from today, down to release R/3 4.6C. You can therefore always use the newest version released on Service Marketplace and connect to older systems as well. + ## Usage examples In order to call remote enabled ABAP function module (ABAP RFM), first a connection must be opened. @@ -91,8 +90,17 @@ using (var context = new RfcContext(ConnFunc)) } ``` - - + +## Build + +We use Visual Studio 2017 for building, 2019 may work but is not tested. +Make sure that you have installed Visual Studio with VC and Platform Build Tools. + +As explained above you have to obtain _SAP NW RFC Library 750_ from _SAP Service Marketplace_. +Download both the x64 and the x86 versions and place then in the repository folder nwrfcsdk/x64 and nwrfcsdk/x86. + + + ## Versioning We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/dbosoft/YaNco/tags). diff --git a/YaNco.sln b/YaNco.sln index 4260cd23..4aaabeca 100644 --- a/YaNco.sln +++ b/YaNco.sln @@ -29,6 +29,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution azure-pipelines.yml = azure-pipelines.yml EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YaNco", "src\YaNco\YaNco.csproj", "{9EBB65AB-D248-4838-BC06-31C229AD1C03}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -105,9 +107,7 @@ Global {215049FF-1D8D-4374-8BED-AE5AB72CBC2C}.Debug|x86.Build.0 = Debug|x86 {215049FF-1D8D-4374-8BED-AE5AB72CBC2C}.Release|Any CPU.ActiveCfg = Release|x86 {215049FF-1D8D-4374-8BED-AE5AB72CBC2C}.Release|x64.ActiveCfg = Release|x64 - {215049FF-1D8D-4374-8BED-AE5AB72CBC2C}.Release|x64.Build.0 = Release|x64 {215049FF-1D8D-4374-8BED-AE5AB72CBC2C}.Release|x86.ActiveCfg = Release|x86 - {215049FF-1D8D-4374-8BED-AE5AB72CBC2C}.Release|x86.Build.0 = Release|x86 {5A2E8471-83F2-4864-8FC0-DEFC94151953}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5A2E8471-83F2-4864-8FC0-DEFC94151953}.Debug|Any CPU.Build.0 = Debug|Any CPU {5A2E8471-83F2-4864-8FC0-DEFC94151953}.Debug|x64.ActiveCfg = Debug|x64 @@ -136,6 +136,14 @@ Global {0CF3C557-6512-4D63-9521-2B67CD0090BA}.Release|x64.ActiveCfg = Release|x64 {0CF3C557-6512-4D63-9521-2B67CD0090BA}.Release|x64.Build.0 = Release|x64 {0CF3C557-6512-4D63-9521-2B67CD0090BA}.Release|x86.ActiveCfg = Release|x86 + {9EBB65AB-D248-4838-BC06-31C229AD1C03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9EBB65AB-D248-4838-BC06-31C229AD1C03}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9EBB65AB-D248-4838-BC06-31C229AD1C03}.Debug|x64.ActiveCfg = Debug|Any CPU + {9EBB65AB-D248-4838-BC06-31C229AD1C03}.Debug|x86.ActiveCfg = Debug|Any CPU + {9EBB65AB-D248-4838-BC06-31C229AD1C03}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9EBB65AB-D248-4838-BC06-31C229AD1C03}.Release|Any CPU.Build.0 = Release|Any CPU + {9EBB65AB-D248-4838-BC06-31C229AD1C03}.Release|x64.ActiveCfg = Release|Any CPU + {9EBB65AB-D248-4838-BC06-31C229AD1C03}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9ac040cb..4945fa0f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,19 +1,19 @@ -# Starter pipeline -# Start with a minimal pipeline that you can customize to build and deploy your code. -# Add steps that build, run tests, deploy, and more: -# https://aka.ms/yaml - trigger: - master pool: name: 'default' -steps: +steps: - task: DotNetCoreCLI@2 inputs: command: 'restore' - projects: '**/*.csproj' + projects: '**/*.csproj' + +- task: DeleteFiles@1 + inputs: + sourceFolder: $(Build.SourcesDirectory)\build-packages + contents: '**' - task: CopyFiles@2 inputs: @@ -26,24 +26,38 @@ steps: inputs: updateAssemblyInfo: true +# x86 platform builds - task: VSBuild@1 inputs: platform: x86 - clean: true + msbuildArgs: -ignoreprojectextensions:csproj configuration: Release +# x64 platform builds - task: VSBuild@1 inputs: platform: x64 - clean: true - configuration: Release + msbuildArgs: -ignoreprojectextensions:csproj + configuration: Release +# cleanup packages created in platform builds +- task: DeleteFiles@1 + inputs: + sourceFolder: $(Build.SourcesDirectory)\build-packages + contents: '**' + +# final build - task: VSBuild@1 inputs: - platform: AnyCPU - clean: true - configuration: Release + platform: 'Any CPU' + configuration: Release + +- task: CopyFiles@2 + inputs: + sourceFolder: $(Build.SourcesDirectory)\build-packages + targetFolder: $(Build.ArtifactStagingDirectory) + cleanTargetFolder: true - task: PublishBuildArtifacts@1 inputs: - ArtifactName: drop + ArtifactName: build-packages diff --git a/src/YaNco.Abstractions/YaNco.Abstractions.csproj b/src/YaNco.Abstractions/YaNco.Abstractions.csproj index 29c7014a..391530fa 100644 --- a/src/YaNco.Abstractions/YaNco.Abstractions.csproj +++ b/src/YaNco.Abstractions/YaNco.Abstractions.csproj @@ -26,6 +26,10 @@ This package contains abstraction definitions. all runtime; build; native; contentfiles; analyzers + + all + runtime; build; native; contentfiles; analyzers + diff --git a/src/YaNco.Core/YaNco.Core.csproj b/src/YaNco.Core/YaNco.Core.csproj index 44b4aac1..1dd441ab 100644 --- a/src/YaNco.Core/YaNco.Core.csproj +++ b/src/YaNco.Core/YaNco.Core.csproj @@ -31,6 +31,10 @@ This package contains the core implementation. all runtime; build; native; contentfiles; analyzers + + all + runtime; build; native; contentfiles; analyzers + diff --git a/src/YaNco.Native.clr/YaNco.Native.clr.vcxproj b/src/YaNco.Native.clr/YaNco.Native.clr.vcxproj index 8c511adc..1cefdd90 100644 --- a/src/YaNco.Native.clr/YaNco.Native.clr.vcxproj +++ b/src/YaNco.Native.clr/YaNco.Native.clr.vcxproj @@ -99,7 +99,7 @@ false - Dbosoft.SAP.NWRfc.Native + Dbosoft.YaNco.Native $(SolutionDir)src\$(ProjectName)\$(Configuration)\x64\ ..\..\nwrfcsdk\x64\include;$(IncludePath) ..\..\nwrfcsdk\x64\lib;$(LibraryPath) diff --git a/src/YaNco.Native/YaNco.Native.csproj b/src/YaNco.Native/YaNco.Native.csproj index 611e8d45..08cee313 100644 --- a/src/YaNco.Native/YaNco.Native.csproj +++ b/src/YaNco.Native/YaNco.Native.csproj @@ -65,6 +65,10 @@ This package contains the native implementation. all runtime; build; native; contentfiles; analyzers + + all + runtime; build; native; contentfiles; analyzers + diff --git a/src/YaNco.Primitives/YaNco.Primitives.csproj b/src/YaNco.Primitives/YaNco.Primitives.csproj index 179e6fbc..3ccbb1c1 100644 --- a/src/YaNco.Primitives/YaNco.Primitives.csproj +++ b/src/YaNco.Primitives/YaNco.Primitives.csproj @@ -29,6 +29,10 @@ This package contains primitive type definitions. runtime; build; native; contentfiles; analyzers + + all + runtime; build; native; contentfiles; analyzers + diff --git a/src/YaNco.Runtime.win-x64/YaNco.Runtime.win-x64.csproj b/src/YaNco.Runtime.win-x64/YaNco.Runtime.win-x64.csproj index 399541d2..c6acacc5 100644 --- a/src/YaNco.Runtime.win-x64/YaNco.Runtime.win-x64.csproj +++ b/src/YaNco.Runtime.win-x64/YaNco.Runtime.win-x64.csproj @@ -59,13 +59,6 @@ - - - all - runtime; build; native; contentfiles; analyzers - - - diff --git a/src/YaNco.Runtime.win-x86/YaNco.Runtime.win-x86.csproj b/src/YaNco.Runtime.win-x86/YaNco.Runtime.win-x86.csproj index 2692303b..8b92de3d 100644 --- a/src/YaNco.Runtime.win-x86/YaNco.Runtime.win-x86.csproj +++ b/src/YaNco.Runtime.win-x86/YaNco.Runtime.win-x86.csproj @@ -59,13 +59,6 @@ - - - all - runtime; build; native; contentfiles; analyzers - - - diff --git a/src/YaNco.Runtime/YaNco.Runtime.csproj b/src/YaNco.Runtime/YaNco.Runtime.csproj index addf793e..19cc724f 100644 --- a/src/YaNco.Runtime/YaNco.Runtime.csproj +++ b/src/YaNco.Runtime/YaNco.Runtime.csproj @@ -26,6 +26,10 @@ This package contains the platform runtime. all runtime; build; native; contentfiles; analyzers + + all + runtime; build; native; contentfiles; analyzers + diff --git a/src/YaNco/YaNco.csproj b/src/YaNco/YaNco.csproj new file mode 100644 index 00000000..8af46c37 --- /dev/null +++ b/src/YaNco/YaNco.csproj @@ -0,0 +1,42 @@ + + + + Dbosoft.YaNco + netstandard2.0 + false + false + true + ..\..\build-packages + AnyCPU + true + MIT + https://github.com/dbosoft/YaNco + Library created by dbosoft; SAP, Netweaver are trademarks of SAP SE + dbosoft + dbosoft GmbH + YaNco + https://github.com/dbosoft/YaNco + YaNco -Yet another .NET Connector +This library provides an alternative SAP .NET Connector based on the SAP NetWeaver RFC SDK. + + Dbosoft.YaNco + + + + + + all + runtime; build; native; contentfiles; analyzers + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + +