Apps, How to

Appveyor, Github and Chocolatey: Automatically Build your project and publish updates to Chocolatey

So the aim here is to get the PowerGist project a nice CI process. I want to accept pull requests to the github repository and have these changes build, tested (future) and be published to Chocolatey for people to install/update.

Before I go on, if you haven’t used chocolatey, its a great tool similar to apt-get on linux for installing applications – have a look at it now, I’ll wait. Good, now that’s sorted lets crack on.

As this is a free time project, this CI process needs to be buttery smooth. There is nothing like a bit of friction (anywhere but mainly when releasing) to put you off doing an update, fixing a quick change or adding a feature. At the end of the day I want to write the code, accept a pull request or do a commit and have everything happen automagically.

There is one exception to this, I don’t want every build to release to Chocolatey, I want a release gate. When a build succeeds I want a versioned artifact to be created, I can then review this and click a big “Go” button, when happy, to push this to Chocolatey.

I’ve been looking at appveyor for a while now and this was the perfect project to take it for a spin, didn’t regret it – got exactly what I wanted.

So let’s get into it, first of all setup your Project:

Continue reading

Standard
Apps, Coding, How to, powershell

PowerGist – Source Control for Powershell ISE with Github Gists

 

 

Install

Get Chocolatey (awesome command line installer for windows)

Open powershell as administrator and type:

C:\> choco install powergist

Once that’s done simply type ISE and you’ll see it pop up on the right.

Login to your Github account and away you go.

*Warning – This was a quick project and should be considered Alpha quality to see if it was possible and/or useful. If you find a bug or issue head over to the github repo site to report it or fix it in a pull request*

About

One of the reasons I always advise people writing software to provide an API’s or a plugin model is that it allows end users to enhance the functionality of the product. If it doesn’t do what they want they can add it making your product better for free. It’s also a nice way to POC new features, internally, off the critical path.

So when I sat next to @StuartLeeks and said “I wish Powershell ISE integrated with some kind of source control” he pointed me to the addin model for ISE and said “Bet you can’t do it” (well known as a stealth motivation tactic for me within the team). So I set about trying.

The addin model is awesome. It’s nice and quick to get up and running and I was done writing a simple integration for Githubs Gist service (if you’ve never used it think git repos but for snippets) inside a day. I’ll go into a bit of detail on how to write addins in a future post, in the meantime feel free to have a look at the source.

Standard
Apps, Coding, How to

Awesome Extensions for Visual Studio 2013 – Make life easy on yourself

I recently reinstalled my dev box to put on the shiny new Windows 10 Technical Preview. Once I had installed everything, check out https://chocolatey.org/ if you want to make life easy when rebuilding, I thought I was good to go.

Alas my brand new install and Visual Studio 2013 Update 3 worked but, when I went to start working on a code review, I realised that I was missing loads of functionality I’d come to rely on. After a while of hunting around the Extension gallery I found everything that I needed and I was back to a lovely, productive and well behaved VS. Here is a rundown of my top extensions for you (and me when I forget at the next install), sure I’ve missed some so will update this post as I go.

Productivity Power Tools is packed with awesome features, the ones I can’t live without are TimeStamp in the output window (self-explanatory) and Margin Match, this allows you to highlight a variable and see purple dots in the scroll bar where the same variable appears. Great for code reviewing and general refactoring work. More of my highlights:

  • Solution Explorer Errors
  • Peek Help (Alt F1)
  • TimeStamp in the Output
  • Peek definition (CTRL Click)
  • Margin Match
  • HTML Copy
  • Argument Align Ctrl + alt+  ]



Ref12 – Get to know the .Net insides quickly. Ever wondered why a .Net class is behaving in a certain way or what’s going on under the hood of a function? Well every good programmer hits the F12 button and has a look. Except normally this isn’t going to do the trick for the base class library items like HttpClient, well Ref12 fixes that by taking you straight to the reference source – dropping you at the right point so you can have a rummage around and get what you need.

 


 

Web Essentials – if you’re doing anything webby in VS this is a must! Too many features to list off and do any justice to it. My personal favourite has be the additional features that are built on top of browser link and work cross browser. These allow you to inspect and edit a page in the browser and have the changes flow back into your MVC page, truly awesome.


 

CodeLens Code Health Indicator – Ever wondered if you made a method better or worse? This extension adds a live maintainability score to the codelens information so you can see it go up and down as you code!


 

Concurrency Visualizer – Working with lots of Tasks/Await/Async and want to know what’s going on? This is the one for you!

The Concurrency Visualizer helps developers to visualize the behavior of a multithreaded application. This tool includes a gallery of common patterns for multithreaded applications that behave badly. The gallery includes typical and recognizable visual patterns that are exposed through the tool, together with an explanation of the behavior that is represented by each pattern, the likely result of that behavior, and the most common approach to resolve it. “http://msdn.microsoft.com/en-us/library/ee329530.aspx


 

.Net Portability Analyzer – Want to know how much code you can share between your mobile projects? You’ll live this one, you can run it and get a report about what works, what doesn’t and where so you can get to work fixing everything up.



 

 

 

 

Standard