statiqdev / Statiq.Web

Statiq Web is a flexible static site generator written in .NET.

Home Page:https://statiq.dev/web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add target .net 6.0 along with .net core 3.1

atiq-cs opened this issue · comments

Currently, the package only supports .net core 3.1.

Can we also add support for .net 6.0?

Thanks.

Here are the errors we get when we target .net 6:

[CRIT] Object does not match target type.

buried in,

[INFO] ========== Completed ==========
[INFO] 60 total files output (written or already existed)
[INFO] 4 actual files written
[INFO] 56 files already existed
[INFO] Finished in 8406 ms:
[INFO] - Before Engine Execution Clean in 90 ms
[INFO] - Before Engine Execution Events in 1015 ms
[INFO] - Analyzer Before Engine Execution Events in 1 ms
[INFO] - Engine Execution in 7298 ms
[CRIT] Object does not match target type.
[INFO] To get more detailed logging output run with the "-l Debug" flag
[INFO] Preview server listening at http://localhost:5080 (on any hostname/IP) and serving from path D:/git_ws/statiq/note/output with LiveReload support
[INFO] Watching paths(s) theme/input, input

More details:
https://gist.github.com/atiq-cs/19804df145fbcde98bff89a6152bcdf9

Thank you for the awesome project!

.NET 6 is backwards compatible with applications and runtimes that support .NET Core 3.x (unless there are bugs or rare complications, which we can work around). At the moment I have no plans to multi-target and since .NET 6 isn’t even in general availability yet, I won’t be retargeting for a while. Likewise, applications that target .NET 6 can use a library that targets .NET Core 3.1 without problems. Eventually I’m sure I’ll bump everything from .NET Core 3.1 to .NET 6 given the latter is long-term supported.

What is the use case that would require a .NET 6 target at this time?

It makes sense what you are saying. We are early targeting .net 6 (bumping up target net version) in all our projects, starting with the release candidate.

Cool - targeting .NET 6 in the application that’s using the Statiq libraries (I.e. your generator application) shouldn’t be a problem, so you’re good to go. If you do encounter any problems please do open a specific issue so we can fix it!

One more little gotcha is that there’s a known problem with the current .NET 6 RC and the current version of Statiq. It’s been resolved both upstream in .NET as an unintended break to backwards compatibility and in Statiq as a precaution, but I’m still working on one other issue before getting the patched version out. Keep an eye out for a new Statiq version releasing this week if you encounter any problems with rendering Razor views under .NET 6.

Updated the issue description with output log/error.

The good news is that’s the exact error I was talking about - a fix is already written and tested. The bad news is I can’t quite release yet - so keep an eye out and this error will go away with the next release.

This is fixed with release of 1.0.0-beta.34. Much appreciated.

Thank you. 👍

Yay! Thanks for circling back with a confirmation.