Question

In our developer environment, no users have administration rights. As such, it's not possible to install MSBuild.CommunityTasks without getting admin to do so.

What I'm wondering is similar to NAnt, i.e. is it possible to include the files in your solution directory, and just reference it from there? This way, will not matter if the person has it installed, when they checkout latest code, the msbuild community files will come with, and solution will build.

\SolutionDir\{solution}.sln
\SolutionDir\Project\{files}
\SolutionDir\MSBuild.Community\files
Was it helpful?

Solution

Yes you can. Just extract the files and place them somewhere and then use MSBUILD IMPORT to pull them in the project file. You'll need to import the targets files.

OTHER TIPS

Preet's answer is spot on, but there are some complexities in using the import. In order to get the import to work properly, I needed to follow the answer outlined by Tom.

Specifically,

<PropertyGroup>
  <MSBuildCommunityTasksPath>location of community files</MSBuildCommunityTasksPath>
</PropertyGroup>

<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets"/>

This sets up the path for the targets file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top