Skip to content

Migrate library to netstandard2.0 #9

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

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Pretasoc
Copy link

@Pretasoc Pretasoc commented Feb 27, 2019

Migrating the library will enable a broad use of the library. To do so there are multiple major changes:

Project file (GitTools.IssueTracker.csproj)

The project file was migrated to the new VS2017 csproj type using this Guide.

Additional changes beyond that guide and the references packages listed below the following changes were made:

  • Removed the explicit LangVersion tag (was 5)
  • Removed the check, wether NuGet packaged were restored
  • Removed allready outcommented empty Pre and Post Build hooks

Changed packages

Package Prior version Updated version Comment
Atlassian.SDK 5.0.0 10.4.0
Fody 4.2.3 [Removed][#Fody]
LibLog 4.2.3 5.0.6
MethodTime.Fody 1.15.8.0 [Removed][#Fody]
NewtonSoft.Json 7.0.1 12.0.1
Octokit 0.15.0 0.32.0
RestSharp 105.1.0 Implicit Dep.

Fody

Fody was referenced to used MethodTimer.Fody, but there was not Method attributed with the [TimeAttribute]. So Fody didn't change anything. Because of that i removed Fody and MethodTimer.Fody as unused references.

JetBrains.Annotations

Added a Referece to JetBrains.Annotations and removed the ReShaper generated file.

RestSharp

RestSharp is a dependency of Atlassian.SDK. Nuget v4 will restore such dependencies automatically.

AssemblyInfo.cs

Almost all attributes (exept the [GuidAttribute]) were removed from the AssemblyInfo.cs, because they can now be autogenerated from the csproj file.

Appveyor.yml

  • Updated the build image to 2017 (Required for new csproj format)
  • Migrated GitVersion as BuildTask
  • Moved Package generation in Build Task

Other changes

Adapted some minor api changed from referenced packaged. Removed the nuspec file and integrated the values in the csproj file.

Migrating the library will enable a broad use of the library. To do so
there are multiple major changes:

# Project file (GitTools.IssueTracker.csproj)
The project file was migrated to the new VS2017 csproj type using this
[Guide][1].

Additional changes beyond that guide and the references packages listed
below the following changes were made:

* Removed the explicit `LangVersion` tag (was `5`)
* Removed the check, wether NuGet packaged were restored
* Removed allready outcommented empty Pre and Post Build hooks

# Changed packages
| Package         | Prior version | Updated version | Comment          |
|-----------------|---------------|-----------------|------------------|
| Atlassian.SDK   | 5.0.0         | 10.4.0          |                  |
| Fody            | 4.2.3         |                 | [Removed][#Fody] |
| LibLog          | 4.2.3         | 5.0.6           |                  |
| MethodTime.Fody | 1.15.8.0      |                 | [Removed][#Fody] |
| NewtonSoft.Json | 7.0.1         | 12.0.1          |                  |
| Octokit         | 0.15.0        | 0.32.0          |                  |
| RestSharp       | 105.1.0       |                 | Implicit Dep.    |

## Fody <a name="Fody"></a>
`Fody` was referenced to used `MethodTimer.Fody`, but there was not
Method attributed with the `[TimeAttribute]`. So Fody didn't change
anything. Because of that i removed `Fody` and `MethodTimer.Fody` as
unused references.

## JetBrains.Annotations
Added a Referece to `JetBrains.Annotations` and removed the ReShaper
generated file.

## RestSharp
`RestSharp` is a dependency of `Atlassian.SDK`. Nuget v4 will restore
such dependencies automatically.

# AssemblyInfo.cs
Almost all attributes (exept the `[GuidAttribute]`) were removed from
the `AssemblyInfo.cs`, because they can now be autogenerated from the
csproj file.

# Other changes
Adapted some minor api changed from referenced pacakged.

# External References

[1]: https://natemcmaster.com/blog/2017/03/09/vs2015-to-vs2017-upgrade/

# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Date:      Wed Feb 27 17:53:31 2019 +0100
#
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#   (use "git push" to publish your local commits)
#
# Changes to be committed:
#	deleted:    src/GitTools.IssueTrackers/App_Packages/LibLog.4.2/LibLog.cs
#	deleted:    src/GitTools.IssueTrackers/FodyWeavers.xml
#	modified:   src/GitTools.IssueTrackers/GitTools.IssueTrackers.csproj
#	modified:   src/GitTools.IssueTrackers/IssueTrackers/GitHub/GitHubIssueTracker.cs
#	modified:   src/GitTools.IssueTrackers/IssueTrackers/Jira/Extensions/JiraExtensions.cs
#	modified:   src/GitTools.IssueTrackers/IssueTrackers/Jira/Extensions/JiraExtensions.issue.cs
#	modified:   src/GitTools.IssueTrackers/IssueTrackers/Jira/JiraIssueTracker.cs
#	modified:   src/GitTools.IssueTrackers/Properties/AssemblyInfo.cs
#	deleted:    src/GitTools.IssueTrackers/Properties/JetBrainsAnnotations.cs
#	deleted:    src/GitTools.IssueTrackers/packages.config
#
# Changes not staged for commit:
#	modified:   src/GitTools.IssueTrackers.Tests/GitTools.IssueTrackers.Tests.csproj
#
Update Test project Target Framework to .net4.6.1 to be compatible with netcore2.0
Migrate package.config to Pacakge References
Remove check for required packages since not all packages are checked and the fixed check path would prevent smooth updating of packages in future versions.
Migrate all values from nuspesc to csproj file.
* Use GitLink nuget pacakge
* Let MsBuild pack the package
If the Build Version is detected at the `before_build` stage, the `dotnet_csproj` step was already executed.
Replace the deprecated `PackageLicenseUrl` with an
`PackageLicenseExpression` referring to the MIT license.
Include symbols in Package and create no symbls package, to maintain libraries interface.
@Pretasoc
Copy link
Author

The failing unit test is probably caused by an jira api change. I didn't investigate it further, but it seems you can't retrieve IssueResolutions without credentials (at least not from the referenced repository). Besides that, i think all migration work is done.

@Pretasoc Pretasoc changed the title [WIP] Migrate library to netstandard2.0 Migrate library to netstandard2.0 Feb 27, 2019
USe the build task of GitVersion for a cleaner build script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant