Skip to content

Commit

Permalink
Move .NET assemblies to target netstandard2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jmp75 committed Apr 9, 2019
1 parent 5c31c6e commit 24b1eb0
Show file tree
Hide file tree
Showing 13 changed files with 89 additions and 425 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: rClr
Type: Package
Title: Accessing the Common Language Runtime (.NET/Mono) from R
Version: 0.8.1
Date: 2019-04-08
Version: 0.8.2
Date: 2019-04-09
Authors@R: c( person("Jean-Michel", "Perraud", email =
"jean-michel.perraud@csiro.au", role = c("aut", "cre")))
Author: Jean-Michel Perraud [aut, cre], Kosei Abe, [aut] (R.NET), Nigel
Expand Down
7 changes: 7 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
NEWS/ChangeLog for rClr
--------------------------

0.8-01 2019-04-08 beta
o pre-release, test on R 3.5.x which has significant underlying changes. Most of the changes required appeared to be in R.NET though rather than rClr.
o Move csproj to netstandard2 format and target.

0.8-0 2015-11-01 beta
o Tidy up build process and upgrade to latest recommended practices, notably with testthat

0.7-9 2015-08-30 beta
o Update to use R.NET 1.6.5. Following up on a few requests,
allow for backward compatibility down to
Expand Down
7 changes: 4 additions & 3 deletions R/rClr-package.r
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#' \tabular{ll}{
#' Package: \tab rClr\cr
#' Type: \tab Package\cr
#' Version: \tab 0.8.1\cr
#' Notes: \tab preview release - work on R 3.5.x, which has significant changes under the hood \cr
#' Date: \tab 2019-04-08\cr
#' Version: \tab 0.8.2\cr
#' Notes: \tab preview release - Target netstandard2.0. Work on R 3.5.x, which has significant changes under the hood \cr
#' Date: \tab 2019-04-09\cr
#' License: \tab LGPL 3\cr
#' }
#'
Expand All @@ -18,6 +18,7 @@
#'
#' \tabular{lll}{
#' Version \tab Date \tab Notes \cr
#' 0.8.1: \tab 2019-04-08 \tab preview release - work on R 3.5.x, which has significant changes under the hood. \cr
#' 0.8.0: \tab 2015-11-01 \tab Tidy up build process and upgrade to latest recommended practices, notably with testthat. \cr
#' 0.7-9: \tab 2015-08-30 \tab allow compilation against boehm and SGen versions of mono lib. minor build improvements. \cr
#' 0.7-8: \tab 2015-08-04 \tab Update to use R.NET 1.6.5. Allow for backward compatibility down to R 2.15.3 - While all relevant tests work, note that the level of testing is not on par with tests on R 3.2.x. \cr
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ Under construction as of 2019-04:
```bat
REM important to not have nuget.exe under c:\bin
set PATH=C:\cmd_bin;%PATH%
REM and make sure we use a recent msbuild, otherwise issues with netstandard2 formats.
set PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\;%PATH%
cd c:\src\github_jm
setup_dev
echo %R_EXE%
%R_EXE% CMD build --no-build-vignettes rClr
%R_EXE% CMD INSTALL rClr_0.8.tar.gz
set R_EXE="c:\Program Files\R\R-3.5.2\bin\x64\R.exe"
set R_VANILLA=%R_EXE% --no-save --no-restore-data
%R_VANILLA% CMD build rClr
%R_VANILLA% CMD INSTALL --build rClr_0.8.x.tar.gz
```

#### Windows
Expand Down
7 changes: 4 additions & 3 deletions man/rClr-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

182 changes: 16 additions & 166 deletions src/ClrFacade/ClrFacade.csproj
Original file line number Diff line number Diff line change
@@ -1,176 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.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" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{024B0C26-BED0-467D-B332-E9796B756133}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Rclr</RootNamespace>
<AssemblyName>ClrFacade</AssemblyName>
<FileAlignment>512</FileAlignment>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkProfile />
<TargetFramework>netstandard2.0</TargetFramework>
<Version>0.8.1</Version>
<Copyright>(c) 2014-2019 Jean-Michel Perraud</Copyright>
<Description>.NET interoperability on top of R.NET for the rClr package</Description>
<Product>rClr</Product>
<Company />
<Authors>Jean-Michel Perraud</Authors>
<Title>ClrFacade; embed .NET in R</Title>
<PackageLicenseUrl>https://github.com/jmp75/rclr/blob/master/License.txt</PackageLicenseUrl>
<RepositoryUrl>https://github.com/jmp75/rclr</RepositoryUrl>
<PackageProjectUrl>https://github.com/jmp75/rclr</PackageProjectUrl>
<PackageReleaseNotes>Migration to .NET Standard 2.0 and supporting R 3.5.x</PackageReleaseNotes>
<!-- forces SDK to copy dependencies into build output to make packing easier -->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'MonoDebug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\MonoDebug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'MonoInstallDebug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\MonoInstallDebug\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'MonoInstall|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\MonoInstall\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="DynamicInterop, Version=0.9.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamicInterop.0.9.1\lib\netstandard2.0\DynamicInterop.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Win32.Registry, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Win32.Registry.4.5.0\lib\net461\Microsoft.Win32.Registry.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="RDotNet, Version=1.8.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\R.NET.1.8.0-alpha1\lib\netstandard2.0\RDotNet.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="System.Security.AccessControl, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.AccessControl.4.5.0\lib\net461\System.Security.AccessControl.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Principal.Windows.4.5.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="DynamicInterop">
<HintPath>..\packages\DynamicInterop.0.7.3\lib\net40\DynamicInterop.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ClrFacade.cs" />
<Compile Include="DataConverterExtensions.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="HelloWorld.cs" />
<Compile Include="IDataConverter.cs" />
<Compile Include="PerformanceProfiling.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RclrBinder.cs" />
<Compile Include="RclrUnmanagedDll.cs" />
<Compile Include="RDotNetDataConverter.cs" />
<Compile Include="RdotnetDataConverterTests.cs" />
<Compile Include="ReflectionHelper.cs" />
<Compile Include="TestArrayMemoryHandling.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>TestArrayMemoryHandling.tt</DependentUpon>
</Compile>
<Compile Include="TestCases.cs" />
<Compile Include="TestMethodBinding.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>TestMethodBinding.tt</DependentUpon>
</Compile>
<Compile Include="Tests\RefClasses\BaseAbstractClassOne.cs" />
<Compile Include="Tests\RefClasses\InterfaceOne.cs" />
<Compile Include="Tests\RefClasses\LevelOneClass.cs" />
<Compile Include="Tests\RefClasses\LevelThreeClass.cs" />
<Compile Include="Tests\RefClasses\LevelTwoClass.cs" />
<Compile Include="Tests\TestUtilities.cs" />
<Compile Include="DataConversionHelper.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
<None Include="TestClassesDiagram.cd" />
<None Include="ClassDiagram.cd" />
<None Include="TestArrayMemoryHandling.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>TestArrayMemoryHandling.cs</LastGenOutput>
</None>
<None Include="TestMethodBinding.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>TestMethodBinding.cs</LastGenOutput>
</None>
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
<PackageReference Include="R.NET" Version="1.8.0-alpha1" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target> -->
<!-- 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>
36 changes: 0 additions & 36 deletions src/ClrFacade/Properties/AssemblyInfo.cs

This file was deleted.

9 changes: 0 additions & 9 deletions src/ClrFacade/packages.config

This file was deleted.

11 changes: 6 additions & 5 deletions src/Makefile.win.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ detailedconfiginfo:
-@echo Windows architecture "$(R_ARCH)"
-@echo "env variable TEMP is $(TEMP)"
-@echo "env variable TMP is $(TMP)"
-@echo BuildConfiguration=$(BuildConfiguration)
-@echo BuildMonoSupport=$(BuildMonoSupport)
-@echo Mono Build configuration "$(MonoBuildConfiguration)"
-@echo R_ARCH=$(R_ARCH)
Expand All @@ -65,7 +66,7 @@ detailedconfiginfo:
-@echo CXX=$(CXX)
-@echo ALL_CFLAGS=$(ALL_CFLAGS)
-@echo ALL_CPPFLAGS=$(ALL_CPPFLAGS)
-@echo build cmd line: $(MSB) $(SLN) /t:$(MODE) /p:Configuration=$(BuildConfiguration) /p:Platform="inserted" $(MSB_OPTIONS_EXTRA)
-@echo build cmd line: $(MSB) $(SLN) //t:$(MODE) //p:Configuration=$(BuildConfiguration) //p:Platform="replaced_tgt_platform" $(MSB_OPTIONS_EXTRA);
-@echo **END Variable**

rClrNugetRestore: rClr.cpp
Expand All @@ -75,7 +76,7 @@ rClrLibComp: rClrNugetRestore
@for tgt_platform in x64 Win32; do \
$(MSB) $(SLN) //t:$(MODE) //p:Configuration=$(BuildConfiguration) //p:Platform="$$tgt_platform" $(MSB_OPTIONS_EXTRA); \
done; \
if [ "$(BuildMonoSupport)" = "True" ] ; then $(MSB) $(SLN) /t:$(MODE) /p:Configuration=$(MonoBuildConfiguration) /p:Platform="Win32" $(MSB_OPTIONS_EXTRA) ; fi
if [ "$(BuildMonoSupport)" = "True" ] ; then $(MSB) $(SLN) /t:$(MODE) //p:Configuration=$(MonoBuildConfiguration) ///p:Platform="Win32" $(MSB_OPTIONS_EXTRA) ; fi

instdir:
@for r_architecture in x64 i386; do \
Expand All @@ -98,11 +99,11 @@ rClrLib: rClrLibComp
bin_dir=./$(MonoBuildConfiguration); \
RCLRBINS="$$bin_dir/rClrMono.dll $$bin_dir/rClrMono.exp $$bin_dir/rClrMono.lib $$bin_dir/rClrMono.pdb" ; \
if [ "$(BuildMonoSupport)" = "True" ] ; then $(ROBOCP_CMD) $$RCLRBINS $(INSTDIR)/libs/i386/ ; fi ;
-$(ROBOCP_CMD) ./$(BuildConfiguration)/ $(INSTDIR)/libs/ $(CLR_FACADE_BINS)
-$(ROBOCP_CMD) ./$(BuildConfiguration)/ $(INSTDIR)/libs/ $(RDOTNET_BINS)
-$(ROBOCP_CMD) ./ClrFacade/bin/$(BuildConfiguration)/netstandard2.0/ $(INSTDIR)/libs/ $(CLR_FACADE_BINS)
-$(ROBOCP_CMD) ./ClrFacade/bin/$(BuildConfiguration)/netstandard2.0/ $(INSTDIR)/libs/ $(RDOTNET_BINS)

clean:
$(MSB) $(SLN) /t:Clean
$(MSB) $(SLN) //t:Clean

distclean: clean
-rm -rf $(INSTDIR)
Expand Down
Loading

0 comments on commit 24b1eb0

Please sign in to comment.