Tangent portfolio weights without short sales?

Consider a mean-variance investor in a world with a risk-free asset.

Let $R_f>0$ be the return of the risk-free asset, $\mathbb{E}(R_i)>R_f$ the expected return of the risky asset $i$ and $SD(R_i)$ the standard deviation of the return of the risky asset $i$ for $i=1,...,N$.

Let $V$ be the variance-covariance matrix of the returns of all risky assets and $\bar{R}$ be their expectation.

Returns of risky assets can be positively correlated.

The weight of risky asset $i$ in the tangent portfolio is $x_i^\star=\frac{y_i}{\sum_{k=1}^N x_k}$ with $y_i=\{V^{-1}(\bar{R}-R_f)\}_{ii}$ if we allow for short sales. Hence, $x^\star_i$ can be strictly positive or strictly negative or zero (right?).

Question: which are the weights of risky assets in the tangent portfolio if we do not allow for short sales? Are they all strictly positive? If not, under which additional restrictions are they all strictly positive?

To understand how to proceed you have to dispense with the formula and look at the derivation of the tangent portfolio from first principles. The multiobjective model is $$\begin{array}{ll} \text{maximize} & (\bar{R}^T x + R_f x_f, - \tfrac{1}{2} x^T V x) \\ \text{subject to} & \vec{1}^T x + x_f = 1 \end{array}$$ The zero risk solution is of course $x_f=1$, and the maximum return solution is $x_i=1$ where $i=\textrm{argmax}_i \bar{R}_i$. To examine the rest of the tradeoff curve we scalarize the model with $\gamma^{-1}\in(0,+\infty)$ as the weight of the risk term. (The reason we use the reciprocal will become clear later.) $$\begin{array}{ll} \text{maximize} & \bar{R}^T x + R_f x_f - \tfrac{1}{2} \gamma^{-1} x^T V x \\ \text{subject to} & \vec{1}^T x + x_f = 1 \end{array}$$ The Lagrangian is $$L(x,x_f,\lambda) = -\bar{R}^T x - R_f x_f + \tfrac{1}{2} \gamma^{-1} x^T V x - \lambda ( \vec{1}^T x + x_f -1 )$$ The optimality conditions are $$-\bar{R} + \gamma^{-1} V x - \lambda \vec{1} = 0 \quad - R_f - \lambda = 0 \quad \vec{1}^T x + x_f = 1$$ Eliminating $\lambda$ and solving for $x$ yields $$x = \gamma V^{-1} ( \bar{R} - R_f \vec{1} ) \quad x_f = 1 - \vec{1}^T x.$$ The tangent portfolio is found by finding the value of $\gamma$ for which $x_f=0$: $$\gamma=\left(\vec{1}^TV^{-1}(\bar{R}-R_f\vec{1})\right)^{-1}.$$ This coincides with the solution you have offered in your post.
Now that the general principle is illuminated, we can apply it to the model with a short sale restriction. The zero risk and maximum return solutions are identical, so we immediately return to the scalarized model with a nonnegativity constraint added: $$\begin{array}{ll} \text{maximize} & \bar{R}^T x + R_f x_f - \tfrac{1}{2} \gamma^{-1} x^T V x \\ \text{subject to} & \vec{1}^T x + x_f = 1 \\ & x \succeq 0 \end{array}$$ The Lagrangian is $$L(x,x_f,\lambda,z) = -\bar{R}^T x - R_f x_f + \tfrac{1}{2} \gamma^{-1} x^T V x - \lambda ( \vec{1}^T x + x_f -1 ) - z^T x$$ where $z \geq 0$. The optimality conditions are $$-\bar{R} + \gamma^{-1} V x - \lambda \vec{1} - z = 0 \quad - R_f - \lambda = 0 \quad \vec{1}^T x + x_f = 1 \quad z \geq 0$$ Eliminating $\lambda$ and $z$ yields $$V x \geq \gamma(\bar{R} - R_f\vec{1}) \quad \quad \vec{1}^T x + x_f = 1$$ Unfortunately, even for fixed $\gamma>0$, it is not likely that there is an analytic solution for $x$ and $x_f$ (unless, say, $V$ is diagonal).
To determine the tangent portfolio, we need the value of $\gamma$ for which $x_f=0$. It also cannot be determined analytically, but it can be determined computationally. \begin{array}{ll} \text{maximize} & \gamma \\ \text{subject to} & V x \geq \gamma ( \bar{R} - R_f \vec{1} ) \\ & x \geq 0, ~ \gamma \geq 0 \\ & \vec{1}^T x = 1 \end{array} The efficient frontier with a risk-free asset and a short sale restriction is no longer a straight line; I believe it is piecewise linear. So calling this a "tangent" portfolio may be a bit misleading. But it is still the portfolio found at the point where the tradeoff curves with and without the risk-free asset touch.