Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add net6.0 to package #261

Merged
merged 3 commits into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)\net6.0*\**\*;$(StageDir)\net7.0*\**\*" />
Exclude="$(StageDir)\netcoreapp2.1\**\*;$(StageDir)\net7.0*\**\*" />
</ItemGroup>
<Message Text="$(ZipFiles)" />
<Zip Files="@(ZipFiles)" ZipFileName="$(PackageDir)\DynamicLanguageRuntime.$(PackageVersion).zip" WorkingDirectory="$(StageDir)"/>
Expand Down
51 changes: 51 additions & 0 deletions Build/net6.0.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IsFullFramework>false</IsFullFramework>
</PropertyGroup>

<PropertyGroup>
<Features>$(Features);FEATURE_APARTMENTSTATE</Features>
<Features>$(Features);FEATURE_APPLICATIONEXCEPTION</Features>
<Features>$(Features);FEATURE_ASSEMBLY_CODEBASE</Features>
<Features>$(Features);FEATURE_ASSEMBLY_GETFORWARDEDTYPES</Features>
<Features>$(Features);FEATURE_ASSEMBLY_LOCATION</Features>
<Features>$(Features);FEATURE_ASSEMBLY_RESOLVE</Features>
<Features>$(Features);FEATURE_ASSEMBLYBUILDER_DEFINEDYNAMICASSEMBLY</Features>
<Features>$(Features);FEATURE_BASIC_CONSOLE</Features>
<Features>$(Features);FEATURE_CODEDOM</Features>
<Features>$(Features);FEATURE_COM</Features>
<Features>$(Features);FEATURE_CONFIGURATION</Features>
<Features>$(Features);FEATURE_CUSTOM_TYPE_DESCRIPTOR</Features>
<Features>$(Features);FEATURE_DBNULL</Features>
<Features>$(Features);FEATURE_DRIVENOTFOUNDEXCEPTION</Features>
<Features>$(Features);FEATURE_DYNAMIC_EXPRESSION_VISITOR</Features>
<Features>$(Features);FEATURE_EXCEPTION_STATE</Features>
<Features>$(Features);FEATURE_FILESYSTEM</Features>
<Features>$(Features);FEATURE_FULL_CONSOLE</Features>
<Features>$(Features);FEATURE_FULL_CRYPTO</Features>
<Features>$(Features);FEATURE_FULL_NET</Features>
<Features>$(Features);FEATURE_ICLONEABLE</Features>
<Features>$(Features);FEATURE_LCG</Features>
<Features>$(Features);FEATURE_LOADWITHPARTIALNAME</Features>
<Features>$(Features);FEATURE_METADATA_READER</Features>
<Features>$(Features);FEATURE_MMAP</Features>
<Features>$(Features);FEATURE_NATIVE</Features>
<Features>$(Features);FEATURE_OS_SERVICEPACK</Features>
<Features>$(Features);FEATURE_PIPES</Features>
<Features>$(Features);FEATURE_PROCESS</Features>
<Features>$(Features);FEATURE_REFEMIT</Features>
<Features>$(Features);FEATURE_REGISTRY</Features>
<Features>$(Features);FEATURE_SECURITY_RULES</Features>
<Features>$(Features);FEATURE_SERIALIZATION</Features>
<Features>$(Features);FEATURE_SORTKEY</Features>
<Features>$(Features);FEATURE_STACK_TRACE</Features>
<Features>$(Features);FEATURE_SYNC_SOCKETS</Features>
<Features>$(Features);FEATURE_THREAD</Features>
<Features>$(Features);FEATURE_TYPE_EQUIVALENCE</Features>
<Features>$(Features);FEATURE_TYPECONVERTER</Features>
<Features>$(Features);FEATURE_WARNING_EXCEPTION</Features>
<Features>$(Features);FEATURE_WIN32EXCEPTION</Features>
<Features>$(Features);FEATURE_XMLDOC</Features>
</PropertyGroup>
</Project>
5 changes: 3 additions & 2 deletions Dlr.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28827.37
# Visual Studio Version 17
VisualStudioVersion = 17.3.32811.315
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{9C454D45-326F-4EA1-8177-64341267A17F}"
EndProject
Expand Down Expand Up @@ -36,6 +36,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{60056F49
ProjectSection(SolutionItems) = preProject
Build\After.targets = Build\After.targets
Build\net452.props = Build\net452.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
Expand Down
9 changes: 6 additions & 3 deletions Package/nuget/DynamicLanguageRuntime.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@
<dependency id="System.CodeDom" version="4.7.0" />
<dependency id="System.Configuration.ConfigurationManager" 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\**\*;net6.0*\**\*;net7.0*\**\*" />
<file src="**\*.pdb" target="lib" exclude="netcoreapp2.1\**\*;net6.0*\**\*;net7.0*\**\*" />
<file src="**\*.xml" target="lib" exclude="netcoreapp2.1\**\*;net6.0*\**\*;net7.0*\**\*" />
<file src="**\*.dll" target="lib" exclude="netcoreapp2.1\**\*;net7.0*\**\*" />
<file src="**\*.pdb" target="lib" exclude="netcoreapp2.1\**\*;net7.0*\**\*" />
<file src="**\*.xml" target="lib" exclude="netcoreapp2.1\**\*;net7.0*\**\*" />
<file src="README.md;LICENSE" />
</files>
</package>
6 changes: 6 additions & 0 deletions Src/Microsoft.Dynamic/Actions/EventTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ private HandlerList GetHandlerList(object instance) {
}

#if FEATURE_COM

#pragma warning disable CA1416 // Validate platform compatibility

/// <summary>
/// Gets the stub list for a COM Object. For COM objects we store the stub list
/// directly on the object using the Marshal APIs. This allows us to not have
Expand All @@ -200,6 +203,9 @@ private HandlerList GetComHandlerList(object instance) {

return hl;
}

#pragma warning restore CA1416 // Validate platform compatibility

#endif

/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions Src/Microsoft.Dynamic/ComInterop/ComEventSink.netcoreapp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#if FEATURE_COM

#pragma warning disable CA1416 // Validate platform compatibility

using System;
using System.Collections.Generic;
using System.Diagnostics;
Expand Down
2 changes: 2 additions & 0 deletions Src/Microsoft.Dynamic/ComInterop/ComEventSinksContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#if FEATURE_COM

#pragma warning disable CA1416 // Validate platform compatibility

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
Expand Down
2 changes: 2 additions & 0 deletions Src/Microsoft.Dynamic/ComInterop/ComObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#if FEATURE_COM

#pragma warning disable CA1416 // Validate platform compatibility

using System;
using System.Collections.Generic;
using System.Diagnostics;
Expand Down
2 changes: 2 additions & 0 deletions Src/Microsoft.Dynamic/ComInterop/ComRuntimeHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#if FEATURE_COM

#pragma warning disable CA1416 // Validate platform compatibility

using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
Expand Down
5 changes: 4 additions & 1 deletion Src/Microsoft.Dynamic/ComInterop/ComTypeClassDesc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
// See the LICENSE file in the project root for more information.

#if FEATURE_COM
using System.Linq.Expressions;

#pragma warning disable CA1416 // Validate platform compatibility

using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq.Expressions;

using ComTypes = System.Runtime.InteropServices.ComTypes;

namespace Microsoft.Scripting.ComInterop {
Expand Down
6 changes: 4 additions & 2 deletions Src/Microsoft.Dynamic/ComInterop/ComTypeEnumDesc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@

#if FEATURE_COM

using System.Linq.Expressions;
#pragma warning disable CA1416 // Validate platform compatibility

using System;
using System.Runtime.InteropServices;
using System.Dynamic;
using System.Globalization;
using System.Linq.Expressions;
using System.Runtime.InteropServices;

using ComTypes = System.Runtime.InteropServices.ComTypes;

namespace Microsoft.Scripting.ComInterop {
Expand Down
4 changes: 3 additions & 1 deletion Src/Microsoft.Dynamic/ComInterop/DispatchArgBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
// See the LICENSE file in the project root for more information.

#if FEATURE_COM
#pragma warning disable 612, 618

#pragma warning disable CA1416 // Validate platform compatibility
#pragma warning disable CS0618 // Type or member is obsolete

using System;
using System.Linq.Expressions;
Expand Down
9 changes: 6 additions & 3 deletions Src/Microsoft.Dynamic/ComInterop/IDispatchComObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,25 @@
// See the LICENSE file in the project root for more information.

#if FEATURE_COM
using System.Linq.Expressions;

#pragma warning disable CA1416 // Validate platform compatibility

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Dynamic;
using System.Globalization;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using ComTypes = System.Runtime.InteropServices.ComTypes;
using System.Dynamic;

using Microsoft.Scripting.Utils;

using ComTypes = System.Runtime.InteropServices.ComTypes;

namespace Microsoft.Scripting.ComInterop {

/// <summary>
Expand Down
12 changes: 8 additions & 4 deletions Src/Microsoft.Dynamic/ComInterop/Variant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@
// See the LICENSE file in the project root for more information.

#if FEATURE_COM
#pragma warning disable 618

#pragma warning disable CA1416 // Validate platform compatibility

using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using Microsoft.Scripting.Utils;
using System.Reflection;

using Microsoft.Scripting.Generation;
using System.Reflection.Emit;
using Microsoft.Scripting.Utils;

namespace Microsoft.Scripting.ComInterop {

Expand Down Expand Up @@ -895,7 +897,9 @@ unsafe internal void CopyFromIndirect(object value) {
break;

case VarEnum.VT_ERROR:
#pragma warning disable CS0618 // Type or member is obsolete
*(int*)_typeUnion._unionTypes._byref = ((ErrorWrapper)value).ErrorCode;
#pragma warning restore CS0618 // Type or member is obsolete
break;

case VarEnum.VT_I8:
Expand Down
2 changes: 2 additions & 0 deletions Src/Microsoft.Dynamic/Hosting/Shell/BasicConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ public BasicConsole(bool colorful) {
if (e.SpecialKey == ConsoleSpecialKey.ControlC) {
e.Cancel = true;
CtrlCEvent.Set();
#pragma warning disable SYSLIB0006 // Type or member is obsolete
CreatingThread.Abort(new KeyboardInterruptException(""));
#pragma warning restore SYSLIB0006 // Type or member is obsolete
}
};

Expand Down
4 changes: 4 additions & 0 deletions Src/Microsoft.Dynamic/Hosting/Shell/CommandLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ public void Run(ScriptEngine engine, IConsole console, ConsoleOptions options) {
#if FEATURE_EXCEPTION_STATE
} catch (System.Threading.ThreadAbortException tae) {
if (tae.ExceptionState is KeyboardInterruptException) {
#pragma warning disable SYSLIB0006 // Type or member is obsolete
Thread.ResetAbort();
#pragma warning restore SYSLIB0006 // Type or member is obsolete
_exitCode = -1;
} else {
throw;
Expand Down Expand Up @@ -282,7 +284,9 @@ protected virtual void UnhandledException(Exception e) {
} catch (ThreadAbortException tae) {
if (tae.ExceptionState is KeyboardInterruptException pki) {
UnhandledException(tae);
#pragma warning disable SYSLIB0006 // Type or member is obsolete
Thread.ResetAbort();
#pragma warning restore SYSLIB0006 // Type or member is obsolete
} else {
throw;
}
Expand Down
2 changes: 2 additions & 0 deletions Src/Microsoft.Dynamic/Hosting/Shell/ConsoleHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,9 @@ private void Execute() {
#if FEATURE_APARTMENTSTATE
if (_consoleOptions.IsMta) {
Thread thread = new Thread(ExecuteInternal);
#pragma warning disable CA1416 // Validate platform compatibility
thread.SetApartmentState(ApartmentState.MTA);
#pragma warning restore CA1416 // Validate platform compatibility
thread.Start();
thread.Join();
return;
Expand Down
2 changes: 2 additions & 0 deletions Src/Microsoft.Dynamic/Interpreter/Interpreter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,14 @@ internal static void AbortThreadIfRequested(InterpretedFrame frame, int targetLa
if ((currentThread.ThreadState & System.Threading.ThreadState.AbortRequested) != 0) {
Debug.Assert(_anyAbortException != null);

#pragma warning disable SYSLIB0006 // Type or member is obsolete
#if FEATURE_EXCEPTION_STATE
// The current abort reason needs to be preserved.
currentThread.Abort(_anyAbortException.ExceptionState);
#else
currentThread.Abort();
#endif
#pragma warning restore SYSLIB0006 // Type or member is obsolete
}
}
}
Expand Down
4 changes: 2 additions & 2 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</TargetFrameworks>
<TargetFrameworks>net452;netstandard2.0;netcoreapp3.1;net6.0</TargetFrameworks>
<RootNamespace>Microsoft.Scripting</RootNamespace>
<BaseAddress>859832320</BaseAddress>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand All @@ -25,7 +25,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

<Import Project="$(AfterTargetFiles)" />
Expand Down
21 changes: 16 additions & 5 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</TargetFrameworks>
<TargetFrameworks>net452;netstandard2.0;netcoreapp3.1;net6.0</TargetFrameworks>
<BaseAddress>857735168</BaseAddress>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
Expand All @@ -10,19 +10,30 @@
<Reference Include="System.Configuration" Condition=" $(Features.Contains('FEATURE_CONFIGURATION')) " />
</ItemGroup>

<ItemGroup Condition=" '$(IsFullFramework)' != 'true' ">
<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" />
</ItemGroup>

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

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

<Import Project="$(AfterTargetFiles)" />
Expand Down
Loading