Unit Testing ASP.net Web Site Project code stored in App_Code

后端 未结 8 1814
陌清茗
陌清茗 2020-12-01 01:43

I have an ASP.net Web Site Project (.net 3.5). Currently all of the non-code behind code files (including Linq2Sql stuff, data contexts, business logic, extension methods, e

8条回答
  •  广开言路
    2020-12-01 02:36

    Should anyone find themselves implementing Brian's solution, here's a Website.targets file you can include in unit testing solution. It (re)compiles website only when App_Code changes. Just add something like

      
        MyWebsite
        ..
      
      
      
      
    

    to your .csproj, customizing WebsiteName and WebsitePath and you should be ready to go. Website.targets:

    
    
    
      
        
      
      
        
      
      
        
        
    
    

提交回复
热议问题