SharePoint Guy's Blog

Blog for my musings, learnings and various and sundry mental meanderings.

  • Moving Local git Repo to GitHub

    Recently I was working on a learning type project that I considered important enough to create a local git repo for it, but not a remote one. However it got to the point that I wanted to preserve it on GitHub. I can add a repo to GitHub, link to it, then push new branches to it. The problem is that I cannot push the master and have that history. First of all there is nothing in my local repo to tell me that it is connected to any remote repo. This is the command used to determine the associated remote repo:git remote –vIn this case it returned nothing. To get where I wanted to go I created a git repo named GitToAdd. Here is the command I used to associate this remote repo with my local repo: … more

  • Updates on SharePoint Framework

    The SharePoint Patterns and Practices (PnP) group continues to announce developments in the SharePoint Framework (SPFx) space. From the latest SIG meeting broadcast on YouTube there are a couple of high points to note, along with the evolution of the initiative. First is that it will be available for OnPrem farms with the release of Feature Pack 2 of SP 2016. This is expected in the second half of this year but as far as I have heard there is no firm date, other than teasers, beyond that. Still, with it being in GA status for O365, this is exciting. In order to accommodate the OnPrem scenario, the first choice of the yo project generator will be to prompt whether the project is targeting an … more

  • Creating and Running Tests

    Building out the test project NOTE: the initial test project should have been created as an xUnit project. Towards that end I have added the command: yo aspnet xunit Pubs.Data.Test --version-current to the yoCommands.txt file and run it to use that as the test project. To create tests we will need to open up the Pubs.Data.Test project, then either delete the Class1.cs file, then add a new class named StoresTest, or else rename the Class1 class to StoresTest. Next open up the csproj file and add the following lines to dependencies, either manually or by using the NuGet Package Manager extension of VS Code: "Pubs.Data": "1.0.0-*"”Microsoft.EntityFrameworkCore”: “1.1.0”,"Microsoft.Extensions. … more

  • Presentation to Triangle SPUG

    Thanks again to George and Mike for the opportunity to present at the Tri-SPUG meetup last Thursday, the 15th. Again all apologies to the attendees that the projector was not working and hopefully there was still some benefit garnered from being there. As promised I am providing the slides here. If you want to see the code you can clone from the github site here: https://github.com/SharePointGuy1/TriSPUGSPFx. Assuming you have git installed, if you type git clone https://github.com/SharePointGuy1/TriSPUGSPFx.git it will install in a subfolder named TriSPUGSPFx, or git clone https://github.com/SharePointGuy1/TriSPUGSPFx.git your-sub-folder, and it will install in that subfolder. One thing I … more

  • Upcoming Presentation to the Triangle SharePoint User Group (TriSPUG)

    Thursday I will be presenting to the Triangle SPUG on the new SharePoint Framework (SPFx). I am very excited but nervous as it has been a few years since I have done a presentation like this; not since the 2012 Atlanta SharePoint Saturday event. That did not go well.. First off my slides were a little chaotic, and the preparation was not what I would have hoped. This time I have spent the time to put as little into the slides as will make the point, and little or no more. (It’s like Mark Twain’s comment to an interlocutor apologizing for so long a letter, that he had not the time to write a shorter one. ;->) I am also rehearsing the talk itself, despite sounding like a crazy person … more

  • Global Git Parameters

    There are a couple of files that git uses to do its thing. The two main ones are the .gitconfig to configure the git client, the other is the .gitignore file that is uses to determine which files get included in the repository and which do not. If you do not want to recreate these files each time, or want to change any global values you can always edit the global files directly.

    For .gitignore the file is in the users base folder, in my case C:\Users\Robert, so the file is C:\Users\Robert\.gitignore. For *nix users the file will be ~/.gitignore. Since I often use Visual Studio as we as VS Code, I have added entries for folders and file specific to those programs. So I do not have to edit … more

  • Setting Up the Projects for DotNet Core Web Api – Revisited

    Before creating any projects we will create a new branch in git locally, then push it up to github.com. The following lines of code will accomplish this:

    git checkout -b Setup_Projectsgit push origin Setup_Projects

    After this the local and remote repositories will both have a branch named Setup_Projects.

    Create Projects

    Now we are ready to create the projects that will comprise our solution. From a high level view this is what it will all look like if opened in Visual Studio:

    One thing that might jump out at you is that there is a seemingly superfluous console application. I tend to include such a project to test various thing as I develop. I find it very useful in terms of playing … more

  • Setting up Project in git

    Since this will be setup in a git repository we will start there. The simplest way to do this is to go to github.com and create a new repository thusly: I am naming the new repo CoreWebApiPubs, as that is the tersest, and yet most complete name in that it has all the elements necessary to understand, at a glance, as to what it is. The other thing to notice is that towards the lower left I have chosen the VisualStudio .gitignore file. That is a lengthy file but covers anything that VS or another IDE, may generate, but is relevant in git, First off I open a Node.js command prompt. I use this command prompt since I have run into issues running npm, and other commands using a standard, or VS, … more

  • DotNet Core and Web Api's

    Since the dotnet core and Web Api frameworks are the new hot things I decided I would get up to speed with them by building a reference application utilizing both technologies. In the process I will document the required steps in the hope that it will serve someone else as a good starting point and provide a good reference point bringing together all the required pieces to tackle the basics. The data that will be served is from that much maligned, but invaluable, database called pubs. The reason for this is the simplicity.

    This application will be as loosely coupled as I can possibly do. For example the Entity Framework (EF) will have its own project, as will the repository, web api, plus … more

  • Introduction to My Blog

    Welcome to my blog. My main purposes here are to share what I have learned in the hope that it may help others, help promote various technologies, and to be a good place to remember what I have learned :-). I also hope to learn from the comments that some may leave and I want to keep that piece as open as possible but do reserve the right to edit to my own satisfaction. I short I have the goal of making this a forum for all of us to learn relevant technologies not to be limited to Microsoft, although that may be the focus. more