File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed 
src/Tasks/Microsoft.NET.Build.Tasks/build Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -32,15 +32,19 @@ Copyright (c) .NET Foundation. All rights reserved.
3232
3333  <Target  Name =" _GenerateResxCodeBehindFiles" 
3434          DependsOnTargets =" _ComputeResxCodeBehindFilePaths" 
35-           Condition =" '@(_ResxFileToGenerateCodeBehind)' != ''" 
36-           BeforeTargets =" Compile" 
35+           Condition =" '@(_ResxFileToGenerateCodeBehind)' != '' and '$(DesignTimeBuild)' == ''" 
36+           Inputs =" @(_ResxFileToGenerateCodeBehind)" 
37+           Outputs =" @(_ResxFileToGenerateCodeBehind -> '%(CodeBehindFile)')" 
3738    <GenerateResxCodeBehindFile  ResxFiles =" @(_ResxFileToGenerateCodeBehind)" 
38-                                 Language =" $(Language)" 
39-                                 Condition =" '$(DesignTimeBuild)' == ''" 
39+                                 Language =" $(Language)" 
4040      <Output  TaskParameter =" Compile" ItemName =" Compile" 
4141      <Output  TaskParameter =" Compile" ItemName =" FileWrites" 
4242    </GenerateResxCodeBehindFile >
43-   
43+     </Target >
44+ 
45+   <Target  Name =" GenerateResxCodeBehindFiles" 
46+           DependsOnTargets =" _ComputeResxCodeBehindFilePaths;_GenerateResxCodeBehindFiles" 
47+           BeforeTargets =" Compile" 
4448    <!--  If $(DesignTimeBuild) is true, then we will need to specify the files to VS separately from their being generated. --> 
4549    <!--  I did it this way so that code-behind files will only be generated during a user-initiated build. --> 
4650    <ItemGroup  Condition =" '$(DesignTimeBuild)' != ''" 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments