Epic Visio Skills produced this cool illustration of Microsoft Teams extensibility!

How to Teamsify an SPFx solution?

This post describes how you can modify your SPFx webparts to make them compatible with usage in Microsoft Teams. I’m also showing some basic ideas what you can do in the code to make the integration more useful! Why would we do this? Who wouldn’t want to just develop once and then run their code everywhere? Now with SPFx (SharePoint Framework) 1.8 being out (and 1.9 being out for a while before being pulled!), we’re getting one step closer to that, as we’re given an…Continue reading How to Teamsify an SPFx solution?

Microsoft Teams context in SharePoint Framework client-side code.

How to solve the error “Property ‘microsoftTeams’ does not exist on type ‘WebPartContext’.”

This article explains how to fix an issue where you’re just minding your own business, trying to access the Microsoft Teams context in your SPFx webpart’s WebPartContext via the built-in property microsoftTeams, but you run into an issue. Simple stuff, but it’s still easy to run into this one, so I think it’s worthwhile to document the solution somewhere. Problem Most likely, the line causing you issues looks something like this: this.context.microsoftTeams. Of like shown below in Visual Studio Code: This error will lead to…Continue reading How to solve the error “Property ‘microsoftTeams’ does not exist on type ‘WebPartContext’.”

"npm outdated" showing my @microsoft/sp- packages being badly outdated.

How to update your SPFx webpart to a new version of SharePoint Framework

Instead of being stuck on whatever version your SPFx project was originally created with, it’s possible and sometimes required to upgrade it afterwards to gain access to newer functionalities like integration with Microsoft Teams. This process, to me, is comparable to updating the .NET Framework version in your classic web application projects – while it’s sometimes a matter of simple configuration change and a rebuild, most of the time there’s a bunch of steps included and not all of them might be obvious or anywhere…Continue reading How to update your SPFx webpart to a new version of SharePoint Framework

GitHub Desktop version information

Note to self: How to sync from the original repo on GitHub (Git merge upstream)

This is one of those “note to self” -kind of entries. This workflow is probably so natural to a lot of you all, that you won’t need to document it – but since I don’t do that much development with the full “fork – clone – branch – submit pull request” -process (whic is really typical with GitHub and I guess Open Source in general), I always need to look up the instructions on how to add pull any changes from the original repository to…Continue reading Note to self: How to sync from the original repo on GitHub (Git merge upstream)

Encountering AADSTS700054 in the wild. Always a bother - but let me tell you how to fix it!

How to fix “AADSTS700054: response_type ‘id_token’ is not enabled for the application” error

This article will explain to you how to fix the error “AADSTS700054” Another day, another unsuccessful authentication attempt, and another cool error code. This one I encountered when building a little POC that was supposed to authenticate against Graph API. Problem When developing your client-side solution (an SPFx webpart, React app, ASP.NET MVC application with some client-side components… Your pick!), you run into this error when your code tries to authenticate against Azure AD: AADSTS700054: response_type ‘id_token’ is not enabled for the application. And nothing…Continue reading How to fix “AADSTS700054: response_type ‘id_token’ is not enabled for the application” error

Azure Functions CLI - such a pretty logo for such an awesome functionality

How to enable verbose logging for Azure Functions?

This post describes how you can easily enable debug/verbose information for your Azure Functions for a lightweight and built-in way to extract just a bit more information out of your Azure Function executions. There’s different methods available for Azure and your local development environment. Problem Azure Functions are awesome. But by default, your tools on gathering information without some additional configuration are not that great. The “monitor” view of the function doesn’t give you more than an excerpt of the console. This applies not only…Continue reading How to enable verbose logging for Azure Functions?

[SPLoaderError.loadComponentError]: ***Failed to load component "9951b316-c8f2-4e27-887a-b7a46b3e94a0" (ContosoSPFxWebPart). Original error: ***Failed to load path dependency "ContosoSPFxWebPartLocalization" from component "9951b316-c8f2-4e27-887a-b7a46b3e94a0" (ContosoSPFxWebPart). Original error: Error loading https://component-id.invalid/9951b316-c8f2-4e27-887a-b7a46b3e94a0_1.3.1/ContosoSPFxWebPartLocalization Unable to load script https://contoso.sharepoint.com/sites/contosoapps/ClientSideAssets/490f3be2-7e8a-4fe5-8d6b-49ae5d7c4a2e/s-ContosoSPFxWebPartLocalization_en-us_2b301efaa958eadafbad865f710d89e4.js ***INNERERROR: ***Failed to load path dependency "ContosoSPFxWebPartLocalization" from component "9951b316-c8f2-4e27-887a-b7a46b3e94a0" (ContosoSPFxWebPart). Original error: Error loading https://component-id.invalid/9951b316-c8f2-4e27-887a-b7a46b3e94a0_1.3.1/ContosoSPFxWebPartLocalization Unable to load script https://contoso.sharepoint.com/sites/contosoapps/ClientSideAssets/490f3be2-7e8a-4fe5-8d6b-49ae5d7c4a2e/s-ContosoSPFxWebPartLocalization_en-us_2b301efaa958eadafbad865f710d89e4.js ***CALLSTACK: Error at t [as constructor] (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-03-15.008/sp-pages-assembly_en-us_2676c0dcef2e33d08d5b8433ef878499.js:889:16049) at new t (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-03-15.008/sp-pages-assembly_en-us_2676c0dcef2e33d08d5b8433ef878499.js:1512:21125) at Function.e.buildErrorWithVerboseLog (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-03-15.008/sp-pages-assembly_en-us_2676c0dcef2e33d08d5b8433ef878499.js:1512:16214) at Function.e.buildLoadComponentError (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-03-15.008/sp-pages-assembly_en-us_2676c0dcef2e33d08d5b8433ef878499.js:1512:12245) at https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-03-15.008/sp-pages-assembly_en-us_2676c0dcef2e33d08d5b8433ef878499.js:1512:60385

SPFx webpart fails with “Failed to load component – – There was a network error.”

SPFx development is a bottomless bag of funsies! This article describes yet another way how to fix the error with your SPFx webpart failing to load a module. In this case, you’ll get an error that starts with the generic “Failed to load component” -part, but contains “There was a network error” later in the stack. I’ve written about this before, but I keep running into new ways to mess up, so I’ll keep documenting the solutions as well! Problem So, this one left me…Continue reading SPFx webpart fails with “Failed to load component – – There was a network error.”

Microsoft Teams extensibility

How to resolve “Error initializing application. Error: ***Manifest not found for component id [guid].” when adding an SPFx webpart to Teams?

This article describes one way to fix the issue, where uploading and sideloading an SPFx webpart in Microsoft Teams just brickwalls you with a fairly non-descriptive error, and no way to proceed. Luckily, this is usually simple to fix – I’ll describe 2 different solutions I’ve found so far! Problem You’ve got a SPFx webpart, that you’ve packaged as a Teams extension. You can even find it from Teams extensions, but while adding it as a tab, you run into issues. Oh. That’s a bummer.…Continue reading How to resolve “Error initializing application. Error: ***Manifest not found for component id [guid].” when adding an SPFx webpart to Teams?

[SPLoaderError.loadComponentError]: ***Failed to load component "9951b316-c8f2-4e27-887a-b7a46b3e94a0" (ContosoSPFxWebPart). Original error: ***Failed to load path dependency "ContosoSPFxWebPartLocalization" from component "9951b316-c8f2-4e27-887a-b7a46b3e94a0" (ContosoSPFxWebPart). Original error: Error loading https://component-id.invalid/9951b316-c8f2-4e27-887a-b7a46b3e94a0_1.3.1/ContosoSPFxWebPartLocalization Unable to load script https://contoso.sharepoint.com/sites/contosoapps/ClientSideAssets/490f3be2-7e8a-4fe5-8d6b-49ae5d7c4a2e/s-ContosoSPFxWebPartLocalization_en-us_2b301efaa958eadafbad865f710d89e4.js ***INNERERROR: ***Failed to load path dependency "ContosoSPFxWebPartLocalization" from component "9951b316-c8f2-4e27-887a-b7a46b3e94a0" (ContosoSPFxWebPart). Original error: Error loading https://component-id.invalid/9951b316-c8f2-4e27-887a-b7a46b3e94a0_1.3.1/ContosoSPFxWebPartLocalization Unable to load script https://contoso.sharepoint.com/sites/contosoapps/ClientSideAssets/490f3be2-7e8a-4fe5-8d6b-49ae5d7c4a2e/s-ContosoSPFxWebPartLocalization_en-us_2b301efaa958eadafbad865f710d89e4.js ***CALLSTACK: Error at t [as constructor] (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-03-15.008/sp-pages-assembly_en-us_2676c0dcef2e33d08d5b8433ef878499.js:889:16049) at new t (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-03-15.008/sp-pages-assembly_en-us_2676c0dcef2e33d08d5b8433ef878499.js:1512:21125) at Function.e.buildErrorWithVerboseLog (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-03-15.008/sp-pages-assembly_en-us_2676c0dcef2e33d08d5b8433ef878499.js:1512:16214) at Function.e.buildLoadComponentError (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-03-15.008/sp-pages-assembly_en-us_2676c0dcef2e33d08d5b8433ef878499.js:1512:12245) at https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-03-15.008/sp-pages-assembly_en-us_2676c0dcef2e33d08d5b8433ef878499.js:1512:60385

SPFx | Failed to load component.

This post describes the typical reasons why might encounter the following error, and the ways I’ve found to fix them: “Failed to load component. Original error: ***Failed to load path dependency ContosoSPFxWebPartLocalization from component [guid] (ContosoSPFxWebPart)” The error typically looks something like in the screenshot below: Problem This error can be thrown for a lot of different reasons. I’m trying to describe the variants I’ve run into and their fixes below. But first, let’s take a closer look into the error in question! Posts Related…Continue reading SPFx | Failed to load component.

.NET logo

How to get current user in ASP.NET Core?

This post describes how to get the currently logged in user using ASP.NET Core. This is compared with how it’s done in .NET Framework. Background In .NET Core, a lot of things are done a bit differently. That’s what I’ve been learning building more and more stuff with it, instead of good old .NET Framework. The learning curve is definitely there, but it’s not that bad – most of the things work in a similar fashion, but a huge number of details are different. In…Continue reading How to get current user in ASP.NET Core?

Finnish flag

SharePoint linguistic search features

I’ve been posting about different localization / globalization / multilingual options of SharePoint for quite some time. It’s a topic that’s kind of close to my heart, being a non-English speaker with a really difficult native language – one, that Microsoft always gets wrong even though it’s not for the lack of trying! Weirdly enough, while Microsoft messes up the Finnish translation and localization all the time, they do detect and recognize the language surprisingly well. Enough chitchat, though. In this post, I’m trying to…Continue reading SharePoint linguistic search features

entity-framework-logo

EntityFramework Core – Update-Database error “The EntityFramework package is not installed”

Another weird, but simple issue I ran into when building a simple .NET Core application. I was just minding my own business, crafting since bits of code into something remotely functional, while I ran into an issue. While trying to apply my changes to the database using .NET Core Entity Framework, executing Update-Database simply failed with the following error: The EntityFramework package is not installed You might also encounter this version of the error: The EntityFramework package is not installed on project [projectname here]. This…Continue reading EntityFramework Core – Update-Database error “The EntityFramework package is not installed”

There's quite a few different ways to set Date Formats in C#.

How to format dates in ASP.NET?

Have you ever been struggling, to make your ASP.NET MVC views format your properties of type datetime correctly? I have. And I’ve been shot in the leg by weird hacks made by both me (just 6 months earlier) or someone else. So I thought I’d finally document the different ways one can set up the formatting of datetime fields in ASP.NET MVC projects. Or at least all the ways I’ve found so far! :) While this guide has been written for ASP.NET MVC, most of…Continue reading How to format dates in ASP.NET?

ASP.NET Core web app home page

Resolving the Version conflicts for a downgraded .NET Core 2.1/2.2 web app project

I ran into compatibility issues with .NET Core 2.2 on my Azure Functions projects, so I downgraded my whole solution (an Azure Functions project, a helpers library and a web application project) to 2.1, and got rid of that particular nuisance. This introduced a few new issues, though – namely, I started getting this error whenever trying to restore nuget packages or build the project: NU1107 Version conflict detected for Microsoft.AspNetCore.Razor.Language. Install/reference Microsoft.AspNetCore.Razor.Language 2.2.0 directly to project [projectname] to resolve this issue. [projectname] -> Microsoft.VisualStudio.Web.CodeGeneration.Design…Continue reading Resolving the Version conflicts for a downgraded .NET Core 2.1/2.2 web app project

Microsoft SQL Server logo

Easily querying all the database and log file sizes on SQL Server

Quite often you get the need to simply quickly query all the database sizes on MS SQL Server – most typically, for us, this need arises when a development machine gets low on disk space, and we need to check if some database’s log size has been growing, or if something else is wrong. In my daily work, I rarely encounter this requirement anymore. Azure has almost entirely obliterated the need for such diagnostics, since it’s so easy to spin up or scale up new…Continue reading Easily querying all the database and log file sizes on SQL Server

Let's fix all the problems!

Fixing “An assembly specified in the application dependencies manifest [projectname].deps.json was not found”

This post describes one nobrainerish fix to the error “An assembly specified in the application dependencies manifest [projectname].deps.json was not found.” I ran into this while running Update-Database for my ASP.NET Core web project, that’s using EntityFrameworkCore 2.1.1. I hadn’t seen this one before, but the error was quite interesting: Error: An assembly specified in the application dependencies manifest (Koskila.[projectname].AzureFunctions.deps.json) was not found: package: ‘Koskila.[projectname].AzureFunctions’, version: ‘1.0.0’ path: ‘Koskila.[projectname].AzureFunctions.dll’ Well that’s a weird one coming from an update-database command! Posts Related to “Fixing “An assembly…Continue reading Fixing “An assembly specified in the application dependencies manifest [projectname].deps.json was not found”

Meanwhile on Google Plus...

Google Plus is shutting down – fix your .NET OAuth flow!

Google is shutting down their Facebook killer, Google+. While I’m sure there’s at least 10 end users that are sad to see the ill-fated not-that-social-medium go, the implications for Software Developers actually could be far more far-reaching. A lot of implementations of Google’s OAuth seem to rely on Google Plus’s APIs to get gather information about the user. When Google Plus goes down, so will the APIs. Their apparently unsafe implementation seems to be a major reason Google’s hastening the shutdown anyway. This means that…Continue reading Google Plus is shutting down – fix your .NET OAuth flow!

Azure Functions CLI - such a pretty logo for such an awesome functionality

Ignite 2018 recap: What’s new for Azure Functions?

Ignite 2018 is done and dusted, and it’s a good time to quickly recap what’s new for Azure Functions in the coming months. They’ve certainly been getting a lot of love from Microsoft, which is GREAT! New features for Azure Functions There was a bunch of exciting new things announced! Not all of the things in this blog post are necessarily completely new – but rather reached General Availability. Let’s go through them one by one… Posts Related to “Ignite 2018 recap: What’s new for…Continue reading Ignite 2018 recap: What’s new for Azure Functions?

"The resource you are looking for has been removed, had its name changed, or is temporarily unavailable." leads to a 404 error in jQuery.

How to fix an Azure Function (v2) failing with error “The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.”

This post describes one way to resolve a problem, where you receive an error like “The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.” when calling your Azure Functions. Problem Another day, another simple, yet kind of weird issue to solve! This time I was developing a simple Azure Function to access Microsoft Graph API. This particular issue was kind of bugging, since the error message actually had nothing to do with the actual issue and gave…Continue reading How to fix an Azure Function (v2) failing with error “The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.”

How to show a pop-up in SharePoint

This ages old trick deserves to be published – since it makes it easy to quickly show info from pretty much any another page on pretty much any Classic SharePoint page (in a SharePoint-compatible pop-up). So, here goes: Using SharePoint’s JavaScript library to open an arbitrary pop-up Yes – SharePoint contains all the functionality out-of-the-box, and you almost don’t have to do anything yourself! Let’s see how this works. Okay – long story short. On all Classic SharePoint pages, you can call this function: SP.UI.ModalDialog.ShowPopupDialog(). Like…Continue reading How to show a pop-up in SharePoint