To check each .cs file for links to .js files, you can use the following C# code. This code will search for occurrences of .js file references within the C# files in the project directory and its subdirectories.

using System;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;

class Program
{
    static void Main()
    {
        // Replace "path/to/your/C#Project" with the actual path to your C# project directory.
        string projectPath = "path/to/your/C#Project";

        List<string> csFiles = GetCsFiles(projectPath);
        List<string> jsReferences = new List<string>();

        foreach (string csFile in csFiles)
        {
            List<string> referencesInFile = FindJsReferencesInCsFile(csFile);
            jsReferences.AddRange(referencesInFile);
        }

        Console.WriteLine("JS References found in .cs files:");
        foreach (string reference in jsReferences)
        {
            Console.WriteLine(reference);
        }
    }

    static List<string> GetCsFiles(string projectPath)
    {
        string[] csFiles = Directory.GetFiles(projectPath, "*.cs", SearchOption.AllDirectories);
        return new List<string>(csFiles);
    }

    static List<string> FindJsReferencesInCsFile(string csFile)
    {
        List<string> jsReferences = new List<string>();
        string content = File.ReadAllText(csFile);

        // Using regex to find references to .js files within the C# code.
        MatchCollection matches = Regex.Matches(content, @"(?<=\b[\w\.]*\b)(\.js)\b");
        foreach (Match match in matches)
        {
            string jsFileName = match.Value;
            if (!jsReferences.Contains(jsFileName))
            {
                jsReferences.Add(jsFileName);
            }
        }

        return jsReferences;
    }
}

Please make sure to replace "path/to/your/C#Project" with the actual path to your C# project directory. The code will scan all .cs files in the project directory and its subdirectories, searching for references to .js files. It will then print the list of .js file references found in the C# files.

Keep in mind that this method may not detect all .js files or references, especially if the references are made in a non-standard way or if the .js files are dynamically loaded. For more comprehensive analysis, you might consider using more sophisticated code analysis tools or build systems that can provide a complete dependency graph for your project.