Visual Studio2012TypeScriptプロジェクトがあります。私が最初にプロジェクトを作成したとき、2つの新しい.tsファイルを追加しました。これらはFramework.tsとGraphics.tsでした。最近、さらに2つのTypeScriptファイルを宣言ファイルとして追加し、Framework.d.tsやGraphics.d.tsなどの.d.tsという名前を付けました。興味深いのは、これら4つのファイルすべてでBuild ActionプロパティがTypeScriptCompileに設定されているにもかかわらず、ビルド(Framework.tsとGraphics.ts)が2つだけであるということです。他の.d.tsファイルには、形状モジュール。おそらく.d.ts拡張子に問題があると思い、これらのファイルの名前をFramework_d.tsとGraphics_d.tsに変更しました。これもそれらを構築しませんでした!
この時点で私は途方に暮れています。私はcsprojファイルを見ました:
<TypeScriptCompile Include="Framework\Framework.d.ts" />
<Content Include="Framework\Framework.d.js">
<DependentUpon>Framework.d.ts</DependentUpon>
</Content>
<Content Include="Graphics\Graphics.d.js">
<DependentUpon>Graphics.d.ts</DependentUpon>
</Content>
<Content Include="TestPages\SpriteBatch.html" />
<TypeScriptCompile Include="Framework\Framework.ts" />
<Content Include="Framework\Framework.js">
<DependentUpon>Framework.ts</DependentUpon>
</Content>
<Content Include="Graphics\Graphics.js">
<DependentUpon>Graphics.ts</DependentUpon>
</Content>
<TypeScriptCompile Include="Graphics\Graphics.d.ts" />
<TypeScriptCompile Include="Graphics\Graphics.ts" />
次に、typescriptコンパイラのexecuteコマンドを実行します。
<Target Name="BeforeBuild">
<Exec Command=""$(PROGRAMFILES)\Microsoft SDKs\TypeScript\0.8.0.0\tsc" @(TypeScriptCompile ->'"%(fullpath)"', ' ')" />
</Target>
これは本当にこれらのファイルもビルドするはずです。なぜそれが拒否されるのか私には分かりません。誰かがこれを修正する方法を知っていますか?