How do I import the msbuildcommunitytasks project from another msbuild project with a relative file path? -


Please be easy I'm new to msbuild and msbuildtasks!

How can I set up a property that represents a relative file path for a target file that I want to import? I need related references, so it will work on all Dev machines. But the goal of import is trying to use the relative file path internally, which will not work because it is re-evaluated against the imported target!

Effectively I am trying to work around imported projects:

All the relative paths of imported projects are interpreted relative to the directory of the imported project. Therefore, if a project file is imported into several project files at different locations, the relative path in the imported project file will be interpreted separately for each imported project.

There was a similar question: this question was how to do this with Both are similar in this aspect. For the extension pack, you have to declare the asset ExtensionTasksPath , and for community tasks, you must declare the same asset named MSBuildCommunityTasksLib . So in your case it should look like this:

  & lt; Project xmlns = "http://schemas.microsoft.com/developer/msbuild/2003" & gt; & Lt; PropertyGroup & gt; & Lt; MSBuildCommunityTasksLib condition = "'$ (MSBuildCommunityTasksLib)' == ''" & gt; E: \ data \ development \ My code \ community \ MSBuild \ CommunityTasks \ & lt; / MSBuildCommunityTasksLib & gt; & Lt; / PropertyGroup & gt; & Lt; Import Project = "$ (MSBuildCommunityTasksLib) MSBuild.Community.Tasks.Targets" /> & Lt; Target name = "demo" & gt; & Lt ;! - Use functions here - & gt; & Lt; / Target & gt; & Lt; / Project & gt;  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -