MSBuild get %(RecursiveDir) directive from custom task parameter -


I am developing custom MSBuild work by inheriting from the original task class. In my work process, DestinationFolder calls the declared property in Property Settings Microsoft.Build.Tasks.dll . My custom work has a property that has been declared DestinationFolder

  public iTunesCustom destination folder {get; Set; }  

When calling this work from a build / project file, I will use a parameter like

   

The problem I have is that when this task is executed, DestinationFolder property is returned to % (RecursiveDir) No knowledge of bit, instead of just setting it to C: \ Development \ Test \ Bin

It seems that there is no work for this problem. This is definitely the case? I was wondering if it is possible to declare the property as a simple string, then create a taskyme object on the fly and if the particular % (RecursiveDir) instructions in the DestinationFolder string then set the working item object accordingly Up

The linked question is related to the output parameter from a function, where it is related to an input. The problem here is that you have declared the destination folder as an iTsk item, but you are passing in the string.

You have not given an example enough for me to do what you are trying to do, but assume that you have a file named "C: \ Development \ Test \ Bin \ SomeFile.txt" "You can define an item in your project such as:

  Add item group> DestinationFolderArgument =" C: \ development \ test \ * * \ SomeFile.txt "/> & gt; ItemGroup & gt; & lt; MyTask DestinationFolder =" @ (Destination Folder Astrum) "/>  

Now your work Metad of all items TA will have access to, and "bin" in RecursiveDir.


Comments