IGNITE-7279 .NET: Compile on Linux This closes #3271
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/198399bb Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/198399bb Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/198399bb Branch: refs/heads/ignite-zk Commit: 198399bb984c3ff8f63a9eb2bed1a359329f9678 Parents: f1a853d Author: Pavel Tupitsyn <[email protected]> Authored: Fri Dec 22 11:28:49 2017 +0300 Committer: Pavel Tupitsyn <[email protected]> Committed: Fri Dec 22 11:28:49 2017 +0300 ---------------------------------------------------------------------- .../Apache.Ignite.Core.Tests.DotNetCore.csproj | 40 ++++++++++++++++--- .../Apache.Ignite.Core.Tests.DotNetCore.sln | 25 ------------ ...Ignite.Core.Tests.DotNetCore.sln.DotSettings | 13 ------- .../Common/IgnitionStartTest.cs | 3 ++ .../Common/TestUtils.DotNetCore.cs | 2 + .../README.txt | 17 -------- .../dotnet-test-windows.bat | 32 --------------- .../dotnet-test-wsl.bat | 34 ---------------- .../nuget.config | 41 -------------------- .../ApiParity/ParityTest.cs | 4 +- .../IgniteConfigurationTest.cs | 38 +++++++----------- .../Plugin/PluginTest.cs | 2 +- .../ProjectFilesTest.cs | 1 + .../Apache.Ignite.Core.DotNetCore.csproj | 15 +++++++ .../Impl/Common/IgniteHome.cs | 2 +- .../Impl/Services/ServiceProxy.cs | 4 +- .../Impl/Services/Services.cs | 4 ++ .../Impl/Unmanaged/Jni/AppDomains.cs | 5 ++- .../Impl/Unmanaged/Jni/Jvm.cs | 4 ++ .../Impl/Unmanaged/Jni/JvmDll.cs | 4 ++ .../dotnet/Apache.Ignite.DotNetCore.sln | 37 ++++++++++++++++++ .../Apache.Ignite.DotNetCore.sln.DotSettings | 11 ++++++ .../Apache.Ignite.Linq.DotNetCore.csproj | 16 ++++++++ modules/platforms/dotnet/DEVNOTES.txt | 40 +++++++++++++++++-- modules/platforms/dotnet/build.ps1 | 2 +- modules/platforms/dotnet/build.sh | 29 ++++++++++++++ 26 files changed, 223 insertions(+), 202 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.csproj ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.csproj b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.csproj index 27c161d..5947685 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.csproj +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.csproj @@ -17,6 +17,29 @@ </PropertyGroup> <ItemGroup> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\BinaryParityTest.cs" Link="ApiParity\BinaryParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\CacheAffinityParityTest.cs" Link="ApiParity\CacheAffinityParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\CacheConfigurationParityTest.cs" Link="ApiParity\CacheConfigurationParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\CacheMetricsParityTest.cs" Link="ApiParity\CacheMetricsParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\CacheParityTest.cs" Link="ApiParity\CacheParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\ClientConnectorConfigurationParityTest.cs" Link="ApiParity\ClientConnectorConfigurationParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\ClusterMetricsParityTest.cs" Link="ApiParity\ClusterMetricsParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\ClusterParityTest.cs" Link="ApiParity\ClusterParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\ComputeParityTest.cs" Link="ApiParity\ComputeParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\DataRegionConfigurationParityTest.cs" Link="ApiParity\DataRegionConfigurationParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\DataRegionMetricsParityTest.cs" Link="ApiParity\DataRegionMetricsParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\DataStorageConfigurationParityTest.cs" Link="ApiParity\DataStorageConfigurationParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\DataStorageMetricsParityTest.cs" Link="ApiParity\DataStorageMetricsParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\EventsParityTest.cs" Link="ApiParity\EventsParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\IgniteConfigurationParityTest.cs" Link="ApiParity\IgniteConfigurationParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\IgniteParityTest.cs" Link="ApiParity\IgniteParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\MessagingParityTest.cs" Link="ApiParity\MessagingParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\ParityTest.cs" Link="ApiParity\ParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\QueryEntityConfigurationParityTest.cs" Link="ApiParity\QueryEntityConfigurationParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\ServicesParityTest.cs" Link="ApiParity\ServicesParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\StreamerParityTest.cs" Link="ApiParity\StreamerParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\TransactionMetricsParityTest.cs" Link="ApiParity\TransactionMetricsParityTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\ApiParity\TransactionsParityTest.cs" Link="ApiParity\TransactionsParityTest.cs" /> <Compile Include="..\Apache.Ignite.Core.Tests\AssertExtensions.cs" Link="Common\AssertExtensions.cs" /> <Compile Include="..\Apache.Ignite.Core.Tests\BinaryConfigurationTest.cs" Link="Binary\BinaryConfigurationTest.cs" /> <Compile Include="..\Apache.Ignite.Core.Tests\Binary\BinaryDateTimeTest.cs" Link="Binary\BinaryDateTimeTest.cs" /> @@ -75,9 +98,15 @@ <Compile Include="..\Apache.Ignite.Core.Tests\DataStructures\AtomicReferenceTest.cs" Link="DataStructures\AtomicReferenceTest.cs" /> <Compile Include="..\Apache.Ignite.Core.Tests\DataStructures\AtomicSequenceTest.cs" Link="DataStructures\AtomicSequenceTest.cs" /> <Compile Include="..\Apache.Ignite.Core.Tests\EventsTestLocalListeners.cs" Link="Common\EventsTestLocalListeners.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\IgniteConfigurationTest.cs" Link="Common\IgniteConfigurationTest.cs" /> <Compile Include="..\Apache.Ignite.Core.Tests\IgniteTestBase.cs" Link="Common\IgniteTestBase.cs" /> <Compile Include="..\Apache.Ignite.Core.Tests\Log\CustomLoggerTest.cs" Link="Log\CustomLoggerTest.cs" /> <Compile Include="..\Apache.Ignite.Core.Tests\MessagingTest.cs" Link="Common\MessagingTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\Plugin\PluginTest.cs" Link="Plugin\PluginTest.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\Plugin\TestIgnitePlugin.cs" Link="Plugin\TestIgnitePlugin.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\Plugin\TestIgnitePluginConfiguration.cs" Link="Plugin\TestIgnitePluginConfiguration.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\Plugin\TestIgnitePluginException.cs" Link="Plugin\TestIgnitePluginException.cs" /> + <Compile Include="..\Apache.Ignite.Core.Tests\Plugin\TestIgnitePluginProvider.cs" Link="Plugin\TestIgnitePluginProvider.cs" /> <Compile Include="..\Apache.Ignite.Core.Tests\Query\BinarizablePerson.cs" Link="Cache\Query\BinarizablePerson.cs" /> <Compile Include="..\Apache.Ignite.Core.Tests\TestUtils.Common.cs" Link="Common\TestUtils.Common.cs" /> </ItemGroup> @@ -110,17 +139,14 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Apache.Ignite" Version="0.0.1-test" /> - <PackageReference Include="Apache.Ignite.Linq" Version="0.0.1-test" /> - <PackageReference Include="Apache.Ignite.Schema" Version="0.0.1-test" /> - <PackageReference Include="Apache.Ignite.NLog" Version="0.0.1-test" /> - <PackageReference Include="Apache.Ignite.log4net" Version="0.0.1-test" /> <PackageReference Include="log4net" Version="2.0.5" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" /> - <PackageReference Include="NLog" Version="4.4.12" /> <PackageReference Include="NUnit" Version="3.8.1" /> <PackageReference Include="NUnit3TestAdapter" Version="3.9.0" /> <PackageReference Include="System.Configuration.ConfigurationManager" Version="4.4.0" /> + + <ProjectReference Include="..\Apache.Ignite.Core\Apache.Ignite.Core.DotNetCore.csproj" /> + <ProjectReference Include="..\Apache.Ignite.Linq\Apache.Ignite.Linq.DotNetCore.csproj" /> </ItemGroup> <ItemGroup> @@ -132,6 +158,8 @@ <Folder Include="Config\Client\" /> <Folder Include="Log\" /> <Folder Include="DataStructures\" /> + <Folder Include="ApiParity\" /> + <Folder Include="Plugin\" /> <Folder Include="ThinClient\Cache\" /> </ItemGroup> http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.sln ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.sln b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.sln deleted file mode 100644 index 481c510..0000000 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27004.2006 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Apache.Ignite.Core.Tests.DotNetCore", "Apache.Ignite.Core.Tests.DotNetCore.csproj", "{470E5BC1-61DC-4B42-90B6-9269B476C070}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {470E5BC1-61DC-4B42-90B6-9269B476C070}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {470E5BC1-61DC-4B42-90B6-9269B476C070}.Debug|Any CPU.Build.0 = Debug|Any CPU - {470E5BC1-61DC-4B42-90B6-9269B476C070}.Release|Any CPU.ActiveCfg = Release|Any CPU - {470E5BC1-61DC-4B42-90B6-9269B476C070}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = TRUE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {7BD29E51-C041-4E66-8DC4-8F8B6B917864} - EndGlobalSection -EndGlobal http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.sln.DotSettings ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.sln.DotSettings b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.sln.DotSettings deleted file mode 100644 index 06f463a..0000000 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Apache.Ignite.Core.Tests.DotNetCore.sln.DotSettings +++ /dev/null @@ -1,13 +0,0 @@ -<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> - <s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp70</s:String> - <s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=silent/@EntryIndexedValue"><?xml version="1.0" encoding="utf-16"?><Profile name="silent"><CSReorderTypeMembers>True</CSReorderTypeMembers><CSCodeStyleAttributes ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" RemoveRedundantParentheses="False" AddMissingParentheses="False" ArrangeBraces="False" ArrangeAttributes="False" ArrangeArgumentsStyle="False" /><RemoveCodeRedundancies>True</RemoveCodeRedundancies><CSArrangeQualifiers>True</CSArrangeQualifiers><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode></Profile></s:String> - <s:String x:Key="/Default/CodeStyle/CodeCleanup/SilentCleanupProfile/@EntryValue">silent</s:String> - <s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/IndentSubtags/@EntryValue">DoNotTouch</s:String> - <s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/IndentTagContent/@EntryValue">DoNotTouch</s:String> - <s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/AddImportsToDeepestScope/@EntryValue">True</s:Boolean> - <s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/QualifiedUsingAtNestedScope/@EntryValue">True</s:Boolean> - <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertClosureToMethodGroup/@EntryIndexedValue">DO_NOT_SHOW</s:String> - <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EXml_002ECodeStyle_002EFormatSettingsUpgrade_002EXmlMoveToCommonFormatterSettingsUpgrade/@EntryIndexedValue">True</s:Boolean> - <s:Boolean x:Key="/Default/Environment/UnitTesting/ShadowCopy/@EntryValue">False</s:Boolean> - <s:Boolean x:Key="/Default/Environment/UnitTesting/WrapLongLinesInUnitTestSessionOutput/@EntryValue">False</s:Boolean> -</wpf:ResourceDictionary> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Common/IgnitionStartTest.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Common/IgnitionStartTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Common/IgnitionStartTest.cs index e442cd6..94a536a 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Common/IgnitionStartTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Common/IgnitionStartTest.cs @@ -63,6 +63,9 @@ namespace Apache.Ignite.Core.Tests.DotNetCore.Common // 2) Note that System.Configuration.ConfigurationManager NuGet package has to be installed. var configPath = Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), "app.config"); + // Force test classpath. + TestUtils.GetTestConfiguration(); + using (var ignite = Ignition.StartFromApplicationConfiguration("igniteConfiguration", configPath)) { var cache = ignite.GetCache<int, int>(ignite.GetCacheNames().Single()); http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Common/TestUtils.DotNetCore.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Common/TestUtils.DotNetCore.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Common/TestUtils.DotNetCore.cs index c0586c3..99f732d 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Common/TestUtils.DotNetCore.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/Common/TestUtils.DotNetCore.cs @@ -33,6 +33,8 @@ namespace Apache.Ignite.Core.Tests { TestLogger.Instance.Info("GetTestConfiguration: " + GetTestName()); + Environment.SetEnvironmentVariable("IGNITE_NATIVE_TEST_CLASSPATH", "true"); + return new IgniteConfiguration { DiscoverySpi = GetStaticDiscovery(), http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/README.txt ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/README.txt b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/README.txt deleted file mode 100644 index 0371364..0000000 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/README.txt +++ /dev/null @@ -1,17 +0,0 @@ -Apache Ignite .NET Core tests (cross-platform) -============================================== - -Main Apache.Ignite.sln solution targets .NET 4.0 & VS 2010: we care for backwards compatibility. -However, this does not prevent us from supporting .NET Standard 2.0 and .NET Core 2.0, -because of ".NET Framework compatibility mode", which allows referencing any libraries -from .NET Core 2.0 projects. - -Therefore we can't include .NET Core tests in main solution, and we rely on pre-built -NuGet packages for cross-platform tests. Most tests are still reused from main solution -using "Add As Link" feature. - -How to run: -1) Build Ignite.NET (only on Windows): build -version 0.0.1-test - Special 0.0.1-test version override is used so that we don't have to change package reference in csproj file on each release. -2) Clear NuGet caches: dotnet nuget locals all --clear -3) Build and run cross-platform tests (any OS): dotnet test \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/dotnet-test-windows.bat ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/dotnet-test-windows.bat b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/dotnet-test-windows.bat deleted file mode 100644 index 25b77ff..0000000 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/dotnet-test-windows.bat +++ /dev/null @@ -1,32 +0,0 @@ -:: -:: Licensed to the Apache Software Foundation (ASF) under one or more -:: contributor license agreements. See the NOTICE file distributed with -:: this work for additional information regarding copyright ownership. -:: The ASF licenses this file to You under the Apache License, Version 2.0 -:: (the "License"); you may not use this file except in compliance with -:: the License. You may obtain a copy of the License at -:: -:: http://www.apache.org/licenses/LICENSE-2.0 -:: -:: Unless required by applicable law or agreed to in writing, software -:: distributed under the License is distributed on an "AS IS" BASIS, -:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -:: See the License for the specific language governing permissions and -:: limitations under the License. -:: - -:: Runs tests on WSL (Windows Subsystem for Linux). -:: Ignite.NET must be built on Windows, but cross-platform tests can be run on Linux. - -pushd .\ - -cd .. -powershell -executionpolicy remotesigned -file build.ps1 -skipJava -version 0.0.1-test -popd - -dotnet nuget locals all --clear - -echo Starting tests... -dotnet test - -pause. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/dotnet-test-wsl.bat ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/dotnet-test-wsl.bat b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/dotnet-test-wsl.bat deleted file mode 100644 index f566c17..0000000 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/dotnet-test-wsl.bat +++ /dev/null @@ -1,34 +0,0 @@ -:: -:: Licensed to the Apache Software Foundation (ASF) under one or more -:: contributor license agreements. See the NOTICE file distributed with -:: this work for additional information regarding copyright ownership. -:: The ASF licenses this file to You under the Apache License, Version 2.0 -:: (the "License"); you may not use this file except in compliance with -:: the License. You may obtain a copy of the License at -:: -:: http://www.apache.org/licenses/LICENSE-2.0 -:: -:: Unless required by applicable law or agreed to in writing, software -:: distributed under the License is distributed on an "AS IS" BASIS, -:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -:: See the License for the specific language governing permissions and -:: limitations under the License. -:: - -:: Runs tests on WSL (Windows Subsystem for Linux). -:: Ignite.NET must be built on Windows, but cross-platform tests can be run on Linux. - -pushd .\ - -cd .. -powershell -executionpolicy remotesigned -file build.ps1 -skipJava -version 0.0.1-test - -popd - -bash -c "dotnet nuget locals all --clear" - -echo Starting tests... - -bash -c "dotnet test" - -pause. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/nuget.config ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/nuget.config b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/nuget.config deleted file mode 100644 index ae4c5cd..0000000 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.DotNetCore/nuget.config +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<configuration> - - <packageRestore> - <!-- Allow NuGet to download missing packages --> - <add key="enabled" value="True" /> - - <!-- Automatically check for missing packages during build in Visual Studio --> - <add key="automatic" value="True" /> - </packageRestore> - - <!-- - Used to specify the default Sources for list, install and update. - See: nuget.exe help list - See: nuget.exe help install - See: nuget.exe help update - --> - <packageSources> - <add key="Local" value="../nupkg/" /> - <!-- <add key="NuGet official package source" value="https://nuget.org/api/v2/" /> --> - </packageSources> - -</configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/ParityTest.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/ParityTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/ParityTest.cs index d52ef14..d30d6d1 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/ParityTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/ParityTest.cs @@ -95,8 +95,10 @@ namespace Apache.Ignite.Core.Tests.ApiParity /// </summary> private static string GetFullPath(string javaFilePath) { + javaFilePath = javaFilePath.Replace('\\', Path.DirectorySeparatorChar); + var path = Path.Combine(IgniteHome.Resolve(null), javaFilePath); - Assert.IsTrue(File.Exists(path)); + Assert.IsTrue(File.Exists(path), path); return path; } http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs index 1d51c27..49d9c44 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs @@ -36,7 +36,6 @@ namespace Apache.Ignite.Core.Tests using Apache.Ignite.Core.Discovery.Tcp.Multicast; using Apache.Ignite.Core.Discovery.Tcp.Static; using Apache.Ignite.Core.Events; - using Apache.Ignite.Core.Impl; using Apache.Ignite.Core.Impl.Common; using Apache.Ignite.Core.PersistentStore; using Apache.Ignite.Core.Tests.Plugin; @@ -148,7 +147,8 @@ namespace Apache.Ignite.Core.Tests Assert.AreEqual(cfg.NetworkSendRetryCount, resCfg.NetworkSendRetryCount); Assert.AreEqual(cfg.NetworkTimeout, resCfg.NetworkTimeout); Assert.AreEqual(cfg.NetworkSendRetryDelay, resCfg.NetworkSendRetryDelay); - Assert.AreEqual(cfg.WorkDirectory.Trim('\\'), resCfg.WorkDirectory.Trim('\\')); + Assert.AreEqual(cfg.WorkDirectory.Trim(Path.DirectorySeparatorChar), + resCfg.WorkDirectory.Trim(Path.DirectorySeparatorChar)); Assert.AreEqual(cfg.JvmClasspath, resCfg.JvmClasspath); Assert.AreEqual(cfg.JvmOptions, resCfg.JvmOptions); Assert.AreEqual(cfg.JvmDllPath, resCfg.JvmDllPath); @@ -252,7 +252,7 @@ namespace Apache.Ignite.Core.Tests var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration()) { DataStorageConfiguration = null, - SpringConfigUrl = @"config\spring-test.xml", + SpringConfigUrl = Path.Combine("Config", "spring-test.xml"), NetworkSendRetryDelay = TimeSpan.FromSeconds(45), MetricsHistorySize = 57 }; @@ -315,7 +315,7 @@ namespace Apache.Ignite.Core.Tests [Test] public void TestDefaultSpi() { - var cfg = new IgniteConfiguration + var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration()) { DiscoverySpi = new TcpDiscoverySpi @@ -325,10 +325,7 @@ namespace Apache.Ignite.Core.Tests JoinTimeout = TimeSpan.MaxValue, NetworkTimeout = TimeSpan.MaxValue, SocketTimeout = TimeSpan.MaxValue - }, - JvmClasspath = TestUtils.CreateTestClasspath(), - JvmOptions = TestUtils.TestJavaOptions(), - Localhost = "127.0.0.1" + } }; using (var ignite = Ignition.Start(cfg)) @@ -348,16 +345,14 @@ namespace Apache.Ignite.Core.Tests [Test] public void TestInvalidTimeouts() { - var cfg = new IgniteConfiguration + var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration()) { DiscoverySpi = new TcpDiscoverySpi { AckTimeout = TimeSpan.FromMilliseconds(-5), - JoinTimeout = TimeSpan.MinValue, - }, - JvmClasspath = TestUtils.CreateTestClasspath(), - JvmOptions = TestUtils.TestJavaOptions(), + JoinTimeout = TimeSpan.MinValue + } }; Assert.Throws<IgniteException>(() => Ignition.Start(cfg)); @@ -397,7 +392,7 @@ namespace Apache.Ignite.Core.Tests { var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration()) { - WorkDirectory = IgniteUtils.GetTempDirectoryName() + WorkDirectory = TestUtils.GetTempDirectoryName() }; using (Ignition.Start(cfg)) @@ -442,16 +437,13 @@ namespace Apache.Ignite.Core.Tests /// <param name="ipFinder2">The ip finder2.</param> private static void TestIpFinders(TcpDiscoveryIpFinderBase ipFinder, TcpDiscoveryIpFinderBase ipFinder2) { - var cfg = new IgniteConfiguration + var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration()) { DiscoverySpi = new TcpDiscoverySpi { IpFinder = ipFinder - }, - JvmClasspath = TestUtils.CreateTestClasspath(), - JvmOptions = TestUtils.TestJavaOptions(), - Localhost = "127.0.0.1" + } }; using (var ignite = Ignition.Start(cfg)) @@ -648,7 +640,7 @@ namespace Apache.Ignite.Core.Tests private static IgniteConfiguration GetCustomConfig() { // CacheConfiguration is not tested here - see CacheConfigurationTest - return new IgniteConfiguration + return new IgniteConfiguration(TestUtils.GetTestConfiguration()) { DiscoverySpi = new TcpDiscoverySpi { @@ -683,8 +675,6 @@ namespace Apache.Ignite.Core.Tests NetworkTimeout = TimeSpan.FromMinutes(10), NetworkSendRetryDelay = TimeSpan.FromMinutes(11), WorkDirectory = Path.GetTempPath(), - JvmOptions = TestUtils.TestJavaOptions(), - JvmClasspath = TestUtils.CreateTestClasspath(), Localhost = "127.0.0.1", IsDaemon = false, IsLateAffinityAssignment = false, @@ -807,7 +797,7 @@ namespace Apache.Ignite.Core.Tests PersistenceEnabled = false, MetricsRateTimeInterval = TimeSpan.FromMinutes(2), MetricsSubIntervalCount = 6, - SwapPath = IgniteUtils.GetTempDirectoryName(), + SwapPath = TestUtils.GetTempDirectoryName(), CheckpointPageBufferSize = 28 * 1024 * 1024 }, DataRegionConfigurations = new[] @@ -824,7 +814,7 @@ namespace Apache.Ignite.Core.Tests PersistenceEnabled = false, MetricsRateTimeInterval = TimeSpan.FromMinutes(3), MetricsSubIntervalCount = 7, - SwapPath = IgniteUtils.GetTempDirectoryName() + SwapPath = TestUtils.GetTempDirectoryName() } } } http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Plugin/PluginTest.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Plugin/PluginTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Plugin/PluginTest.cs index 093b3d7..f36d60d 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Plugin/PluginTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Plugin/PluginTest.cs @@ -63,7 +63,7 @@ namespace Apache.Ignite.Core.Tests.Plugin Assert.IsTrue(prov.Started); Assert.AreEqual(null, prov.Stopped); Assert.AreEqual(TestIgnitePluginProvider.PluginName, prov.Name); - Assert.IsNotNullOrEmpty(prov.Copyright); + Assert.IsNotNull(prov.Copyright); Assert.IsNotNull(prov.Context); var ctx = prov.Context; http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ProjectFilesTest.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ProjectFilesTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ProjectFilesTest.cs index 513ec0c..e326fed 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ProjectFilesTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ProjectFilesTest.cs @@ -92,6 +92,7 @@ namespace Apache.Ignite.Core.Tests .Where(x => x.Name != "Apache.Ignite.csproj" && !x.Name.Contains("Test") && !x.Name.Contains("Example") && + !x.Name.Contains("DotNetCore") && !x.Name.Contains("Benchmark")); } http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.DotNetCore.csproj ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.DotNetCore.csproj b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.DotNetCore.csproj new file mode 100644 index 0000000..795dc18 --- /dev/null +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.DotNetCore.csproj @@ -0,0 +1,15 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>netcoreapp2.0</TargetFramework> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <GenerateAssemblyInfo>false</GenerateAssemblyInfo> + <AssemblyName>Apache.Ignite.Core</AssemblyName> + <RootNamespace>Apache.Ignite.Core</RootNamespace> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="System.Configuration.ConfigurationManager" Version="4.4.0" /> + </ItemGroup> + +</Project> http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteHome.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteHome.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteHome.cs index 341dba0..d61c6b4 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteHome.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteHome.cs @@ -27,7 +27,7 @@ namespace Apache.Ignite.Core.Impl.Common /// <summary> /// IgniteHome resolver. /// </summary> - internal static class IgniteHome + public static class IgniteHome { /** Environment variable: IGNITE_HOME. */ internal const string EnvIgniteHome = "IGNITE_HOME"; http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxy.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxy.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxy.cs index 5c108d8..7952865 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxy.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxy.cs @@ -15,6 +15,7 @@ * limitations under the License. */ +#if !NETCOREAPP2_0 namespace Apache.Ignite.Core.Impl.Services { using System; @@ -70,4 +71,5 @@ namespace Apache.Ignite.Core.Impl.Services return (T) base.GetTransparentProxy(); } } -} \ No newline at end of file +} +#endif \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/Services.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/Services.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/Services.cs index a9aea66..ce8332b 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/Services.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/Services.cs @@ -366,6 +366,7 @@ namespace Apache.Ignite.Core.Impl.Services /** <inheritDoc /> */ public T GetServiceProxy<T>(string name, bool sticky) where T : class { +#if !NETCOREAPP2_0 IgniteArgumentCheck.NotNullOrEmpty(name, "name"); IgniteArgumentCheck.Ensure(typeof(T).IsInterface, "T", "Service proxy type should be an interface: " + typeof(T)); @@ -386,6 +387,9 @@ namespace Apache.Ignite.Core.Impl.Services return new ServiceProxy<T>((method, args) => InvokeProxyMethod(javaProxy, method, args, platform)).GetTransparentProxy(); +#else + throw new Apache.Ignite.Core.Common.IgniteException("Service proxies are not supported on .NET Core: IGNITE-7281"); +#endif } /// <summary> http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/AppDomains.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/AppDomains.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/AppDomains.cs index 4b87df5..e98796b 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/AppDomains.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/AppDomains.cs @@ -15,10 +15,10 @@ * limitations under the License. */ -using System; - +#if !NETCOREAPP2_0 namespace Apache.Ignite.Core.Impl.Unmanaged.Jni { + using System; using System.Diagnostics; using System.Runtime.InteropServices; using Apache.Ignite.Core.Common; @@ -133,3 +133,4 @@ namespace Apache.Ignite.Core.Impl.Unmanaged.Jni } } } +#endif \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/Jvm.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/Jvm.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/Jvm.cs index 3699751..3d119cd 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/Jvm.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/Jvm.cs @@ -92,6 +92,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged.Jni /// </summary> private static Callbacks GetCallbacksFromDefaultDomain() { +#if !NETCOREAPP2_0 // JVM exists once per process, and JVM callbacks exist once per process. // We should register callbacks ONLY from the default AppDomain (which can't be unloaded). // Non-default appDomains should delegate this logic to the default one. @@ -109,6 +110,9 @@ namespace Apache.Ignite.Core.Impl.Unmanaged.Jni var helper = (CallbackAccessor)defDomain.CreateInstance(type.Assembly.FullName, type.FullName).Unwrap(); return helper.GetCallbacks(); +#else + throw new IgniteException("Multiple domains are not supported on .NET Core."); +#endif } /// <summary> http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/JvmDll.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/JvmDll.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/JvmDll.cs index 28c85ef..3e1d3a9 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/JvmDll.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/JvmDll.cs @@ -282,6 +282,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged.Jni /// </summary> private static IEnumerable<KeyValuePair<string, string>> GetJvmDllPathsWindows() { +#if !NETCOREAPP2_0 if (!Os.IsWindows) { yield break; @@ -311,6 +312,9 @@ namespace Apache.Ignite.Core.Impl.Unmanaged.Jni } } } +#else + yield break; +#endif } /// <summary> http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.DotNetCore.sln ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.DotNetCore.sln b/modules/platforms/dotnet/Apache.Ignite.DotNetCore.sln new file mode 100644 index 0000000..ecd2840 --- /dev/null +++ b/modules/platforms/dotnet/Apache.Ignite.DotNetCore.sln @@ -0,0 +1,37 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2010 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Apache.Ignite.Core.DotNetCore", "Apache.Ignite.Core\Apache.Ignite.Core.DotNetCore.csproj", "{318E7E44-17E5-49E4-B305-1915221FD947}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Apache.Ignite.Linq.DotNetCore", "Apache.Ignite.Linq\Apache.Ignite.Linq.DotNetCore.csproj", "{5ED9F0FA-C371-49B5-AB5B-C4038F83E2DB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Apache.Ignite.Core.Tests.DotNetCore", "Apache.Ignite.Core.Tests.DotNetCore\Apache.Ignite.Core.Tests.DotNetCore.csproj", "{700215D4-60E8-4DB2-923F-D4F4D95CBD95}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {318E7E44-17E5-49E4-B305-1915221FD947}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {318E7E44-17E5-49E4-B305-1915221FD947}.Debug|Any CPU.Build.0 = Debug|Any CPU + {318E7E44-17E5-49E4-B305-1915221FD947}.Release|Any CPU.ActiveCfg = Release|Any CPU + {318E7E44-17E5-49E4-B305-1915221FD947}.Release|Any CPU.Build.0 = Release|Any CPU + {5ED9F0FA-C371-49B5-AB5B-C4038F83E2DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5ED9F0FA-C371-49B5-AB5B-C4038F83E2DB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5ED9F0FA-C371-49B5-AB5B-C4038F83E2DB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5ED9F0FA-C371-49B5-AB5B-C4038F83E2DB}.Release|Any CPU.Build.0 = Release|Any CPU + {700215D4-60E8-4DB2-923F-D4F4D95CBD95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {700215D4-60E8-4DB2-923F-D4F4D95CBD95}.Debug|Any CPU.Build.0 = Debug|Any CPU + {700215D4-60E8-4DB2-923F-D4F4D95CBD95}.Release|Any CPU.ActiveCfg = Release|Any CPU + {700215D4-60E8-4DB2-923F-D4F4D95CBD95}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A743624F-03A2-4BA8-BA45-06286F337E6F} + EndGlobalSection +EndGlobal http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.DotNetCore.sln.DotSettings ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.DotNetCore.sln.DotSettings b/modules/platforms/dotnet/Apache.Ignite.DotNetCore.sln.DotSettings new file mode 100644 index 0000000..336eece --- /dev/null +++ b/modules/platforms/dotnet/Apache.Ignite.DotNetCore.sln.DotSettings @@ -0,0 +1,11 @@ +<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> + <s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=silent/@EntryIndexedValue"><?xml version="1.0" encoding="utf-16"?><Profile name="silent"><CSReorderTypeMembers>True</CSReorderTypeMembers><CSCodeStyleAttributes ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" RemoveRedundantParentheses="False" AddMissingParentheses="False" ArrangeBraces="False" ArrangeAttributes="False" ArrangeArgumentsStyle="False" /><RemoveCodeRedundancies>True</RemoveCodeRedundancies><CSArrangeQualifiers>True</CSArrangeQualifiers><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode></Profile></s:String> + <s:String x:Key="/Default/CodeStyle/CodeCleanup/SilentCleanupProfile/@EntryValue">silent</s:String> + <s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/IndentSubtags/@EntryValue">DoNotTouch</s:String> + <s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/IndentTagContent/@EntryValue">DoNotTouch</s:String> + <s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/AddImportsToDeepestScope/@EntryValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/QualifiedUsingAtNestedScope/@EntryValue">True</s:Boolean> + <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertClosureToMethodGroup/@EntryIndexedValue">DO_NOT_SHOW</s:String> + <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EXml_002ECodeStyle_002EFormatSettingsUpgrade_002EXmlMoveToCommonFormatterSettingsUpgrade/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/Environment/UnitTesting/ShadowCopy/@EntryValue">False</s:Boolean> +</wpf:ResourceDictionary> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/Apache.Ignite.Linq/Apache.Ignite.Linq.DotNetCore.csproj ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Linq/Apache.Ignite.Linq.DotNetCore.csproj b/modules/platforms/dotnet/Apache.Ignite.Linq/Apache.Ignite.Linq.DotNetCore.csproj new file mode 100644 index 0000000..4e1c6a2 --- /dev/null +++ b/modules/platforms/dotnet/Apache.Ignite.Linq/Apache.Ignite.Linq.DotNetCore.csproj @@ -0,0 +1,16 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>netcoreapp2.0</TargetFramework> + <GenerateAssemblyInfo>false</GenerateAssemblyInfo> + <AssemblyName>Apache.Ignite.Linq</AssemblyName> + <RootNamespace>Apache.Ignite.Linq</RootNamespace> + <NoWarn>NU1701</NoWarn> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="Remotion.Linq" Version="2.0.1" /> + <ProjectReference Include="..\Apache.Ignite.Core\Apache.Ignite.Core.DotNetCore.csproj" /> + </ItemGroup> + +</Project> http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/DEVNOTES.txt ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/DEVNOTES.txt b/modules/platforms/dotnet/DEVNOTES.txt index db5bc6c..30ba924 100644 --- a/modules/platforms/dotnet/DEVNOTES.txt +++ b/modules/platforms/dotnet/DEVNOTES.txt @@ -1,5 +1,5 @@ -Apache Ignite.NET Build Instructions -==================================== +Apache Ignite.NET Build Instructions (Windows) +============================================== Requirements: * Windows (XP and up), Windows Server (2008 and up) @@ -15,4 +15,38 @@ Building binaries: Resulting binaries will be in bin folder, and NuGet packages in nupkg folder. Running built binaries: resulting "bin" folder in self contained, you can copy it anywhere and run - bin\Apache.Ignite.exe \ No newline at end of file + bin\Apache.Ignite.exe + + +Cross-Platform Support +====================== + +Main Apache.Ignite.sln solution targets .NET 4.0 & VS 2010: we care for backwards compatibility. + +However, this does not prevent us from supporting .NET Standard 2.0 and .NET Core 2.0, +because of ".NET Framework compatibility mode", which allows referencing any libraries +from .NET Core 2.0 projects. So we release binaries which target .NET 4.0, and they work +both with .NET 4.0+ and .NET Core 2.0+. + + +Cross-Platform Development (Linux, macOS) +======================================== + +Ignite.NET can be built, developed, and tested on Linux and macOS, but only partially. +A subset of functionality and tests is available. See Apache.Ignite.DotNetCore.sln. + +Requirements: +* .NET Core SDK: https://www.microsoft.com/net/download/linux +* JDK: sudo apt-get install default-jdk +* Maven: sudo apt-get install maven +* IDE: Not required. Rider is recommended. + +Getting started: +* Build Java and .NET: + ./build.sh +* Run tests: + cd Apache.Ignite.Core.Tests.DotNetCore + dotnet test +* Run specific test: + dotnet test --filter CacheTest +* IDE: Open Apache.Ignite.DotNetCore.sln \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/build.ps1 ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/build.ps1 b/modules/platforms/dotnet/build.ps1 index 3acbe47..4bf60f5 100644 --- a/modules/platforms/dotnet/build.ps1 +++ b/modules/platforms/dotnet/build.ps1 @@ -182,7 +182,7 @@ if (!$skipDotNet) { # Restore NuGet packages echo "Restoring NuGet..." - & $ng restore + & $ng restore Apache.Ignite.sln # Build $targets = if ($clean) {"Clean;Rebuild"} else {"Build"} http://git-wip-us.apache.org/repos/asf/ignite/blob/198399bb/modules/platforms/dotnet/build.sh ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/build.sh b/modules/platforms/dotnet/build.sh new file mode 100644 index 0000000..65d81d5 --- /dev/null +++ b/modules/platforms/dotnet/build.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Builds Java and .NET +# + +pushd . +cd ../../.. +mvn clean package -DskipTests -Dmaven.javadoc.skip=true -Plgpl,-examples,-clean-libs,-release,-scala,-clientDocs +popd + +cd Apache.Ignite.Core.Tests.DotNetCore +dotnet build
