# Old answers don't work - XeLaTex fontspec crash on Texmaker [LaTeX error: “kernel/invalid-variant”]

I'm reviving an old issue which I have come across. There are many similar questions but dated from a few years.

Basically using Miktek 2.9.7100 with everything up to date and Texmaker 5.0.3. I can't compile the package fontspec with XeLaTeX. Using the Quick Build XeLaTeX + View PDF

% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = XeLaTeX
\documentclass{article}
\usepackage{fontspec}

\begin{document}
Hello world!
\end{document}


error:

! LaTeX error: "kernel/invalid-variant"!! Variant form 'e' invalid for base form '\tl_if_empty_p:n'.!! See the LaTeX3 documentation for further information.!! For immediate help type H <return>.!............................................... \cs_generate_variant:Nn \tl_if_empty_p:n {e}


The most populare answer was to install l3kernel. I have the package from 10/09/2019 installed. But it still does not work.

• The formatting of the error message suggests that your version of l3kernel is rather old. Could you \listfiles before the \documentclass, compile your document, and show the log file, please? – Phelype Oleinik Sep 24 at 11:19
• Run miktex updates as user and as admin. You quite certainly have an old version somewhere. – Ulrike Fischer Sep 24 at 11:19
• Updating with user privileges did the trick! I'll let you answer if you want the reputation points. Miktek is really a strange piece of software – will.mendil Sep 24 at 11:30