ASP.NET Core and Angular 2

I am following along with the book by the above title. Here are some notes as I get started.

In project.json for dependencies be sure to add the following “Microsoft.ApplicationInsights.AspNetCore”: “1.0.0”,

If no tasks for the gulpfile shown in Task Runner Explorer appear, using a command prompt go to the solution folder and use the npm install command.

Use npm install -g typescript@2.0

Where it says “This is due to a known bug in the TypeScript version currently shipped with Visual Studio 2015. The most effective way to fix that is to replace this local VS2015 file:  C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions \Microsoft\TypeScript\typescriptServices.js.

With the following remote file:”

that file no longer exists, so hopefully it has been fixed in the release of Visual Studio that I have.

The Launch URL setting is under Debug > [SolutionName] Properties in the Debug tab.

There’s a missing ‘ in the gulpfile.js copied and pasted from the book’s code. And there’s an extra space in the last script src listed from the CDN for the index.html page.

Make sure the Scripts folder is underneath the solution, as are tsconfig.json, gulpfile.json, and package.json

Back to that missing remote file that isn’t up, it’s leaving me with about 1800 errors about ../../Observable not being found, and it says the build fails, but the page works (though slowly).

It’s very frustrating that the online book version on PacktPub doesn’t show highlighted code, as the author often mentions he’s highlighted the relevant code below. Also, I wish he’d show the file listing more often because the author is not clear as to where files should be created.

Well that was Chapter 1, and I have the solution working as in the book. It goes on to explain this could’ve been achieved muck more quickly by using Yeoman, but we did it the hard way for the learning experience.

Leave a Comment

Your email address will not be published. Required fields are marked *