Skip to content
| Marketplace
Sign in
Visual Studio>Templates>Lua Script Template
Lua Script Template

Lua Script Template

Shaun Hamman

|
1,507 installs
| (0) | Free
An item template that adds a blank Lua script file to your project.
Download

Lua Script Template

This Visual Studio 2010 item template will allow you to create blank Lua script files from theAdd->New Item dialog window.  I created this to use with the LuaInterface library, but it should prove useful to anyone wanting to create Lua scripts with Visual Studio.

If you are looking for a Lua syntax highlighter extension, I would recommend theNPLLanguageService extension by Xizhi.

Features:

  • Adds Lua Script option to Add->New Item dialog window.
  • Created script has its default encoding type set to Western European (Windows) - Codepage 1252
    • The standard default encoding type of Unicode (UTF-8 with signature) - Codepage 65001 causes Lua/LuaInterface to crash when attempting to read the script.
  • Created script has its Copy to Output Directory setting set to Copy Always by default.
    • Typically, you will want to place your scripts either in the execution directory, or in a subdirectory of that location. This way you do not need to change this setting manually on each script.

Known Issues:

  • Default encoding type is Western European (Windows) - Codepage 1252
    • It should be Unicode (UTF-8 without signature) - Codepage 65001 but for some reason Visual Studio refuses to do this by default. If you change the setting viaFile->Advanced Save Options it will stay changed. This is a minor issue though since the whole point of changing the encoding was to stop Lua/LuaInterface from crashing, whichWestern European (Windows) - Codepage 1252 does since it lacks a Byte Order Mark.

Change Log:

  • Version 1.0
    • Initial Release
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft