Skip to content

Commit

Permalink
Retarget to .NET Framework 4.6.2 (#275)
Browse files Browse the repository at this point in the history
* Retarget to .NET 4.6.2

* Bump dependencies
  • Loading branch information
slozier authored Sep 8, 2023
1 parent a7cf586 commit 7b478c3
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 109 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core 2.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: '2.1.x'
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
Expand All @@ -37,9 +33,6 @@ jobs:
- name: Test (net462)
run: ./make.ps1 -frameworks net462 test-all
shell: pwsh
- name: Test (netcoreapp2.1)
run: ./make.ps1 -frameworks netcoreapp2.1 test-all
shell: pwsh
- name: Test (netcoreapp3.1)
run: ./make.ps1 -frameworks netcoreapp3.1 test-all
shell: pwsh
Expand Down
2 changes: 1 addition & 1 deletion Build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
Outputs="$(PackageDir)\DynamicLanguageRuntime.$(PackageVersion).zip">
<ItemGroup>
<ZipFiles Include="$(StageDir)\**\*.dll;$(StageDir)\**\*.xml;$(StageDir)\README.md;$(StageDir)\LICENSE"
Exclude="$(StageDir)\netcoreapp2.1\*;$(StageDir)\net462\*;$(StageDir)\net7.0\*;$(StageDir)\net8.0\*" />
Exclude="$(StageDir)\netcoreapp3.1\*;$(StageDir)\net7.0*\*;$(StageDir)\net8.0*\*" />
</ItemGroup>
<Message Text="$(ZipFiles)" />
<Zip Files="@(ZipFiles)" ZipFileName="$(PackageDir)\DynamicLanguageRuntime.$(PackageVersion).zip" WorkingDirectory="$(StageDir)"/>
Expand Down
File renamed without changes.
38 changes: 0 additions & 38 deletions Build/netcoreapp3.1.props

This file was deleted.

6 changes: 0 additions & 6 deletions Build/steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ steps:
Write-Host ("##vso[task.setvariable variable=PackageVersion;isSecret=false;isOutput=true;]$PackageVersion")
displayName: Grab Package Version
- task: UseDotNet@2
displayName: Install .NET Core 2.1 runtime for testing
inputs:
packageType: 'runtime'
version: '2.1.x'

- task: UseDotNet@2
displayName: Install .NET Core 3.1 runtime for testing
inputs:
Expand Down
3 changes: 1 addition & 2 deletions Dlr.sln
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{60056F49-17D6-4C5C-80EC-F203BA2F7E3B}"
ProjectSection(SolutionItems) = preProject
Build\After.targets = Build\After.targets
Build\net452.props = Build\net452.props
Build\net462.props = Build\net462.props
Build\net6.0.props = Build\net6.0.props
Build\netcoreapp3.1.props = Build\netcoreapp3.1.props
Build\netstandard2.0.props = Build\netstandard2.0.props
Build\steps.yml = Build\steps.yml
EndProjectSection
Expand Down
16 changes: 6 additions & 10 deletions Package/nuget/DynamicLanguageRuntime.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,23 @@
<language>en-US</language>
<tags>dynamic dlr</tags>
<dependencies>
<group targetFramework="net452">
<group targetFramework="net462">
</group>
<group targetFramework="netstandard2.0">
<dependency id="System.CodeDom" version="4.6.0" />
<dependency id="System.Configuration.ConfigurationManager" version="4.6.0" />
<dependency id="System.Reflection.Emit" version="4.6.0" />
<dependency id="System.Reflection.Emit.Lightweight" version="4.6.0" />
</group>
<group targetFramework="netcoreapp3.1">
<dependency id="System.CodeDom" version="4.7.0" />
<dependency id="System.Configuration.ConfigurationManager" version="4.7.0" />
<dependency id="System.Reflection.Emit" version="4.7.0" />
<dependency id="System.Reflection.Emit.Lightweight" version="4.7.0" />
</group>
<group targetFramework="net6.0">
<dependency id="System.CodeDom" version="6.0.0" />
</group>
</dependencies>
</metadata>
<files>
<file src="**\*.dll" target="lib" exclude="netcoreapp2.1\*;net462\*;net7.0\*;net8.0\*" />
<file src="**\*.pdb" target="lib" exclude="netcoreapp2.1\*;net462\*;net7.0\*;net8.0\*" />
<file src="**\*.xml" target="lib" exclude="netcoreapp2.1\*;net462\*;net7.0\*;net8.0\*" />
<file src="**\*.dll" target="lib" exclude="netcoreapp3.1\*;net7.0*\*;net8.0*\*" />
<file src="**\*.pdb" target="lib" exclude="netcoreapp3.1\*;net7.0*\*;net8.0*\*" />
<file src="**\*.xml" target="lib" exclude="netcoreapp3.1\*;net7.0*\*;net8.0*\*" />
<file src="README.md;LICENSE" />
</files>
</package>
2 changes: 1 addition & 1 deletion Package/nuget/NuGet.Packaging.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.Build.NoTargets/3.3.0">

<PropertyGroup>
<TargetFramework>net452</TargetFramework>
<TargetFramework>net462</TargetFramework>
<NuspecBasePath>$(StageDir)</NuspecBasePath>
<NuspecProperties>version=$(PackageVersion)</NuspecProperties>
<IncludeBuildOutput>false</IncludeBuildOutput>
Expand Down
6 changes: 3 additions & 3 deletions Src/Microsoft.Dynamic/Microsoft.Dynamic.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0;netcoreapp3.1;net6.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;net6.0</TargetFrameworks>
<RootNamespace>Microsoft.Scripting</RootNamespace>
<BaseAddress>859832320</BaseAddress>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand All @@ -20,8 +20,8 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.Reflection.Emit" Version="4.6.0" />
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.6.0" />
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 0 additions & 4 deletions Src/Microsoft.Scripting.Metadata/MemoryMapping.V4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,7 @@ public static MemoryMapping Create(string path) {
try {
stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Delete | FileShare.ReadWrite);

#if NET452
file = MemoryMappedFile.CreateFromFile(stream, null, 0, MemoryMappedFileAccess.Read, null, HandleInheritability.None, true);
#else
file = MemoryMappedFile.CreateFromFile(stream, null, 0, MemoryMappedFileAccess.Read, HandleInheritability.None, true);
#endif
accessor = file.CreateViewAccessor(0, 0, MemoryMappedFileAccess.Read);
mapping = new MemoryMapping();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<BaseAddress>859832320</BaseAddress>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
11 changes: 2 additions & 9 deletions Src/Microsoft.Scripting/Microsoft.Scripting.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0;netcoreapp3.1;net6.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;net6.0</TargetFrameworks>
<BaseAddress>857735168</BaseAddress>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
Expand All @@ -11,18 +11,11 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.6.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.CodeDom" Version="4.6.0" />
<PackageReference Include="System.Reflection.Emit" Version="4.6.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.CodeDom" Version="4.7.0" />
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
Expand Down
2 changes: 1 addition & 1 deletion Tests/ClrAssembly/ClrAssembly.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<RootNamespace>merlintest</RootNamespace>
<AssemblyName>merlintest.dummy</AssemblyName>
</PropertyGroup>
Expand Down
11 changes: 3 additions & 8 deletions Tests/Metadata/Metadata.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;netcoreapp2.1;netcoreapp3.1;net6.0</TargetFrameworks>
<!-- EOL netcoreapp2.1 is used to test netstandard2.0 assemblies -->
<TargetFrameworks>net462;netcoreapp3.1;net6.0</TargetFrameworks>
<!-- EOL netcoreapp3.1 is used to test netstandard2.0 assemblies -->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand All @@ -16,14 +16,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="NUnitLite" Version="3.13.3" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1'">
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Update="NUnit3TestAdapter" Version="4.2.1" />
</ItemGroup>

</Project>
13 changes: 4 additions & 9 deletions Tests/Microsoft.Dynamic.Test/Microsoft.Dynamic.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;netcoreapp2.1;netcoreapp3.1;net6.0</TargetFrameworks>
<!-- EOL netcoreapp2.1 is used to test netstandard2.0 assemblies -->
<TargetFrameworks>net462;netcoreapp3.1;net6.0</TargetFrameworks>
<!-- EOL netcoreapp3.1 is used to test netstandard2.0 assemblies -->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="NUnitLite" Version="3.13.3" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1'">
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Update="NUnit3TestAdapter" Version="4.2.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Src\Microsoft.Dynamic\Microsoft.Dynamic.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;netcoreapp2.1;netcoreapp3.1;net6.0</TargetFrameworks>
<!-- EOL netcoreapp2.1 is used to test netstandard2.0 assemblies -->
<TargetFrameworks>net462;netcoreapp3.1;net6.0</TargetFrameworks>
<!-- EOL netcoreapp3.1 is used to test netstandard2.0 assemblies -->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>

Expand All @@ -12,11 +12,6 @@
<PackageReference Include="NUnitLite" Version="3.13.3" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1'">
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Update="NUnit3TestAdapter" Version="4.2.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Src\Microsoft.Scripting\Microsoft.Scripting.csproj" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Param(
[Parameter(Position=1)]
[String] $target = "release",
[String] $configuration = "Release",
[String[]] $frameworks=@('net462','netcoreapp2.1','netcoreapp3.1','net6.0'),
[String[]] $frameworks=@('net462','netcoreapp3.1','net6.0'),
[String] $platform = "x64",
[switch] $runIgnored
)
Expand Down Expand Up @@ -62,7 +62,7 @@ function GenerateRunSettings([String] $folder, [String] $framework, [String] $pl

# <RunSettings>
# <TestRunParameters>
# <Parameter name="FRAMEWORK" value="net452" />
# <Parameter name="FRAMEWORK" value="net462" />
# </TestRunParameters>
# </RunSettings>

Expand Down

0 comments on commit 7b478c3

Please sign in to comment.