title: typescript amd modules can't be compiled
body: <p>I've created a project in VS2012 using the latest version and added two files</p>
  
  <pre><code>// file x.ts
  export class test {}
  
  // file search.ts
  import t = module('x');
  </code></pre>
  
  <p>The question - how to fix the following errors:</p>
  
  <pre><code>Error   1   ';' expected.   D:\Code\Search\Search\node_modules\search\search.ts   1 18  search.ts
  Error   2   Module cannot be aliased to a non-module type.  D:\Code\Search\Search\node_modules\search\search.ts 1   1   search.ts
  Error   3   Unable to resolve module reference 'module'.    D:\Code\Search\Search\node_modules\search\search.ts 1   12  search.ts
  </code></pre>
  
  <p>csproj contains the following:</p>
  
  <pre><code>&lt;TypeScriptCompile Include="node_modules\search\x.ts" /&gt;
  &lt;TypeScriptCompile Include="node_modules\search\search.ts" /&gt;
  &lt;PropertyGroup Condition="'$(Configuration)' == 'Debug'"&gt;
      &lt;TypeScriptTarget&gt;ES5&lt;/TypeScriptTarget&gt;
      &lt;TypeScriptRemoveComments&gt;false&lt;/TypeScriptRemoveComments&gt;
      &lt;TypeScriptSourceMap&gt;true&lt;/TypeScriptSourceMap&gt;
      &lt;TypeScriptModuleKind&gt;AMD&lt;/TypeScriptModuleKind&gt;
  &lt;/PropertyGroup&gt;
  &lt;Import Project="$(VSToolsPath)\TypeScript\Microsoft.TypeScript.targets" /&gt;
  </code></pre>
  
  <p>x.ts is compiled fine, but search.ts is not </p>
  
  <pre><code>define(["require", "exports"], function(require, exports) {
      var test = (function () {
      function test() {
      }
      return test;
  })();
  exports.test = test;
  });
  //# sourceMappingURL=x.js.map
  </code></pre>