Azure functions web deployment fails after Visual Studio update to version 15.8.*

I recently ran into an issue with deployment one of my Azure Functions solutions after installing a visual studio update, after the update when I tried to publish the solution VS would just give me a prompt saying that it failed to publish, with no further explanation.

I did a bit of googling around and found this on stack overflow: https://stackoverflow.com/questions/51926402/azure-web-deploy-publish-failed

After going through these steps I found 2 options that work, option one if I created a new Azure Functions app from visual studio it would successfully deploy, and the second option if I manually created the publishing profile through visual studio I would get the following message which explains what was wrong all along:

So after the VS update the runtime version has changed which blocks you from deploying to the existing Functions app, it would be nice if VS just said that in the first place, would have saved me an afternoon.

Advertisements

Identify SharePoint Enterprise Feature usage script

I recently had to produce a report that identified where enterprise features were being used in a SharePoint farm, I did a quick search on google and found a PowerShell script that almost worked.

The original script was at the following site: http://panduchunduri.com/powershell-script-to-get-a-list-of-sites-that-have-enterprise-features-enabled/

This site seems to have disappeared, it’s a good thing I found it when I did.

Here is the script that I developed based off the panduchunduri script:

Finding your way around an unfamiliar database

It can sometimes be difficult to find where various values are being stored in a database you are unfamiliar with, this is a T-SQL script I wrote some time ago when I was trying to find my way around a TechOne database and it came in handy back then and it recently came in handy once again when I was querying a Connectwise database.

What this script does is it cursors through all the tables and all the columns on those tables and counts the occurrences of the value you are searching for, and then gives you a result set listing which columns on which tables contain that value.

 

Warning: Think carefully before running this against your databases, this could cause performance issues.

The following query is very handy for finding which stored procedures, views & functions are referencing various values:

P = Stored procedure
V = View
TF = Table function
FN = Scalar function
AF = Aggregate function (CLR)
TR = SQL DML Trigger

You can find a full list of xtype values here: https://msdn.microsoft.com/en-AU/library/ms177596.aspx

Yin & Yang Dreaming Deeply

I started playing around with uploading images to dreamdeeply.com a couple of days ago, which is based on Googles Artificial Neural Network image recognition software.

For those who have not been following these developments Deep Dream is an artificial neural network train by showing it millions of images for the purposes of image recognition, and then taking that software and telling it once it finds something it has been trained to recognise to then enhance those features, if you haven’t read about this then I highly recommend that you go check it out: Inceptionism: Going Deeper into Neural Networks

Anyway this is an artwork which I have put together based on some images produced by uploading bland featureless black and white images and them combining them and adding my own enhancements.

And for all the Python developers out there the code has been open sourced and made available on github: https://github.com/google/deepdream

I’m going to have to start learning Python I think…

Powershell Export SQL results to CSV

I have a bunch of SQL scripts for which I need to export the results to CSV, this is something I need to do on a semi-regular basis and its generally a handy thing to be able to automate without having to create a SSIS package or write a console application.

So here is a Powershell script i have written which will read the SQL queries in from .sql files in the input directory and output the results to csv files with the same name as the source script.

WARNING: This script doesn’t handle SQL comments very well, so make sure you remove them from your SQL scripts before using this script to run them, also for some reason wordpress keeps messing up the connection string in the SqlConnection so Datace should be Data Source.