# When does simplicial localization commute with functor categories?

Let $(C,W)$ be a category with a class of weak equivalences, and $D$ a small category. Then I can form the diagram category $(C^D,W^D)$ with objectwise weak equivalences, and its simplicial localization $L(C^D,W^D)$. Or I can first simplicially localize to get $L(C,W)$ and then form the $(\infty,1)$-functor category $L(C,W)^D$.

If $(C,W)$ is a nice model category, so that $(C^D,W^D)$ has a model structure presenting $L(C,W)^D$, then we have $L(C^D,W^D) \simeq L(C,W)^D$. Is this true any more generally? Is there an easy counterexample where it doesn't hold?

For general $C$ (I will drop $W$ from the notation) this is not true even when $D$ is an infinite discrete category.
In the answer to this similar question I described how to construct a sequence of relative categories $C_0, C_1, C_2, \ldots$ with objects $X_i, Y_i \in C_i$ such that $X = (X_0, X_1, \ldots)$ and $Y = (Y_0, Y_1, \ldots)$ are isomorphic as objects of $\prod_i \mathrm{Ho}(C_i)$ but not as objects of $\mathrm{Ho}(\prod_i C_i)$.
We take $C = \coprod_i C_i$ and similarly we have objects $X$ and $Y$ isomorphic in $\mathrm{Ho}(C)^\mathbb{N}$ but not in $\mathrm{Ho}(C^\mathbb{N})$. Of course $\mathrm{Ho}(C^\mathbb{N})$ is the homotopy category of $L(C^\mathbb{N})$ so $X$ and $Y$ are not equivalent in $\mathrm{Ho}(C^\mathbb{N})$. I'm not sure whether $\mathrm{Ho}(C)^\mathbb{N}$ is the homotopy category of $L(C)^\mathbb{N}$ (probably not), but at least the functor $L(C)^\mathbb{N} \to \mathrm{Ho}(C)^\mathbb{N}$ reflects equivalences and hence $X$ and $Y$ are still equivalent in $L(C)^\mathbb{N}$ so $L(C^\mathbb{N}) \to L(C)^\mathbb{N}$ is not an equivalence.