Forum member

akilin

6 posts

Posts by akilin

  1. Intermittent failure to find cshtml files by NCrunch

    Unfortunate, but thank you for trying. In any case, creating this thread was beneficial for me. While trying to create a reproduction for you, I got a much better understanding of what was happening and why. So I can now work around this much more easily. I appreciate you trying to help. Thank …

  2. Intermittent failure to find cshtml files by NCrunch

    I think I got a working reproduction. I got a repo with a single test. It always succeeds when running via `dotnet test`. It always fails when run via NCrunch from Visual Studio. link to folder inside repo: https://github.com/akilin/demos/tree/master/ncrunch-razor-views steps to reproduc…

  3. Intermittent failure to find cshtml files by NCrunch

    [quote]This will likely depend on your test code (i.e. WebApplication.CreateBuilder / Host.CreateDefaultBuilder). It may be dependent on Directory.GetCurrentDirectory()[/quote] WebApplication.CreateBuilder is used when wiring things up at start of the app. We do not have any code that changes the …

  4. Intermittent failure to find cshtml files by NCrunch

    I am not very familiar with how Razor handles cshtml files. But I couldn't find any individual files with names matching the view names inside the `bin` folder, so it probably compiles them into the single resulting dll, while keeping the naming/path information. And then when we call `viewEngine.F…

  5. Intermittent failure to find cshtml files by NCrunch

    We use the code from this article: https://scottsauber.com/2018/07/07/walkthrough-creating-an-html-email-template-with-razor-and-razor-class-libraries-and-rendering-it-from-a-net-standard-class-library/ Specifically this section of it: [code=csharp] private IView FindView(ActionContext a…

  6. Intermittent failure to find cshtml files by NCrunch

    Hi, I have, over the past few months, encountered an issue with tests working from from CLI using `dotnet test` command, but failing from NCrunch VS22/VS26 runner window. The setup looks something like this: We have an `EmailGenerator.csproj` project that is of type <Project Sdk="Microsoft.NET…