Reputation: 14306
I'm using Visual Studio 2013 to create an MVC5 application. I decided to use TypeScript for the client side. I have TypeScript installed and more or less configured. When I build the project JavaScript files appear next the TypeScript files (*.js and *js.map).
The problem is that those files are not included in the solution. I can only see them when I select "Show All Files" in Solution Explorer or browse my solution folder with file explorer.
I see 2 bad consequences:
<script src="~/Scripts/Custom/Tmp.js"></script>
Resharper complains "Project file expected at XYZ". However when I run the MVC application JavaScripts work fine.The only solution that comes to my mind is to add the files manually, but:
What's the proper way to use TypeScript in an MVC application?
Upvotes: 2
Views: 1896
Reputation: 3109
My experience so far with a project just like yours is unproblematic. After working with TypeScript so much, it's become painful to look at JavaScript!
Problem 1) doesn't happen in plain VS suggesting that the issue is with ReSharper.
Problem 2) isn't. Deployment works somehow; the .js files are published but the .js.map files are not.
Upvotes: 2