Create a NuGet package from a VS project and include all referenced dependencies

It’s been a while since I had to build a NuGet package, a long while. While as a developer I use multiple NuGet packages all the time in my applications, I think I’ve created only a few of my own. Needless to say, I am a total noob when it comes to building AND publishing NuGet packages.

So the other day the need to do this presented itself, and while building a Nuget package isn’t difficult at all, that said, there are times when you need to do something that isn’t as basic as the multiple examples given on StackOverflow or Microsoft Docs. This was one of those times, I needed to create a NuGet package that will contain just one public method, but to run correctly, it required references to multiple project dependencies.

As I was doing this, I also run into other errors that perhaps someone with experience building NuGet packages wouldn’t ever run into as my problem was that I didn’t know about specific options that you need to include when creating your NuGet package. This is a small post about those two essential command options, and hopefully, when you run into a similar problem, this works as a solution for you too.

If you don’t have the nuget.exe in your computer yet, you can download the latest version from here.

TL;DR;

  1. Open a command window and browse to where your project file is.
  2. nuget spec
  3. nuget pack -Prop Configuration=Release -IncludeReferencedProjects

Create a NuGet package from a VS project and include all referenced dependencies

Run code from your code editor

The other day I discovered this useful extension that allows you to run your code from within the Atom editor. The name of the extension is Script Runner, and while there are many other extensions that do this, I really like how this one shows the code results on the right side of your screen, allowing you to easily see your code and the result of it after running it side-by-side.

After discovering this tool my first thought was, can I find the same extension or similar for the VS Code editor? The answer is Yes. The best extension I found to run your code while in the editor is Code Runner, and while this extension shows you the results in the console window, it still displays the results in a clear way by only adding the result and the time it took to execute the code. Very useful tool!

Why are these tools useful? For starters, they allow you to see the result of your code right away, without the need of setting up a unit test, or anything else really. You still have to output your result by doing a console.log for example, but you don’t have to run it in a browser or anything like that.

Below is an example of a FizzBuzz program using Atom and Script Runner:

And below is the same code using VS Code and Code Runner

They are very similar and I will be using both, I really like how easy it is to run and see your code’s output right from the editor.

To download and install these extensions, just click on the links below, and happy coding!

Script Runner – extension for Atom editor

Code Runner – extension for Code editor

Portability vs. Extra Power – What type of laptop to use when writing code

If you had the option to select a laptop for software development, and the options where between something portable like a very capable ultralight laptop, or a much bigger, and much powerful laptop, which one would you choose?

The specific models aren’t important really, as you might be reading this post many months or perhaps many years after and so the particular laptop models today, would be irrelevant in the near future. What’s important here is the idea of getting a much lighter but capable laptop for software development instead of getting a much more powerful laptop, with the drawback of being much more prominent, heavier and less battery efficient.

Why the need for portability?

As a software engineer working remotely 100% of the time AND someone who likes to travel and visit coffee shops, portability is something I’ve always appreciated when it comes to my gear. However, as I continue to get more involved with larger projects, the ultralight laptops I’ve used so far aren’t cutting it anymore. In general, laptops are much lighter and much powerful than ever before, but if you want or need a laptop with at least 32GB of RAM and a Quad processor, then you’ll have to compromise and get a bigger laptop.

Today, more and more people can work remotely, and many of them are taking it a step forward by traveling around the country or internationally and getting work done while on the road. I’ve done this a couple of times and while it isn’t perfect when it comes to communication with your team due to time zone changes, etc. it works well for many people as long as expectations regarding time and availability are well-defined between the members in the team.

Portability vs. Extra Power – What type of laptop to use when writing code

How to find great developers.

In response to those companies, hiring managers, interviewers who keep asking the same question:

Where can I find great developers?

A developer becomes a “great developer” when the company, team, resources, projects, recognition, etc., are compatible with that person. Under that logic, I believe any programmer can be great if they desire to do so and find the environment and motivation to thrive.

Most technical interviews fail to find the right people because interviewers and hiring managers usually go at it with an “idea” of what a “great developer” looks like to them. In most cases, everyone ends up hiring people who don’t work out and miss out on people who could have become the “great developers” there were looking for in the first place.

What can you do with Azure Functions? Here’s one example.

Last week I attended a tech conference where I learned about Azure Functions. This new service from Azure, Microsoft’s cloud platform, is something that got me interested. Microsoft is promoting this new service as a server-less option for simple APIs, triggers, notifications, and anything that you can think of that can be processed by a function, regardless of the programming language used.

It’s worth mentioning that just like with any other cloud service or feature, Azure Functions isn’t the solution for everything. However,  Azure Functions are really helpful in supporting your application without the need to provision a new full-featured API, servers, etc.

In this blog post, I will show you an example of an Azure function that serves as an API endpoint, returning text from a simple call to it. What can you do with Azure Functions? Here’s one example.