I want to find ways to use the Roslyn method. I managed to do this for use by code in .cs files. In addition, I want to parse the JavaScript files included in the solution. I know that Roslyn cannot parse JavaScript syntax or semantics, so I only want to look for the textural occurrencies my method name in all .js files.
I extract all files (documents) as follows:
foreach (Project pr in solution.Projects) { foreach (Document doc in pr.Documents) {
But Documents contains only .cs files. Is there a way to get the .js files, or do I need to get the folder with project.FilePath and get the files with the old File API , which can cause problems, because not all files in the folder need to be added to the project, etc.
Edit:
In addition, AdditionalFiles does not contain any files.
source share