Ruhrpottpatriot / GW2.NET

A user friendly wrapper around the official GW2 API
GNU General Public License v2.0
17 stars 17 forks source link

Migrate to netcore 2.0 #43

Open Ruhrpottpatriot opened 6 years ago

Ruhrpottpatriot commented 6 years ago

Since netcore has matured quite abit and PCL have become deprecated we should migrate our code to netcore where possible. Currently this requires a lot of handwork, but should be done as soon as possible.

To migrate a PCL project completely to netcore (i.e. netcoreapp2.0 and new .csproj file format) do the following steps:

  1. Unload the project and open the *.csproj file.
  2. Replace the content of the file with the following content:
    <Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
    <RootNamespace>GW2NET</RootNamespace><!-- Change root namespace as required -->
    </PropertyGroup>
    <ItemGroup>
    <None Remove="stylecop.json" />
    </ItemGroup>
    <ItemGroup>
    <AdditionalFiles Include="$(SolutionDir)stylecop.json" />
    </ItemGroup>
    </Project>
  3. Reinstall all missing NuGet packages again. Always install Stylecop.Analyzers.
  4. Delete the packages.config and project.json file and AssemblyInfo.cs
  5. Fix the remaining errors, so the code compiles again.

I'm currently looking into a way to add the global stylecop analyzers file suited for our needs. When I find something, I'll update this issue.

Additional Information: