How to deploy custom MSBuild task using MEF?

I have several custom element and project templates for Visual Studio 2010. I created a VSIX package that you can use to deploy these extensions to multiple development machines.

Now I am creating a custom MSBuild task that will be required for the new item template.

In my local project, I can get this to work by entering a hard-coded path in the project file:

But this does not work when the VSIX package is deployed to an instance of Visual Studio. Visual Studio simply reports that the CustomBuildTask.dll file was not found.

Where does VSIX deploy the DLL? Is there an MSBuild% (path) variable that I can use to find the DLL on other machines, or should each user manually copy the DLL and / or put the global ".tasks" file in their Visual Studio installation?

NOTE. There is no VSIX content type for MSBuild tasks, just like for item and project templates. I tried "VS Package", "MEF Component" and "Custom Extension Type" - and no one works.

+4
source share
1 answer

I don’t think you can do this, since VSIX packages cannot install files in arbitrary places, and the msbuild task should be in the msbuild folder.

+1
source

All Articles