Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>[Including my previous reply to this same question asked over email.]</p> <p>MSBuild targets/tasks distributed via VSIX are not supported in Visual Studio 2010. The recommendation is for you to use MSI (or similar deployment technology) and drop your targets files to a directory of your choosing under %ProgramFiles%\MSBuild. You can then refer to them in your project templates via $(MSBuildExtensionsPath).</p> <p>VSIX installation is essentially just an “unzip” of your VSIX. That’s it. There’s no registration or ability to do custom actions whatsoever. As you alluded to, at build time, a tool called CreatePkgDef.exe runs (which is what loads your assembly and calls your RegistrationAttribute) to create the pkgdef file which is included in your VSIX.</p> <p>I think you’ll need to do one of the following:</p> <ol> <li>Abandon VSIX and use MSI for deployment (the recommended approach)</li> <li>Include the custom targets <em>in the project template</em>. This is bad because now the targets are scattered amongst projects instead of installed to a single location, but it may be an acceptable solution for you.</li> <li>Do some initialization (e.g. setting your environment variable) on ‘first launch’ of your package/extension within VS. This of course, means that users will have to know this is a necessary post-installation step.</li> </ol> <p>I realize that none of these solutions is ideal. Please know that better MSBuild support with VSIX is our top requested feature, so we’ve definitely received the feedback.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload