Github: file overlay icons

Summary: while apparently not a core part of Git/Github, the combination of Git Extensions and TortoiseGit does the job

Use case: within Windows/File Explorer, I want to see the status of my files relative to the Git repo, e.g. Added, Changed, Deleted, Unchanged

I googled…[file overlay icons github]

https://github.com/owncloud/client/wiki/Overlay-Icons ->

https://github.com/owncloud/client/issues/1818

I am very used to explorer icons in other source control systems, e.g. svn/Tortoise, and have taken them for granted. However, there seems to be a lot of huffing and puffing around the subject on the Git forums, with the opposite camps of “What on Earth do you want that for?” and “it is mad this is not available by default”.

This Stackoverflow post talks about [“GitExtensions is awesome for the true git experience. TortoiseGit obscures Git, forcing it into a “simple” experience. TortoiseGit has icon overlays though. The two work quite nicely together, so just install them both, use them for their strengths, and ignore them for their weaknesses.”]

Looking for one takes us here [https://github.com/gitextensions/gitextensions], here [https://github.com/gitextensions/gitextensions/releases/tag/v2.50.01]

and the other here [tortoisegit] and [https://tortoisegit.org/]

You will see from the last screenshot that it works well enough, imo.

 

 

 

GitHub: searching in your own repositories

While not immediately apparent to me, GitHub does have pretty good search. The root URL is, amazingly:

https://github.com/search

Also here in a new tab.

One example is enough, as the GitHub URL gives more detail. Note the syntax used is:

[search string](space)[literal "user:"][repo owner to search]

, as in:

Also note that you don’t seem able to enter wildcards…

Pretty much confirmed by this:

Git: ignore C# build files

Very useful

DNX: a console app on a Windows client with no pre-existing dev tools

Summary: Previously, I got a trivial console app working using DNX. However, As Visual Studio 2015 was on that box, I could not be sure how much help that was giving me under the covers (especially as I started it using a VS template). This post just confirms that you can run a console app on a bare Windows 10 box, with no development environment or tools present, once you have made the necessary trip to GitHub.


Proving out dnx and its mates is getting to be a bit of a drug. I just know that even though I have absolutely zero justification for trying out it out on a Linux distribution… it will happen. 🙂

But back to the job in hand…

Using my Azure subscription, I spun up a Windows 10 Enterprise VM – out of the box, this has no developer environment or tools. I installed Google on that box (I have no idea why it assumes I’m in the Netherlands), and searched for [dnvm github] (or just go straight here):

DnvmGithub01

I picked a link, and downloaded the zip (note you do not have to log in just to get the zip):

DnvmGithub01

As I’m just playing, I saved that to the (temp) d: drive on the VM, and expanded it:

DnvmGithub02 DnvmGithub03

I decided that the I would just have a go with the dnvm.cmd:

DnvmGithub04 DnvmGithub05

PowerShell (called from the .cmd) knows that the .ps1 came from the Internet, so let that through:

DnvmGithub06 DnvmGithub07

Let it install the DNX runtime for me:

DnvmGithub08

This has also updated the path for me, to find dnx

DnvmGithub09

DnvmGithub10

But DNVM isn’t on the path. OK, I could put that there by hand, but for now, I’ll just navigate to its location. Note that it was evidently a mistake to earlier save it to a temporary location – I will need it another time:

DnvmGithub11

As said, this is a new Windows box, so update the execution policy:

DnvmGithub12 DnvmGithub13 DnvmGithub14

In fact, running dvnm upgrade is evidently redundant, well, this time anyway, as it is doubtless repeating stuff done in the dnx wizard earlier:

DnvmGithub15

So now I have copied across the 3 files from yesterday, ie the .cs, the .xproj, and the project.json. This confirms that neither a .sln nor a .csproj are needed. However, I am not yet clear on the implications for msbuild. I don’t care about that right now:

DnvmGithub16

With those minimum files in place, I can now run [dnu restore] to read the project.json file and download the dependencies. There are some errors… but I’m not going to examine those right now:

DnvmGithub17 DnvmGithub18

With all dependencies hopefully resolved, we can execute the Program.cs, using

[dnx -p .\project.json run]

… and that gives me the hoped-for result:

DnvmGithub19

Note that although I used the console app from yesterday, the dnx download actually contains its own console app, so I could have used that. For this exercise, I would not have needed the .sln file, but for something more enterprisy, maybe I would need a .sln file:

DnvmGithub20


Next day…

I just spent not more than 5 minutes on my Linx Windows tablet going through all the above steps. As a plus, I was also able to load Visual Studio code, edit the .cs in there, get Intellisense working, AutoSave, and then re-run dnx against it. This time round I did use the sample console app rather than my own. The only interesting thing in that was that in VSC the OmniSharp/Roslyn parser saw that System.Diagnostics was not required, and offered to remove it. Great.

I think right now the one gap in my mind is seeing how the new (?) MsBuild fits in to this, when you have more complex dependencies. But that will do for now.

Roslyn: First Steps

Roslyn, AKA the .Net Compiler Platform, is used in Visual Studio 2015 for the C# and Visual Basic compilers. MS Blog. My motivation is that I want a simple, small C# compiler footprint that I can use with Visual Studio Code.

Now Visual Studio is anything but lightweight (they REALLY got this naming wrong between VS and VS Code)… but if you go to Roslyn on GitHub, download Nuget.exe as Raw, go to Powershell I guess as Administrator, and run this:

.\nuget.exe install Microsoft.Net.Compilers

then you get the csc.exe and its dependencies.

Screenshots to cover all that:

Nuget01

Nuget02

Nuget03

Nuget04

Nuget06

Nuget05

Nuget07

NugetRoslyn08

NugetRoslyn09

NugetRoslyn10

OmniSharp01

OmniSharp02 OmniSharp03

OmniSharp04

OmniSharp05

OmniSharp06 OmniSharp07

Compilation using csc.exe

We then come to actually compiling something trivial. msdn guidance here.

This is a linked page from there to the simplest possible console app. Just SO disappointing in a page about VS2015, they’re using a Windows Batch script to wrap it and not PowerShell. Anyhoo… if you have this content:

(tidy up another time)

Link to the Roslyn wiki on GitHub: https://github.com/dotnet/roslyn/wiki/FAQ