Pre-build MSBuild task to update AssemblyInfo not in sync with built exe

后端 未结 4 1459
孤独总比滥情好
孤独总比滥情好 2020-12-05 04:54

I am using a pre-build task in Visual Studio 2008 that invokes msbuild:

C:\\WINDOWS\\Microsoft.NET\\Framework\\v3.5\\MSBuild.exe $(MSBuildProjectDirectory)\\         


        
4条回答
  •  心在旅途
    2020-12-05 05:40

    +1 for the FALSE trick, although neither the accepted solution nor the linked article specified that the line should be added to the first element in the .csproj file.

    It is also a problem with Visual Studio only, as invoking msbuild from the command-line on the same .csproj file (without the trick) will see the generated code files compiled right away (and not the previous versions).

    Also, I would like to recommend that this topic be tagged with the following, as I had to dig a lot to find it:

    1. VisualStudio
    2. compiler
    3. BeforeBuild
    4. generated
    5. .NET
    6. c#

提交回复
热议问题