Target not being executed when imported to the main *.proj file
        Posted  
        
            by Zbigniew Kawalec
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Zbigniew Kawalec
        
        
        
        Published on 2010-05-30T17:09:00Z
        Indexed on 
            2010/05/30
            17:12 UTC
        
        
        Read the original article
        Hit count: 328
        
I use the TFS 2008 build facilities. I have a large MSBuild project (TFSBuild.proj) and I wanted to split it into a few files because it is becoming hard to maintain.
I found a strange behavior; when I extracted one of the targets (BeforeInitializeWorkspace) to a separate file and then imported it into the main *.proj file, it was not executed. Although, in my MSBuild log, there was information that the target has been imported and overridden, but hasn't been executed. If I have the same target defined in my main *.proj file, it is executed. Can someone explain why the target isn't executed when imported from a file?
Thanks,
© Stack Overflow or respective owner