Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

netcoreapp2.0 #6

Closed
wants to merge 2 commits into from
Closed

netcoreapp2.0 #6

wants to merge 2 commits into from

Conversation

aslakhellesoy
Copy link
Contributor

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/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link

@Jaykul Jaykul Sep 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

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
Copy link
Contributor

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
Copy link
Contributor

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

@aslakhellesoy
Copy link
Contributor Author

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
Copy link
Contributor

@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
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

Copy link
Member

@gasparnagy gasparnagy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@aslakhellesoy
Copy link
Contributor Author

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

@aslakhellesoy aslakhellesoy deleted the netcoreapp2.0 branch September 29, 2017 12:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants