Skip to content

Commit 63aeca6

Browse files
committed
wip: .NET Core Support
This is still work in progress. Current issues: - [ ] Internals are not visible to tests/SRM, which breaks the build - [ ] README needs updating with compatibility matrix - [ ] Extensions built with .NET Core need testing
1 parent 1bbea79 commit 63aeca6

File tree

12 files changed

+350
-642
lines changed

12 files changed

+350
-642
lines changed
Lines changed: 16 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,10 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props')" />
4-
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
5-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
62
<PropertyGroup>
7-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9-
<ProjectGuid>{F87EC4C6-1E25-4433-8C15-B9550AF1D0EA}</ProjectGuid>
3+
<TargetFramework>net45</TargetFramework>
104
<OutputType>Library</OutputType>
11-
<AppDesignerFolder>Properties</AppDesignerFolder>
12-
<RootNamespace>SharpShell.Tests</RootNamespace>
13-
<AssemblyName>SharpShell.Tests</AssemblyName>
14-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
15-
<FileAlignment>512</FileAlignment>
165
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
176
<RestorePackages>true</RestorePackages>
18-
<NuGetPackageImportStamp>
19-
</NuGetPackageImportStamp>
20-
</PropertyGroup>
21-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
22-
<DebugSymbols>true</DebugSymbols>
23-
<DebugType>full</DebugType>
24-
<Optimize>false</Optimize>
25-
<OutputPath>bin\Debug\</OutputPath>
26-
<DefineConstants>DEBUG;TRACE</DefineConstants>
27-
<ErrorReport>prompt</ErrorReport>
28-
<WarningLevel>4</WarningLevel>
29-
</PropertyGroup>
30-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
31-
<DebugType>pdbonly</DebugType>
32-
<Optimize>true</Optimize>
33-
<OutputPath>bin\Release\</OutputPath>
34-
<DefineConstants>TRACE</DefineConstants>
35-
<ErrorReport>prompt</ErrorReport>
36-
<WarningLevel>4</WarningLevel>
7+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
378
</PropertyGroup>
389
<PropertyGroup>
3910
<SignAssembly>true</SignAssembly>
@@ -42,58 +13,23 @@
4213
<AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
4314
</PropertyGroup>
4415
<ItemGroup>
45-
<Reference Include="nunit.framework, Version=3.11.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
46-
<HintPath>..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
47-
</Reference>
48-
<Reference Include="System" />
49-
<Reference Include="System.Core" />
50-
<Reference Include="System.Xml.Linq" />
51-
<Reference Include="System.Data.DataSetExtensions" />
52-
<Reference Include="Microsoft.CSharp" />
53-
<Reference Include="System.Data" />
54-
<Reference Include="System.Xml" />
55-
</ItemGroup>
56-
<ItemGroup>
57-
<Compile Include="Diagnostics\Loggers\FileLogger.cs" />
58-
<Compile Include="Helpers\Win32HelperTests.cs" />
59-
<Compile Include="PidlManagerTests.cs" />
60-
<Compile Include="Registry\InMemoryRegistryKeyTests.cs" />
61-
<Compile Include="Registry\WindowsRegistryKeyTests.cs" />
62-
<Compile Include="Registry\InMemoryRegistryTests.cs" />
63-
<Compile Include="Registry\WindowsRegistryTests.cs" />
64-
<Compile Include="ServerRegistration\FileExtensionClassTests.cs" />
65-
<Compile Include="ServerRegistration\ServerRegistrationManagerTests.cs" />
66-
<Compile Include="ServiceRegistry\ServiceRegistryTests.cs" />
67-
<Compile Include="ShellInteropTests.cs" />
68-
<Compile Include="Properties\AssemblyInfo.cs" />
69-
</ItemGroup>
70-
<ItemGroup>
71-
<ProjectReference Include="..\SharpShell\SharpShell.csproj">
72-
<Project>{B5D5F670-BFBA-4D09-91C6-74BB12B7EDD4}</Project>
73-
<Name>SharpShell</Name>
74-
</ProjectReference>
16+
<ProjectReference Include="..\SharpShell\SharpShell.csproj" />
7517
</ItemGroup>
7618
<ItemGroup>
7719
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
7820
</ItemGroup>
7921
<ItemGroup>
80-
<None Include="Key.snk" />
81-
<None Include="packages.config" />
22+
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
23+
<PackageReference Include="NUnit" Version="3.11.0" />
24+
<PackageReference Include="NUnit.Console" Version="3.9.0" />
25+
<PackageReference Include="NUnit.ConsoleRunner" Version="3.9.0" />
26+
<PackageReference Include="NUnit.Extension.NUnitProjectLoader" Version="3.5.0" />
27+
<PackageReference Include="NUnit.Extension.NUnitV2Driver" Version="3.6.0" />
28+
<PackageReference Include="NUnit.Extension.NUnitV2ResultWriter" Version="3.5.0" />
29+
<PackageReference Include="NUnit.Extension.TeamCityEventListener" Version="1.0.3" />
30+
<PackageReference Include="NUnit.Extension.VSProjectLoader" Version="3.8.0" />
31+
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
32+
<PackageReference Include="OpenCover" Version="4.6.519" />
33+
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
8234
</ItemGroup>
83-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
84-
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
85-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
86-
<PropertyGroup>
87-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
88-
</PropertyGroup>
89-
<Error Condition="!Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.11.0\build\NUnit.props'))" />
90-
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props'))" />
91-
</Target>
92-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
93-
Other similar extension points exist, see Microsoft.Common.targets.
94-
<Target Name="BeforeBuild">
95-
</Target>
96-
<Target Name="AfterBuild">
97-
</Target>
98-
-->
9935
</Project>
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props')" />
4+
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
5+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
6+
<PropertyGroup>
7+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9+
<ProjectGuid>{F87EC4C6-1E25-4433-8C15-B9550AF1D0EA}</ProjectGuid>
10+
<OutputType>Library</OutputType>
11+
<AppDesignerFolder>Properties</AppDesignerFolder>
12+
<RootNamespace>SharpShell.Tests</RootNamespace>
13+
<AssemblyName>SharpShell.Tests</AssemblyName>
14+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
15+
<FileAlignment>512</FileAlignment>
16+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
17+
<RestorePackages>true</RestorePackages>
18+
<NuGetPackageImportStamp>
19+
</NuGetPackageImportStamp>
20+
</PropertyGroup>
21+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
22+
<DebugSymbols>true</DebugSymbols>
23+
<DebugType>full</DebugType>
24+
<Optimize>false</Optimize>
25+
<OutputPath>bin\Debug\</OutputPath>
26+
<DefineConstants>DEBUG;TRACE</DefineConstants>
27+
<ErrorReport>prompt</ErrorReport>
28+
<WarningLevel>4</WarningLevel>
29+
</PropertyGroup>
30+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
31+
<DebugType>pdbonly</DebugType>
32+
<Optimize>true</Optimize>
33+
<OutputPath>bin\Release\</OutputPath>
34+
<DefineConstants>TRACE</DefineConstants>
35+
<ErrorReport>prompt</ErrorReport>
36+
<WarningLevel>4</WarningLevel>
37+
</PropertyGroup>
38+
<PropertyGroup>
39+
<SignAssembly>true</SignAssembly>
40+
</PropertyGroup>
41+
<PropertyGroup>
42+
<AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
43+
</PropertyGroup>
44+
<ItemGroup>
45+
<Reference Include="nunit.framework, Version=3.11.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
46+
<HintPath>..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
47+
</Reference>
48+
<Reference Include="System" />
49+
<Reference Include="System.Core" />
50+
<Reference Include="System.Xml.Linq" />
51+
<Reference Include="System.Data.DataSetExtensions" />
52+
<Reference Include="Microsoft.CSharp" />
53+
<Reference Include="System.Data" />
54+
<Reference Include="System.Xml" />
55+
</ItemGroup>
56+
<ItemGroup>
57+
<Compile Include="Diagnostics\Loggers\FileLogger.cs" />
58+
<Compile Include="Helpers\Win32HelperTests.cs" />
59+
<Compile Include="PidlManagerTests.cs" />
60+
<Compile Include="Registry\InMemoryRegistryKeyTests.cs" />
61+
<Compile Include="Registry\WindowsRegistryKeyTests.cs" />
62+
<Compile Include="Registry\InMemoryRegistryTests.cs" />
63+
<Compile Include="Registry\WindowsRegistryTests.cs" />
64+
<Compile Include="ServerRegistration\FileExtensionClassTests.cs" />
65+
<Compile Include="ServerRegistration\ServerRegistrationManagerTests.cs" />
66+
<Compile Include="ServiceRegistry\ServiceRegistryTests.cs" />
67+
<Compile Include="ShellInteropTests.cs" />
68+
<Compile Include="Properties\AssemblyInfo.cs" />
69+
</ItemGroup>
70+
<ItemGroup>
71+
<ProjectReference Include="..\SharpShell\SharpShell.csproj">
72+
<Project>{B5D5F670-BFBA-4D09-91C6-74BB12B7EDD4}</Project>
73+
<Name>SharpShell</Name>
74+
</ProjectReference>
75+
</ItemGroup>
76+
<ItemGroup>
77+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
78+
</ItemGroup>
79+
<ItemGroup>
80+
<None Include="Key.snk" />
81+
<None Include="packages.config" />
82+
</ItemGroup>
83+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
84+
</Project>

SharpShell/SharpShell/Pidl/PidlManager.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.IO;
43
using System.Linq;
5-
using System.Net.Configuration;
64
using System.Runtime.InteropServices;
7-
using System.Security.Cryptography;
85
using SharpShell.Interop;
96

107
// Notes:

SharpShell/SharpShell/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 24 deletions
This file was deleted.

SharpShell/SharpShell/SharpNamespaceExtension/SharpNamespaceExtension.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.ComponentModel;
43
using System.Drawing;
5-
using System.EnterpriseServices;
6-
using System.Linq;
7-
using System.Reflection.Emit;
84
using System.Runtime.InteropServices;
95
using System.Security.AccessControl;
10-
using System.Security.Cryptography;
11-
using System.Security.Principal;
12-
using System.Text;
13-
using System.Text.RegularExpressions;
14-
using System.Windows.Forms;
156
using Microsoft.Win32;
167
using SharpShell.Attributes;
178
using SharpShell.Extensions;

0 commit comments

Comments
 (0)