Skip to content

Commit

Permalink
Support .NET 7 (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
9ee1 authored Dec 1, 2022
1 parent b4b9e48 commit 7bed309
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Gee.External.Capstone/Gee.External.Capstone.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0;net7.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

<Version>2.3.0</Version>
Expand Down
19 changes: 2 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Capstone.NET
Capstone.NET is an opinionated .NET Core and a .NET Framework binding for the [Capstone disassembly framework](http://www.capstone-engine.org). It is written in C#, supports _Capstone 4_, and has a friendly and simple type safe API that is ridiculously easy to learn and quick to pick up.

[![Nuget](https://img.shields.io/nuget/dt/Gee.External.Capstone?label=Capstone.NET%20V2.1.0&style=for-the-badge)](https://www.nuget.org/packages/Gee.External.Capstone)
[![Nuget](https://img.shields.io/nuget/dt/Gee.External.Capstone?label=Capstone.NET%20V2.3.0&style=for-the-badge)](https://www.nuget.org/packages/Gee.External.Capstone)

## Features
* Supports _Capstone 4_. Only the ARM, ARM64, M68K, MIPS, PowerPC, X86, and XCore architectures are supported right now
Expand All @@ -10,26 +10,11 @@ Capstone.NET is an opinionated .NET Core and a .NET Framework binding for the [C

* A friendly and simple to use type safe API that is ridiculously easy to learn and pick up

## Requirements
* **Capstone 4**: Capstone.NET is compatible with the x86 and x64 versions of _Capstone 4_. Older versions of Capstone are not supported

* **.NET 5+**: Capstone.NET is compatible with _.NET 5_ and greater

* **.NET Framework 4.6.1+**: Capstone.NET is compatible with _.NET Framework 4.6.1_ and greater. If your application is still reliant on .NET Framework, please note that Microsoft [has deprecated, and no longer supports](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-framework), any version of .NET Framework before _.NET Framework 4.6.2_

When _Capstone.NET 2.0_ was first released, .NET Core did not support Windows GUI applications. As such, _Capstone.NET 2.0_ explicitly supported _.NET Framework 4.0_ and greater to allow developers building Windows GUI applications to use Capstone.NET.

Today, Windows GUI applications are supported on .NET. Developers no longer need to use .NET Framework to build Windows GUI applications. Furthermore, Microsoft [has deprecated, and no longer supports](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-framework), any version of .NET Framework before _.NET Framework 4.6.2_.

Starting with _Capstone.NET 2.1_, the minimal supported version of .NET Framework is _.NET Framework 4.6.1_. If you're wondering why _.NET Framework 4.6.1_ even though it is deprecated, please consult the [.NET Compatibility Matrix](https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-0).

## Installation
Either open the NuGet Package Manager in Visual Studio and search for "Capstone.NET" or head over to the [NuGet website](https://www.nuget.org/packages/Gee.External.Capstone) and download the NuGet package yourself. The NuGet package bundles Capstone. You can also clone this repository and build Capstone.NET yourself.

## Building
You can build Capstone.NET by opening the Visual Studio solution in _Visual Studio 2017_ and building from there. The Visual Studio solution has "Debug" and "Release" configurations for multiple platforms. Make sure you select the combination you're targeting before you build.

The Visual Studio solution is a _Visual Studio 2017_ solution. I have not tried any other version of Visual Studio so I am not sure if there will be problems if you attempt to open the solution file in an older version of Visual Studio.
You can build Capstone.NET by opening the Visual Studio solution in _Visual Studio 2017_ or greater, and building from there. The Visual Studio solution has "Debug" and "Release" configurations. Make sure you select the configuration you're targeting before you build.

## Acknowledgments
Greetings to my sensi Mohamed Saher ([@halsten](https://twitter.com/@halsten)) who suggested I take on this project and was a major help in debugging some stucture alignment issues, the Capstone team ([@capstone_engine](https://twitter.com/@capstone_engine)) for all the great work they are doing, and Matt Graeber ([@mattifestation](https://twitter.com/@mattifestation)) who wrote the original binding for _Capstone 2_ and whose work was a starting point for this project.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<PropertyGroup>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="FluentAssertions" Version="6.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="coverlet.collector" Version="3.2.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit 7bed309

Please sign in to comment.