Verify a distribution that is not exponential family
Solution 1:
There are multiple formulations of an exponential family. But whichever one chooses to follow, the basic description is that if a random variable $X\sim p_{\theta}$ where $p_{\theta}$ is a probability model (pdf or pmf), then the family of distributions $P=\{p_{\theta}:\theta\in\Omega\}$ is a one-parameter exponential family (here $\theta$ is a scalar parameter) if $p_{\theta}$ can be expressed as
$$p_{\theta}(x)=\exp\{\eta(\theta)T(x)-B(\theta)\}h(x)\quad,\,x\in\mathscr{X}\,,\tag{*}$$
where $\mathscr{X}(\subseteq \mathbb R)$ is independent of $\theta$ and $\Omega$ is some (non-degenerate) subset of $\mathbb R$.
Here $h,T$ are functions of $x$ only and $\eta,B$ are functions of $\theta$ only.
The pdf $f(x\mid\theta)$ in the question is a Gumbel density with unit scale and (unknown) location $\theta$.
We have $$f(x\mid\theta)=\exp\{\eta(\theta)T(x)-B(\theta)\}h(x)\quad,\,x\in\mathbb R\quad,\theta\in\mathbb R,$$
where $\eta(\theta)=-e^{\theta},\,B(\theta)=-\theta,\,T(x)=e^{-x}$ and $h(x)=e^{-x}$.
So this is definitely a member of a one-parameter exponential family.
In fact if the scale parameter $\sigma$ (say) is known, then the general location-scale Gumbel pdf given by $$p(x)=\frac{1}{\sigma}e^{-(x-\theta)/\sigma}\exp\left(-e^{-(x-\theta)/\sigma}\right)\qquad,\,x\in\mathbb R\quad,\theta\in\mathbb R,\sigma>0$$
also belongs to the exponential family by the same logic.
If the scale $\sigma$ is unknown, then clearly $p(\cdot)$ no longer remains in the exponential family. This is because we cannot find a $T(x)$ and an $h(x)$ in the form $(*)$ which is free of $\sigma$.