How can I use BeforeBuild and AfterBuild targets with Visual Studio 2017?

前端 未结 3 1414
野趣味
野趣味 2020-12-30 23:59

After upgrading to a csproj to use Visual Studio 2017 and Microsoft.NET.Sdk, my \"BeforeBuild\" and \"AfterBuild\" targets are no longer running. My file looks like this:

3条回答
  •  旧巷少年郎
    2020-12-31 00:59

    The associated MSBuild git issue recommends not using BeforeBuild/AfterBuild as task names going forward, instead name the task appropriately and wiring up against targets

     
      
        net46
      
    
      
      
          
      
    
      
      
          
          
    
    

    This gets you an idiomatic VS 2017 project file, but which targets you trigger before/after is still a matter of some debate at this time

提交回复
热议问题