So, porting a project from .NET 6 to .NET 8 should be as easy as changing the framework from one to the other, but this has to be done in BOTH the Project properties and the Publish settings or you get a rather peculiar error message about mismatching version numbers.
Found this out recently. The test project i used seems to run just fine, with a few warnings related to changes from .NET 6 to .NET 8, but compiles and gets published.
I ran Strings on the compiled binary and found that there are still some text references to .NET 6 in the binary like:
"System.Security.Permissions.SecurityPermissionAttribute, System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
I assume that this is some sort of left over reference created when the project was created, as the underlying runtime files now point to .NET 8 instead... i'm gonna try porting a larger project with many more dependencies and see if anything breaks.
#dotnet #porting #migration #dotnet6 #dotnet8