MSBuild UsingTask Resolve References

前端 未结 2 1741
悲&欢浪女
悲&欢浪女 2021-01-01 12:27

I feel like I\'ve fixed this before, but I can\'t remember how.

I have a tasks file that looks like this (CustomTasks.tasks):



        
2条回答
  •  灰色年华
    2021-01-01 12:40

    Got tired and frustrated and took a direct approach...I don't think this is the same way I solved the problem previously...but maybe this will help someone else. Other, more elegant solutions are more than welcome.

      
        
      
      
        
          
        
        
          
          
          
          
             
    { 
      var assemblySearchPath = Path.Combine(SearchPath, e.Name.Split(',')[0]);
      if (File.Exists(assemblySearchPath)) return Assembly.LoadFrom(assemblySearchPath);
    
      return null;
    };
    ]]>
          
        
      
    

提交回复
热议问题