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

netcoreapp2.0 #6

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@aslakhellesoy
Copy link
Contributor

aslakhellesoy commented Sep 9, 2017

I had to change to netcoreapp2.0 to make this build on OS X.

Does this look ok?

.gitignore Outdated
@@ -14,7 +14,6 @@
x64/
build/
[Oo]bj/
bin/

This comment has been minimized.

@Jaykul

Jaykul Sep 10, 2017

Contributor

Doesn't that result in committing all the built binaries to the repo?

This comment has been minimized.

@aslakhellesoy

aslakhellesoy Sep 10, 2017

Contributor

I'll revert that one

var assembly = typeof(GherkinDialectProvider).GetTypeInfo().Assembly;
var resourceStream = assembly.GetManifestResourceStream("Gherkin." + languageFileName);

#if (NETSTANDARD1_5 || NETSTANDARD2_0 || NETCOREAPP1_0 || NETCOREAPP1_1 || NETCOREAPP2_0)

This comment has been minimized.

@Jaykul

Jaykul Sep 10, 2017

Contributor

Might want to clean this up to NETSTANDARD2_0 || NETCOREAPP2_0 ... not sure there's any point in keeping the old ones after changing the project definition 😉 -- ditto to the other similar lines, of course.

@Jaykul

This comment has been minimized.

Copy link
Contributor

Jaykul commented Sep 10, 2017

I don't see any problem going to 2.0, it's RTM, and it's so much easier to work with that it's hard to imagine people are not going to upgrade all their projects to it even though it's still early.

@SabotageAndi

This comment has been minimized.

Copy link
Contributor

SabotageAndi commented Sep 10, 2017

In SpecFlow we want to target the lowest .Net Standard as possible, because we have a lot of users who are on .Net 4.5 (which is afaik .net Standard 1.5). So updating to .Net Standard 2.0 is not what we want. And it is not needed API wise.

I have not yet an idea, why this change is needed for you Aslak to get it compiled, but I will have a look at it.

@SabotageAndi

This comment has been minimized.

Copy link
Contributor

SabotageAndi commented Sep 10, 2017

@aslakhellesoy which error do you get on Mac OS X?
Had no problems with it.

@aslakhellesoy

This comment has been minimized.

Copy link
Contributor

aslakhellesoy commented Sep 10, 2017

@SabotageAndi I'm getting the following on OS X:

$ git clean -dfx
$ make

echo "Building on Darwin"
Building on Darwin
dotnet restore
  Restoring packages for /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.CLI/Gherkin.CLI.csproj...
  Restoring packages for /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.Specs/Gherkin.Specs.csproj...
  Restoring packages for /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.TokensGenerator/Gherkin.TokensGenerator.csproj...
  Restoring packages for /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.TokensGeneratorLib/Gherkin.TokensGeneratorLib.csproj...
  Generating MSBuild file /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.TokensGeneratorLib/obj/Gherkin.TokensGeneratorLib.csproj.nuget.g.props.
  Generating MSBuild file /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.TokensGeneratorLib/obj/Gherkin.TokensGeneratorLib.csproj.nuget.g.targets.
  Restore completed in 2.3 sec for /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.TokensGeneratorLib/Gherkin.TokensGeneratorLib.csproj.
  Restoring packages for /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin/Gherkin.csproj...
  Generating MSBuild file /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.CLI/obj/Gherkin.CLI.csproj.nuget.g.props.
  Generating MSBuild file /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.TokensGenerator/obj/Gherkin.TokensGenerator.csproj.nuget.g.props.
  Generating MSBuild file /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.CLI/obj/Gherkin.CLI.csproj.nuget.g.targets.
  Generating MSBuild file /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.TokensGenerator/obj/Gherkin.TokensGenerator.csproj.nuget.g.targets.
  Restore completed in 2.88 sec for /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.CLI/Gherkin.CLI.csproj.
  Restore completed in 2.88 sec for /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.TokensGenerator/Gherkin.TokensGenerator.csproj.
  Generating MSBuild file /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin/obj/Gherkin.csproj.nuget.g.props.
  Generating MSBuild file /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin/obj/Gherkin.csproj.nuget.g.targets.
  Restore completed in 717.84 ms for /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin/Gherkin.csproj.
  Generating MSBuild file /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.Specs/obj/Gherkin.Specs.csproj.nuget.g.props.
  Generating MSBuild file /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.Specs/obj/Gherkin.Specs.csproj.nuget.g.targets.
  Restore completed in 3.16 sec for /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.Specs/Gherkin.Specs.csproj.
dotnet build
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Gherkin -> /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin/bin/Debug/netstandard1.5/Gherkin.dll
  Gherkin.TokensGeneratorLib -> /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.TokensGeneratorLib/bin/Debug/netstandard1.5/Gherkin.TokensGeneratorLib.dll
  Gherkin.CLI -> /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.CLI/bin/Debug/netcoreapp1.1/Gherkin.CLI.dll
  Gherkin.Specs -> /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.Specs/bin/Debug/netcoreapp1.1/Gherkin.Specs.dll
  Gherkin.TokensGenerator -> /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.TokensGenerator/bin/Debug/netcoreapp1.1/Gherkin.TokensGenerator.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:24.01
touch .sln_built_debug
dotnet test ./Gherkin.Specs/Gherkin.Specs.csproj
Build started, please wait...
Build completed.

Test run for /Users/aslakhellesoy/git/cucumber/gherkin-dotnet/Gherkin.Specs/bin/Debug/netcoreapp1.1/Gherkin.Specs.dll(.NETCoreApp,Version=v1.1)
Microsoft (R) Test Execution Command Line Tool Version 15.3.0-preview-20170628-02
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
Testhost process exited with error: It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '1.1.2' was not found.
  - Check application dependencies and target a framework version installed at:
      /
  - Alternatively, install the framework version '1.1.2'.


make: *** [.run_tests] Error 1

Do I need to install some old .NET framework? I'm not sure how to do that - I just followed these instructions

@SabotageAndi

This comment has been minimized.

Copy link
Contributor

SabotageAndi commented Sep 10, 2017

@aslakhellesoy Thanks for the output. I am able to reproduce it on my Mac.
Probably some packages are outdated and need to be updated. I will send a pull request with fixes.

@SabotageAndi

This comment has been minimized.

Copy link
Contributor

SabotageAndi commented Sep 10, 2017

Ok, you can compile netcoreapp1.1 with the .NET Core 2.0 SDK, but you can not run them.
For that you need to install the .NET Core 1.1.2 runtime from here: https://github.com/dotnet/core/blob/master/release-notes/download-archives/1.1.2-download.md

PR for fix in the Contribute.md is created: #7

@gasparnagy
Copy link
Member

gasparnagy left a comment

I agree with @SabotageAndi. targeting .net core 2.0 would limit the potential user base too much.

@aslakhellesoy

This comment has been minimized.

Copy link
Contributor

aslakhellesoy commented Sep 29, 2017

Allright, I won't merge this - #7 solved it for me.

@aslakhellesoy aslakhellesoy deleted the netcoreapp2.0 branch Sep 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment