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

后端 未结 6 2197
再見小時候
再見小時候 2020-12-16 02:46

Please go easy I am new to msbuild and msbuildtasks!

How can I set a property which represents a relative file path to a targets file which I want to import? I need

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 03:10

    @Sayed Ibrahim Hashimi

    Talkin about MSBuild4 Just declaring the MSBuildCommunityTasksLib wont suffice cause if u check the MSBuild.Community.Tasks.Targets file the properties are declared as follows

    
        $(MSBuildExtensionsPath)\MSBuildCommunityTasks
        $(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.dll
      
    

    So if U only over ride the MSBuildCommunityTasksLib it will again get over ridden in the MSBuild.Community.Tasks.Targets file as it is not conditional So u HAVE TO ALSO OVERRIDE MSBuildCommunityTasksPath so that its proerty is NOT SET FROM MSBuildExtensionsPath but from ur custom path. Correst me if I m wrong

提交回复
热议问题