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

Update to netcore 2.0? #49

Open
evil-shrike opened this issue Sep 29, 2017 · 1 comment
Open

Update to netcore 2.0? #49

evil-shrike opened this issue Sep 29, 2017 · 1 comment

Comments

@evil-shrike
Copy link

Hi!

I've just discovered this starter kit while I was searching something to kick start with asp.net core + react. I haven't dug deep but the first thing I encountered is that a created project is based on the old stack of netcore1.0 and dnx. Is there any plans to update the template to netcore2.0?

Anyway a generated project fails to build:

Configuring...
-------------------
A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
Decompressing 100% 7216 ms
Expanding 100% 16302 ms
Failed to create prime the NuGet cache. new failed with: -2147352571
MSBUILD : error MSB1008: Only one project can be specified.
Switch: server.test

For switch syntax, type "MSBuild /help"
npm ERR! code ELIFECYCLE

I have netcore2.0 sdk installed obviously.

@bkwdesign
Copy link

bkwdesign commented Dec 30, 2017

@evil-shrike - did you try running the dotnet migrate command? (more here)

I successfully converted it to .csproj files using that command.

Then, I modified the global.json to refer to my 2.1.3 version of the SDK tooling:

  {
    "projects": [
      "server",
      "server.test"
    ],
    "sdk": {
      "old_version": "1.0.0-preview2-003121",
      "version":"2.1.3"
    }
  }

Now I'm getting an error like this:

> [email protected] postinstall G:\Users\Brian\DEV\AspCoreApps\AspnetStarterKit
> dotnet restore server server.test

MSBUILD : error MSB1008: Only one project can be specified.
Switch: server.test

For switch syntax, type "MSBuild /help"
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `dotnet restore server server.test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\...\npm-cache\_logs\2017-12-30T06_51_59_536Z-    debug.log

UPDATE
The above error is due to the syntax of package.json's line 119 (trying to update nuget on 2 targets simultaneously)
I ran the NuGet commands separately, but, I believe you can update line 119 like this:

 "postinstall": "dotnet restore server && dotnet restore server.test"

UPDATE II
webpack.config.js is also in need of a tweak at line 73.
change
"webpack": "^2.1.0-beta.21",
to
"webpack": "2.1.0-beta.21",

UPDATE III*
If you want to use Facebook auth, you need to migrate it for AspNetCore 2.
Changes that are required are explained here

UPDATE IV
If you want to use Identity, introduced w/ AspNetCore 1, it is also morphed a bit in AspNetCore 2.
Read about how to migrate that here

UPDATE V
In the fork I hope to publish, I'm also going to store my facebook credentials using the relatively new Secrets Manager

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

2 participants