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:
- When I add a .js file to a view like that
<script src="~/Scripts/Custom/Tmp.js"></script>Resharper complains "Project file expected at XYZ". However when I run the MVC application JavaScripts work fine. - If the .js files are not included in the solution they won't be published and so the webpage won't work properly.
The only solution that comes to my mind is to add the files manually, but:
- this sounds very tedious
- I think the .js files are not being added for some purpose
What's the proper way to use TypeScript in an MVC application?