Reconstruction of C # project due to Resx file

I am using VS 2013 and MSBuild. I have a project that is always recovering due to the resx file. I can say this because of the following line in my log:

Input file "obj\Release\Assembly.Properties.Resources.resources" is newer than output file "obj\Release\Assembly.pdb".

This is created earlier in the assembly during the GenerateResource target.

Processing resource file "Properties\Resources.resx" into "obj\Release\Assembly.Properties.Resources.resources".

How to stop the resx file from constant processing in the resource file? This is a very central library in our source code, and this recompilation makes our builds much longer.

Here is the xml project for the relevant parts.

<EmbeddedResource Include="Properties\Resources.resx">
  <SubType>Designer</SubType>
  <Generator>ResXFileCodeGenerator</Generator>
  <LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>

<Compile Include="Properties\Resources.Designer.cs">
  <AutoGen>True</AutoGen>
  <DesignTime>True</DesignTime>
  <DependentUpon>Resources.resx</DependentUpon>
</Compile>
+4
source share
1 answer

Have you tried to “touch” the timestamp of the pdb file? This should eliminate the need to rebuild. In the Post-build event, you can use the following command:

copy /b "$(ProjectDir)obj\$(Configuration)\$(TargetName).pdb" +,,
0
source

Source: https://habr.com/ru/post/1547655/


All Articles