How can I get a DTE object with MSBuild?
<p>I'm new to developing and my team leader asked me to solve this situation.</p>

<p>When compiling the solution with VS, every thing is OK. But when compiling with MSBuild, this line of code returns NULL value.</p>

<pre><code>static DTE Dte;

Dte = serviceProvider.GetService(typeof(SDTE)) as DTE;
</code></pre>

<p>How can I solve this????</p>

<p>Thanks in advance.</p>
