title: Angular 2 Beta: Visual Studio ASP .NET MVC
body: <p>I built an application for Angular 2 alpha 45 and it worked wonderfully, but I had to 'mess' around a lot to get it to work. I understand Angular 2, but I don't understand how to get it to work to start actually using Angular 2.</p>
  
  <p>I am trying a clean build of the <a href="https://angular.io/docs/ts/latest/quickstart.html">'Angular 2: 5 min Quickstart'</a>. There are a number of issues, and I am going to be as specific as possible. I want to learn why these issues are occurring and hopefully how to fix them.
  Visual Studio 2015 Update 1, Typescript 1.7.</p>
  
  <p>Typescript Configuration:
  the quickstart includes a tsconfig.json file.</p>
  
  <pre><code>{  
      "compilerOptions": {
      "target": "es5",
      "module": "system",
      "moduleResolution": "node",
      "sourceMap": true,
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "removeComments": false,
      "noImplicitAny": false
   },
   "exclude": [
      "node_modules"
   ]
  }
  </code></pre>
  
  <p>I am not sure if this does anything though, as I had to edit the ProjectName.csproj file and add the line:
  <code>&lt;TypeScriptExperimentalDecorators&gt;True&lt;/TypeScriptExperimentalDecorators&gt;</code>
  to get rid of the Experimental Decorators Error.
  <a href="https://github.com/Microsoft/TypeScript/issues/3124">https://github.com/Microsoft/TypeScript/issues/3124</a> seems to suggest the tsconfig file needs to be in /Scripts to work, but that doesn't work for me either.</p>
  
  <p>I would like to know either how to get this tsconfig file to work, or to edit the .csproj file to get the same compiler options. If you look in the Project Properties > Typescript Build. Are these what matter? Should the module system be: System? </p>
  
  <p>My file structure is the same as the Quickstart.</p>
  
  <pre><code>app/
      app.component.ts
      boot.ts
  node_modules/
      blah
  index.html
  tsconfig.json
  package.json
  </code></pre>
  
  <p>I used powershell to run npm install to get everything in the node_modules directory.</p>
  
  <p><code>import {Component} from 'angular2/core';</code> displays an error. <code>../node_modules/angular2/core';</code> doesn't display the error, but then when you build the project, you get lots of build errors in files in <code>node_moduels/angular2/src/*</code>. Now, I might be able to go in and manually fix these issues, but I feel like the configuration is wrong if these errors are appearing. The tsconfig seems to want to exclude <code>node_modules</code>. Why am I not able to use <code>'angular2/core'</code> and instead must use a relative path to it? If I include the node_modules in the Visual Studio project, there are an insane amount of build errors in the <code>node_modules</code>. 
  Separately:
  I am doing this clean build because I couldn't work out how to update the project from alpha 45 to beta 0. Fixing bugs in my project from Angular 2 changes will be easy, but getting the app to load all the modules at the moment is impossible.</p>
  
  <p>The next part is assuming I get past the build errors:
  In <code>index.html</code> there is the:</p>
  
  <pre><code>System.config({
      packages: {
      app: {
          format: 'register',
              defaultExtension: 'js'
          }
      }
  });
  System.import('app/boot')
      .then(null, console.error.bind(console));
  </code></pre>
  
  <p>I have never gotten the <code>System.import('app/boot')</code> to work without specifying the file extension. Is this a visual studio issue or is it a .NET MVC issue? If I specify the file extension in <code>index.html</code>, then I get 404s with System.js trying to find the component files without a file extension (even though the config has <code>defaultExtension: 'js'</code>. Is this because I need to include the js files in my project?  Then if I get past that issue, I have to deal with</p>
  
  <pre><code>system.src.js:1049 GET http://localhost:63819/angular2/http 404 (Not Found)
  </code></pre>
  
  <p>I didn't have a single build error, but now System.js is not loading anything.</p>
  
  <p>I feel like these are all issues that are created by different systems interpreting the typescript differently. I feel like I haven't been clear, but I don't know how to be clear about this issue. I would really appreciate any help and guidance you could bestow upon me. I feel like I have been searching for an answer to this for days now.</p>