Skip to content

Conversation

@gpailler
Copy link
Collaborator

@gpailler gpailler commented Jul 4, 2016

I updated SlackAPI code to support .NetCore 1.0
SlackApi is now multi-targeted for .NetFramework 4.5 (as before) and .NetStandard 1.6 (used by .NetCore 1.0)

Here is summary of changes:

  • Nuget packages binaries are removed from the repo
  • Packages are updated to latest version (NewtonSoft.Json 9.01, Polly 4.3.0)
  • SlackApi project files are moved to dedicated SlackApi folder
  • SlackApi.csproj is replaced with SlackApi.xproj and associated project.json
  • SlackApi version is bumped to 1.0.5 in nuspec and project.json
  • SlackSocket class is updated to support net45 and netstandard1.6 (AppDomain changes, GetTypeInfo added). Very few changes at the end
  • project.json is updated to be able to generate nuget packages (see below)

Points or attention:

  • Project references is not working properly so I added debug SlackAPI dll reference to other projects
  • ClientWebSocket (used in SlackSocket) is not implemented for Linux/MacOS in .Net Core 1.0. I added a custom Nuget.config file and I use a beta version of System.Net.WebSockets.Client (see project.json for details). Probably this point is a showstopper for a public Nuget release but at least the PR exists and the library is working fine. Maybe you can still deliver Nuget package for net45 target and wait .Net Core 1.1 for multi platform Nuget package.

How to build:

cd SlackAPI\SlackAPI
dotnet restore
dotnet build --configuration Release
dotnet pack --configuration Release

gpailler added 5 commits July 4, 2016 13:22
Updated packages to latest version
Removed ununsed dependencies
Added targets net45 and netstandard1.6.
Integrated nuspec info in project.json
Bump version to 1.0.5
… is not implemented on .NetCore 1.0 for Unix/MacOs
@gpailler
Copy link
Collaborator Author

gpailler commented Jul 4, 2016

I added an AppVeyor build on my side: https://ci.appveyor.com/project/gpailler/slackapi

appveyor.yaml

version: 1.0.5.{build}
build_script:
- cmd: >-
    cd SlackAPI

    dotnet restore

    dotnet build --configuration Release

    dotnet pack --configuration Release
artifacts:
- path: SlackAPI\bin\Release\*.nupkg
  name: NuGet

@Inumedia Inumedia self-assigned this Jul 4, 2016
@Inumedia
Copy link
Owner

Hey @gpailler , I'm working on this in the pr/56 branch.

@gpailler
Copy link
Collaborator Author

Great!

@Inumedia
Copy link
Owner

I'm currently having some trouble getting IntegrationTests to work again with it from Visual Studio, don't suppose you have some insight on that? :(

@gpailler
Copy link
Collaborator Author

When I tested, IntegrationTests worked fine (I added a DLL reference to SlackAPI instead project refrence and IntegrationTests project was still compiled with .NetFramework). As I remember, only one test was failing

@gpailler
Copy link
Collaborator Author

Did you tried to checkout my branch directly? You experience same troubles?

@Inumedia
Copy link
Owner

Not sure, I'll take a closer look at it later as it's currently almost 6AM my time.

@Inumedia
Copy link
Owner

Hey @gpailler ,

Seeing as I haven't touched this in months, I'm starting to think it makes sense to add other collaborators to the project to help get things moving again. Would you be open to being added as a collaborator on this to help out?

@gpailler
Copy link
Collaborator Author

Yes sure. I can help for this PR, on this AppVeyor CI and more globally on the project if you want

@Inumedia
Copy link
Owner

I'd prefer more globally, I'm realizing that I just don't have the amount
of time I'll need to continue maintaining this project on my own. Any help
I can get to balance that out is appreciated.

On Tue, Sep 27, 2016, 06:27 Grégoire Pailler notifications@github.com
wrote:

Yes sure. I can help for this PR, on this AppVeyor CI and more globally on
the project if you want


You are receiving this because you were assigned.

Reply to this email directly, view it on GitHub
#56 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA0S9iridUT1T2KxJ1Uko0VT8OWkCvhuks5quO-XgaJpZM4JEELp
.

@gpailler
Copy link
Collaborator Author

Sure. I'm quite busy too but I'll do my best to contribute and help maintaining the project

@ibruynin
Copy link

@gpailler
I tried the above and this is the result. Any suggestions?

Build FAILED.

   "C:\git\SlackAPI\SlackAPI.sln" (Build target) (1) ->
   "C:\git\SlackAPI\SlackAPI.csproj" (default target) (2) ->
   (ResolveAssemblyReferences target) ->
     C:\Program Files\dotnet\sdk\1.0.0-preview3-004056\Microsoft.Common.CurrentVersion.targets(1909,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\git\SlackAPI\SlackAPI.csproj]


   "C:\git\SlackAPI\SlackAPI.sln" (Build target) (1) ->
   "C:\git\SlackAPI\SlackAPI.csproj" (default target) (2) ->
   (CoreCompile target) ->
     RequestStateForTask.cs(1,7): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?) [C:\git\SlackAPI\SlackAPI.csproj]

@gpailler
Copy link
Collaborator Author

Seems Newtonsoft assembly is missing. You followed the steps with dotnet restore at first?
Could you attach the whole log for dotnet restore and dotnet build --configuration Release commands

@ibruynin
Copy link

Hi @gpailler

indeed, here's what I did

found this on appveyor ci build

git clone -q https://github.com/gpailler/SlackAPI.git c:\git\slackapi
cd slackapi
git fetch -q origin +refs/pull/1/merge:

then I tried this

dotnet restore
dotnet build --configuration Release
dotnet pack -- configuration Release

And got the following output
errorlog.txt

@gpailler
Copy link
Collaborator Author

According the log, I think you're not on the netcore1 branch because dotnet build tries to build .csproj files
You should try

git clone --branch=netcore1 https://github.com/gpailler/SlackAPI.git
cd SlackAPI.git
dotnet restore
dotnet build --configuration Release
dotnet pack -- configuration Release

@ibruynin
Copy link

Thanks for the quick update @gpailler

Now it fails on the restore
:\git\SlackAPI>dotnet restore
C:\Program Files\dotnet\sdk\1.0.0-preview3-004056\NuGet.targets(164,5): error MSB3202: The project file "c:\git\SlackAPI\IntegrationTest\IntegrationTest.csproj.metaproj" was not found. [c:\git\SlackAPI\SlackAPI.sln]
C:\Program Files\dotnet\sdk\1.0.0-preview3-004056\NuGet.targets(164,5): error MSB3202: The project file "c:\git\SlackAPI\SlackApi.Console\SlackApi.Console.csproj.metaproj" was not found. [c:\git\SlackAPI\SlackAPI.sln]
c:\git\SlackAPI\SlackAPI\SlackAPI.xproj(8,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.0-preview3-004056\Extensions\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

@gpailler
Copy link
Collaborator Author

I don't really now what's wrong but I think you can pick a compiled nuget package here if you need it now: https://ci.appveyor.com/project/gpailler/slackapi/build/1.0.5.5/artifacts
You can also wait few weeks I finish .net core integration in main project

@ibruynin
Copy link

any chance that you can make it work for uap 10.0 as well?
I thought netstandard 1.6 would do the trick, but that does not seem to be so.

Install-Package : Package SlackAPI 1.0.5 is not compatible with uap10.0 (UAP,Version=v10.0). Package SlackAPI 1.0.5 supports:

  • net45 (.NETFramework,Version=v4.5)
  • netstandard1.6 (.NETStandard,Version=v1.6)
    At line:1 char:1
  • Install-Package c:\users\ibruyn\Downloads\SlackAPI.1.0.5.nupkg
  •   + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    

@gpailler
Copy link
Collaborator Author

Maybe you can try this solution: http://stackoverflow.com/questions/38315273/cannot-reference-net-core-library-from-uwp.
I think we cannot downgrade to .Net Standard 1.4 because we need Microsoft.Extensions.DependencyModel and it requires 1.6

@gpailler
Copy link
Collaborator Author

Hello @ibruynin
Could you take à look on PR #91 ?
I reworked on .net core support and netstandard1.3 is ssupported. You can compile netcore branch or use the generated package available on myGet to test

@gpailler
Copy link
Collaborator Author

Replaced with #91

@gpailler gpailler closed this Mar 15, 2017
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.

3 participants