Visual Studio 2015 causes problems when using Typescript

I am using Visual Studio 2015 Enterprise RTM. When creating an ASP.net 4.6 web application using the Web Api template, I noticed that as soon as I add a TypeScript file, the codelens indicators will stop working. I tested this on a new installation, without additional extensions, and also tried other asp.net 4.6 templates. When working in safe mode, the problem does not occur.

Steps to play:

  • Set the framework to 4.6
  • Build a web application using the web api template.
  • Change authentication without authentication
  • Open webapiconfig.cs in App_Start
  • The codelens indicator in the register method should say: 1 link
  • Add a TypeScript file called app.ts (does not matter) in the script folder, tit may remain empty
  • The codelens indicator in the webapiconfig file should still indicate 1 link
  • Close Visual Studio
  • Re-launch Visual Studio and open the solution.
  • Check the webapiconfig file, codecs no longer link to links or any other file.

Any idea on how to debug codecs or does anyone have this problem?

+7
visual-studio-2015 typescript codelens
source share
3 answers

I work in the visual studio team, which is responsible for code link indicators. I can confirm that this is really a bug in VS2015, where the codelens links stop working when you add typescript files to the typescript project or projects to your solution :( Unfortunately, we missed this error for RTM. Investigating this error, at the moment I I don’t know about workarounds for this problem, I can post an update when we have additional information to share this error.

+4
source share

Maybe I found a workaround that seems to do the trick for me:

So, I have a solution with several projects, only one of which has TypeScript files.

I just unloaded the project, cleaned + rebuilt (some restart in Visual Studio at this stage can help + close all open files), then downloaded, cleaned and rebuilt again, and now CodeLens shows my links (again, close all open files).

Please note that until this error is fixed, you will have to do this every time you open VS.

Hope this helps!

EDIT: if you have only one project, then exclude the Scripts folder from it, clean, rebuild, close Visual Studio and open it again. You should now return the links. Just turn on the folder again.

Good luck

+2
source share

in my case, links start working after uninstalling vssonar extension, vs2015ent

0
source share

All Articles