简体   繁体   中英

ASP.NET Core with Angular 2 (cli init) doesn't work

I`m do creating Empty ASP.NET Core project. In folder wwwroot i run ng init via cmd. After restoring packages i host my ASP project on Kestrel . Compiler output project compile-time errors Errors in files of *.aspx.cs in the wwwroot\\node_modules\\protractor\\node_modules\\selenium-webdriver\\lib\\test\\data folder.

How to delete this [protractor, selenium, webdriver] what there would be no errors any more OR/AND to deliver restriction to the compiler on the wwwroot folder?

Thx!

Selenium Webdriver doesn't work with ASP.NET Core. Try using this sample:

package.json

{
"name": "angular",
"version": "1.0.0",
"description": "Angular 2, ASP.NET Core, Visual Studio 2017 RC",
"scripts": {
"postinstall": "gulp restore"
},
"keywords": [],
"author": "",
"license": "MIT",
"dependencies": {
"@angular/common": "~2.2.0",
"@angular/compiler": "~2.2.0",
"@angular/core": "~2.2.0",
"@angular/forms": "~2.2.0",
"@angular/http": "~2.2.0",
"@angular/platform-browser": "~2.2.0",
"@angular/platform-browser-dynamic": "~2.2.0",
"@angular/router": "~3.2.0",

"angular-in-memory-web-api": "0.2.4",
"systemjs": "0.19.41",
"core-js": "2.4.1",
"reflect-metadata": "0.1.9",
"rxjs": "5.0.3",
"zone.js": "0.7.4"
},
"devDependencies": {
"typescript": "^2.1.4",
"gulp": "^3.9.1",
"@types/node": "^6.0.46",
"@types/jasmine": "^2.5.36"
},
"repository": {}
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM