'VS Code'에 해당되는 글 1건

  1. 2017/01/23 글뻥 ASP.NET MVC WEBAPI on Visual studio Core
~ 설치 로그남깁니다.

Install step by step.


1. Install dotnet core 1.1
2. install VSCode
* Link : https://www.microsoft.com/net/core#windowscmd

3. Open VS Code and "Open folder" any

4. Open Console in VS Code (CTRL+`)

5. "dnvm upgrade" in console

6. "npm install -g yo grunt-cli generator-aspnet bower" in console

7. "yo aspnet" in colsole and select "WEB API" and type your want "project name"

8. re-open project folder with "Open folder"

9. add next 2 lines into dependenciestaginproject.json file
"Microsoft.AspNetCore.StaticFiles": "1.1.0",
"Microsoft.AspNetCore.WebSockets.Server": "0.1.0"
10. Add next 2 lines into Configure in Startup.cs file
app.UseDefaultFiles();
app.UseStaticFiles();
11. Open Explorer tab and click a "wwwroot" folder

12. make new folder as "app"

13. make new file as "index.html" on wwwroot
<!DOCTYPE html>
    <html>
        <head>
            <title>Hello Angular</title>
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <style>
                body {color:#369;font-family: Arial,Helvetica,sans-serif;}
            </style>

            <!-- Polyfills for older browsers -->
            <script src="https://unpkg.com/core-js/client/shim.min.js"></script>
            <script src="https://unpkg.com/zone.js@0.7.4?main=browser"></script>
            <script src="https://unpkg.com/reflect-metadata@0.1.8"></script>
            <script src="https://unpkg.com/systemjs@0.19.39/dist/system.src.js"></script>
            <script> window.autoBootstrap = true; </script>
            <script src="https://cdn.rawgit.com/angular/angular.io/b3c65a9/public/docs/_examples/_boilerplate/systemjs.config.web.js"></script>
            <script> System.import('Script').catch(function(err){ console.error(err); });</script>
        </head>

        <body>
            <my-app>Loading AppComponent content here ...</my-app>
        </body>
</html>


14. make new file as "app.component.ts" on wwwroot/app
import { Component } from '@angular/core';

@Component({
    selector: 'my-app',
    template: `<h1>Hello {{name}}</h1>`
})
export class AppComponent { name = 'Angular'; }


2017/01/23 18:26 2017/01/23 18:26