Closed kolibaba closed 3 years ago
The older library uses a now deprecated API in YouTrack - https://blog.jetbrains.com/youtrack/2021/02/discontinuing-the-legacy-rest-api-action-required/
The new release of this library supports the new API's. Some breaking changes are documented in https://github.com/JetBrains/YouTrackSharp/releases/tag/2021.3.0
Do I understand correctly that the new version of YouTrackSharp cannot be used in our project, because it uses .net 4.8?
The library targets netcoreapp3.1
(.NET Core 3.1 and up)
Yesterday API version 2020.1.0 worked (the project uses .Net 4.8, so we use this version). Today I went wrong with an error:
The code: connection = new BearerTokenConnection ("https: // [some name] .myjetbrains.com / youtrack", "[token]"); connection.CreateIssuesService (). GetIssues (...);
Error: System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request).
How to solve this in a project for .Net 4.8?
PS We tried a project on .net 5.0 and version YoutTrackSharp 2021.3.1, we get an error:
Unhandled exception. YouTrackSharp.UnauthorizedConnectionException: Could not authenticate. Server did not return expected authentication response. Check the Response property for more details. at YouTrackSharp.BearerTokenConnection.GetAuthenticatedApiClient () at YouTrackSharp.Issues.IssuesService.GetIssues (String filter, Nullable
1 skip, Nullable
1 take, Boolean wikifyDescription, Boolean wikifyContents)