Printing scripts in MonoDevelop?

I’ve given a good look at MonoDevelop and I can’t find anything that will print my scripts. I’ve tried Word and I’ve tried renaming the script with a .txt extension. Is there anything I can do to have my printer print my scripts in a fashion as it appears in MonoDevelop? Sometimes I find that writing on the code itself helps me greatly. This is how I’ve learned other programming languages and it helps. Thank you in advance!

Hi @Ossie_Spears,

The option to print is under the File menu in both MonoDevelop and Visual Studio.

I’m wondering if you are looking for something that will not just print the scripts but will also include the line numbers, which neither MonoDevelop nor Visual Studio does.

If this is the case, you could consider taking a look at Notepad++, it is a free text editor but it has some additional, default, support for printing, specifically the line numbering;

It supports a variety of languages, thus you will get the syntax highlighting and, if you have a colour printer, should get an output very similar to that of MonoDevelop or Visual Studio. Obviously, it does mean that you would need to launch this as a separate application in order to print, but it does support the context menu, so you could right-click on the .cs file and chose Edit with Notepad++;

image

There’s no reason why you couldn’t actually write your code using it also, but you wouldn’t get the built in intelli-sense functionality that MonoDevelop / Visual Studio offer.

I hope the above is of use. :slight_smile:


Updated Mon Sep 04 2017 17:28

Interestingly, I’ve noted that Visual Studio 2005, 2008 and 2010 apparently supported printing line numbers. Having searched for 2017 (which is the version I’m running) you can by all accounts just tick the “Include line numbers” check box on the Print dialog window. I don’t have that option when I print from Visual Studio, this may be something to do with the drivers that are installed, or installation options from Visual Studio - seems a bit odd in either case.

Updated Mon Sep 04 2017 17:41

It would seem that with Visual Studio 2017, my line numbers are printed by default - I’m guessing perhaps they wouldn’t be if I disabled them via the options.

If MonoDevelop doesn’t have similar options and you don’t fancy having to use two applications to do this I would strongly recommend Visual Studio. You can download and use the Community Edition for free and it is has a wealth of features which MonoDevelop currently does not have.


See also;

Visual Studio Documentation : Display line numbers in the Editor

1 Like

Notepad++ worked great. I didn’t see a print option under my file options. Thank you.

1 Like

Hi @Ossie_Spears,

Glad to hear it is of use. Odd that there isn’t a print option under File. Are you using PC or Mac?

I have the same problem with Unity 4.7 Monodevelop. No Print option in any of the menus. Trying to print script for Laser Defender, and as there a so many scripts, I really don’t want to resort to a 3rd party app like Notepad++. Is print simply not available or is there a setting somewhere. Dont want to start Glitch garden till I have a solution to print the script from laser defender.

PC or Mac?

PC. I have notepad++. It works good, but would be better to print directly from MonoDevelop if at all possible.

I have 4.7.2 here, I will install it now and see if I get the same behaviour, and I would agree, you should just be able to print from the application rather than requiring a subsequent application.


Updated Sat Dec 09 2017 15:45

@Sorendark, I have just finished installing Unity 4.7.2f1. The version of MonoDevelop that installs with it is 4.0.1.

There is no Print option from the File menu. Interestingly, if you look at Options / Key Bindings and scroll down to File, you’ll note there is a key binding for both Print and Print Preview. I find neither of these work.

I believe this issue relates only to the PC version as I have seen other people post online regarding MonoDevelop and printing successfully, but via Mac.

I have just launched the version of MonoDevelop that comes with Unity 2017.1 which is version 5.9.6 and there is a Print option under the File menu, this does correctly initialise the standard Windows print dialog.

I could work backwards through a lot of installed Unity/MonoDevelop versions to see where it appears, but to be frank, that seems like a lot of effort! :wink:

I haven’t tried this, but, as you can choose the editor you want to use via Unity;

image

…you could potentially install a more recent version of Unity, which will come with a more recent version of MonoDevelop, and then in your old version of Unity, browse to the more recent version of MonoDevelop. It’s a bit of a fudge, but it may work and then provide you with the fixed/more up to date features of MonoDevelop.

Or…

Just use Visual Studio :slight_smile:


Updated Sat Dec 09 2017 16:11

Just tested that theory, and yes, that works…

Privacy & Terms