Code Monkey home page Code Monkey logo

Comments (5)

rmtew avatar rmtew commented on May 23, 2024 1

This is because the template text has \n rather than the \r\n for end of lines where FixupTemplate is coded to expect the latter. While it'd be nice if this was fixed, or even raised an error with a message that indicated this was the problem, anyone else who is searching for the exception in this error will hopefully read this and can add some code like the following to work around it:

            string templateText = File.ReadAllText(templateFilePath);
            if (!templateText.Contains("\r\n"))
            {
                templateText = templateText.Replace("\n", "\r\n");
            }

from westwind.razorhosting.

RickStrahl avatar RickStrahl commented on May 23, 2024

You'll need to provide more info. Most likely you have an expression error in the script your running.

from westwind.razorhosting.

kgiszewski avatar kgiszewski commented on May 23, 2024

@rmtew Is correct. Just ran into this. Happened when it worked locally, got sent to source control, but the line endings were modified.

Would be great to set line endings in the config.

from westwind.razorhosting.

RickStrahl avatar RickStrahl commented on May 23, 2024

Hmmm, I thought I fixed that in the last round of updates. Slightly different code though. The above is too volatile - that can break in all sorts of ways.

from westwind.razorhosting.

kgiszewski avatar kgiszewski commented on May 23, 2024

Ok, well I thought I'd help. I will close the PR.

from westwind.razorhosting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.