Posts

Showing posts from November, 2018

x86 .Net Core application fails to launch and debug via Visual Studio 2017

Today I had a random issue following changing one of my .Net Core projects. Usually I run these AnyCPU but this one needed to be X86 due to a third party library. I've done this before and had no issues but today VS seemed to launch the app and then immediately quit with an error exit code but no useful information! So far whenever I hit something like this I always try and run it via the console using dotnet run in the project directory. Fortunately this showed the issue straight away: It was not possible to find any compatible framework version The specified framework 'Microsoft.NETCore.App', version '2.1.5' was not found.   - Check application dependencies and target a framework version installed at:       C:\Program Files (x86)\dotnet\   - Installing .NET Core prerequisites might help resolve this problem:       http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409   - The .NET Core framework and SDK can be installed from: ...

The mysterious case of being unable to debug a .Net Core Console application using Visual Studio 2017

Image
This morning I had a very frustrating time. It started off well and I was continuing my drive to convert alot of our hardware services from .Net Framework over to .Net Core. Phase 1 is simply .Net Core running on Windows but then Phase 2 is true cross platform. To date its gone very well and I'll probably write about it further another time. This morning I was continuing to port code across, mainly making our libraries .Net Standard 2 or .Net Standard 2.0 with .Net 4.5 multi targeting. All worked fine until I converted my final library. The app built, it ran and seemed to be working fine however all of a sudden none of my breakpoints in Visual Studio worked. During this entire process I have found I've hit many build / compile issues when switching between branches and have often had to nuke my obj folders or do a git clean -xdf but this was not the case. Everything worked bar the breakpoints. The usual tricks didn't work, I even reboot my machine and then checked out t...