.NET core gotcha

Recently I’ve been messing around with the new .NET Core.

I’ve created a class library which I’m using in an ASP.NET Core Web API.

Firstly, at least before 1.1, I couldn’t add a reference to the class library just by giving it the .dll file. I needed to create a NuGet package of my library and publish it to a NuGet feed. I set up a local NuGet feed and added it as a source in VS and were able to add my code. This is all fairly easy.

Instructions on how to create a NuGet package can be found here: https://docs.microsoft.com/en-us/nuget/create-packages/creating-a-package

And how to set up a local NuGet feed: https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds

After a while I did some changes to the library and wanted to update the package in my Web API project as well.… continue reading

Issue after migration of project.json

I have recently installed Visual Studio 2017 and with that started to migrate some of my .NET Core projects to the new .csproj

Check out this post by Steve Gordon to get more background insight on the migration

This looks easy enough with the migration wizard in VS. And the first try on a class library seemed to work just fine.

However when revisiting the project a couple of days after the migration I get this in VS 2017:

I right-clicked the project and tried to Reload. The migration wizard pop’ed up and told me to migrate. I accepted this only to get a message saying that it couldn’t find the project.json file:

I could see that the .sln file still had a reference to the xproj file so I tried removing the project and readd it.… continue reading

Orphaned files

A colleague asked if I had a script lying around that could investigate datastores and find orphaned files.

Well, I didn’t. But instead of spending a lot of time creating one from scratch I went to our friend google and searched. There were lots of results, but I found one from Powershell guru LucD (lucd.info) and stopped searching.

The script and instructions are found here: http://www.lucd.info/2016/09/13/orphaned-files-revisited/

Be aware that the script, or more precisely a VMware VIM method that the script uses, is relatively slow.… continue reading

Hello world!

Welcome to my blog. I’ll keep this short as a Hello World should be.

This blog will be a place for me to post things that I am currently working on and that interests me. If others find it interesting that’s great. Over the years I have been using different communities to my benefit so if I could give something back that would be awesome… continue reading