Skip to content
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

Aurelia CLI compatibility error with .NET Core 2.2 #1081

Open
regolas opened this issue Apr 1, 2019 · 4 comments
Open

Aurelia CLI compatibility error with .NET Core 2.2 #1081

regolas opened this issue Apr 1, 2019 · 4 comments

Comments

@regolas
Copy link

regolas commented Apr 1, 2019

I'm submitting a bug report

  • Library Version:
    aurelia CLI v1.0.0-beta.15

Please tell us about your environment:

  • Operating System:
    Windows 7

  • Node Version:
    10.15.2

  • NPM Version:
    6.8.0

  • Browser:
    all

  • Language:
    all

  • Loader/bundler:
    Webpack

Current behavior:

Uncaught promise rejection:
A compatible SDK version for global.json version : [2.1.500] from [project directory\global.json] was not found
Did you mean to run dotnet SDK commands? Please install dotnet SDK from: url

  • What is the expected behavior?
    .Net SDK 2.2.105 is installed
    created empty web project in VS2017 (Tried an ASP .NET MVC template as well. same issue)
    Ran from CLI: au new --here
    CLI options:
    1 - Default
    2 - Default
    3 - ASP .NET Core
    4 - Typescript
    5 - Default
    6 - default
    7 - default
    8 - default
    9 - 5 No Code Editor markup
    10 - 2 navigation

Current directoy is not empty Create in this folder? Yes
Install Project dependencies? Yes
Error occurs at the end of dependency installation along with 1 high severity vulnerability. au run will serve the project to local host 5000

  • What is the motivation / use case for changing the behavior?

Installation should occur with no errors and no vulnerability issues.

@jmoerdyk
Copy link

jmoerdyk commented Apr 8, 2019

You're getting that error because you don't have a .Net Core SDK version installed that is compatible with the one specified in the global.json . Since the version is pinned to 2.1.500, you need a .Net Core SDK of version 2.1.5xx (the latest being 2.1.506).

The problem is they have to pick a version of .NET Core, and pin it in the global.json, because the config and startup options seem to change with every version of .Net Core. I've thought about it and v2.1 is probably a better choice at the moment because it is the current LTS version, whereas support for 2,2 will end 3 months after 3.0 is released (If I understand their support policy) The other option is to add an additional questionnaire option for .Net Core version and generate the global.json and Startup.cs for that version.

@brandonseydel
Copy link
Member

brandonseydel commented Apr 11, 2019

Just delete global.json and change the settings in your project to the version of core you want to run. There is also the option of the dotnet template.

dotnet new -i aurelia.dotnet.templates

Then dotnet new Aurelia in the folder you want to spin up

dotnet new aurelia

@regolas
Copy link
Author

regolas commented Apr 12, 2019

@brandonseydel I setup an ASP.Net project using 2.2.105. According to the aurelia docs, The cli should have installed aurelia overtop of this and had an error.
When I used the template as you suggested, it generated 18 errors. It also appears to be a VS project not a VS Code project as the aurelia docs suggest and it uses the CLI 1.0.0.

And, to make it more confusing. It says the aurelia CLI server is on Port 8080 but it also tells you it is listening on https://localhost:5001 and http://localhost:5000 of which neither is listening.

Anyway, thanks for the info. It was helpful.

@brandonseydel
Copy link
Member

brandonseydel commented Apr 13, 2019

The cli server is on port 8080 the website is running on 5001/5000 and using a reverse proxy for dev. The dotnet template doesn't use MVC to support the application only html/js and webapi. The more standard approach in modern web apps.

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

No branches or pull requests

3 participants