Skip to content

Commit

Permalink
Build server support (#12)
Browse files Browse the repository at this point in the history
* Update azure-pipelines.yml

* added meta package

* missing gitversion task on meta package build

* Update README.md

+semver:major
  • Loading branch information
fw2568 authored Jun 12, 2019
1 parent 1bfabca commit b4504f6
Show file tree
Hide file tree
Showing 12 changed files with 118 additions and 40 deletions.
26 changes: 17 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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).
Expand Down
12 changes: 10 additions & 2 deletions YaNco.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
42 changes: 28 additions & 14 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
4 changes: 4 additions & 0 deletions src/YaNco.Abstractions/YaNco.Abstractions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ This package contains abstraction definitions.
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="UtilPack.NuGet.MSBuild" Version="2.9.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions src/YaNco.Core/YaNco.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ This package contains the core implementation.</Description>
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="UtilPack.NuGet.MSBuild" Version="2.9.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/YaNco.Native.clr/YaNco.Native.clr.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>Dbosoft.SAP.NWRfc.Native</TargetName>
<TargetName>Dbosoft.YaNco.Native</TargetName>
<OutDir>$(SolutionDir)src\$(ProjectName)\$(Configuration)\x64\</OutDir>
<IncludePath>..\..\nwrfcsdk\x64\include;$(IncludePath)</IncludePath>
<LibraryPath>..\..\nwrfcsdk\x64\lib;$(LibraryPath)</LibraryPath>
Expand Down
4 changes: 4 additions & 0 deletions src/YaNco.Native/YaNco.Native.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ This package contains the native implementation.</Description>
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="UtilPack.NuGet.MSBuild" Version="2.9.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions src/YaNco.Primitives/YaNco.Primitives.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ This package contains primitive type definitions.</Description>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="JetBrains.Annotations" Version="2018.2.1" />
<PackageReference Include="UtilPack.NuGet.MSBuild" Version="2.9.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
7 changes: 0 additions & 7 deletions src/YaNco.Runtime.win-x64/YaNco.Runtime.win-x64.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="GitVersionTask" Version="4.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\YaNco.Abstractions\YaNco.Abstractions.csproj" />
<ProjectReference Include="..\YaNco.Native.clr\YaNco.Native.clr.vcxproj">
Expand Down
7 changes: 0 additions & 7 deletions src/YaNco.Runtime.win-x86/YaNco.Runtime.win-x86.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="GitVersionTask" Version="4.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\YaNco.Abstractions\YaNco.Abstractions.csproj" />
<ProjectReference Include="..\YaNco.Native.clr\YaNco.Native.clr.vcxproj">
Expand Down
4 changes: 4 additions & 0 deletions src/YaNco.Runtime/YaNco.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ This package contains the platform runtime.</Description>
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="UtilPack.NuGet.MSBuild" Version="2.9.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
42 changes: 42 additions & 0 deletions src/YaNco/YaNco.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyName>Dbosoft.YaNco</AssemblyName>
<TargetFramework>netstandard2.0</TargetFramework>
<IncludeBuildOutput>false</IncludeBuildOutput>
<NoBuild>false</NoBuild>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageOutputPath>..\..\build-packages</PackageOutputPath>
<Platforms>AnyCPU</Platforms>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/dbosoft/YaNco</PackageProjectUrl>
<Copyright>Library created by dbosoft; SAP, Netweaver are trademarks of SAP SE</Copyright>
<Authors>dbosoft</Authors>
<Company>dbosoft GmbH</Company>
<Product>YaNco</Product>
<RepositoryUrl>https://github.com/dbosoft/YaNco</RepositoryUrl>
<Description>YaNco -Yet another .NET Connector
This library provides an alternative SAP .NET Connector based on the SAP NetWeaver RFC SDK.
</Description>
<RootNamespace>Dbosoft.YaNco</RootNamespace>

</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitVersionTask" Version="4.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="UtilPack.NuGet.MSBuild" Version="2.9.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\YaNco.Core\YaNco.Core.csproj" />
<ProjectReference Include="..\YaNco.Runtime\YaNco.Runtime.csproj" />
</ItemGroup>

</Project>

0 comments on commit b4504f6

Please sign in to comment.