|
1 | 1 | <Project> |
2 | 2 |
|
| 3 | + <ImportProject="GitHash.props" /> |
| 4 | + |
3 | 5 | <TargetName="GenerateAssemblyFileVersion" |
4 | | -BeforeTargets="CoreCompile"> |
| 6 | +BeforeTargets="CoreCompile" |
| 7 | +Condition="'$(Configuration)' != 'Proto'"> |
5 | 8 |
|
6 | 9 | <PropertyGroup> |
7 | 10 | <GeneratedFSharpAssemblyVersionFile>$(IntermediateOutputPath)$(MSBuildProjectName).AssemblyVersion$(DefaultLanguageSourceExtension)</GeneratedFSharpAssemblyVersionFile> |
|
41 | 44 | </_AssemblyVersionAttributes> |
42 | 45 | </ItemGroup> |
43 | 46 |
|
| 47 | + <WriteCodeFragmentAssemblyAttributes="@(_AssemblyVersionAttributes)" |
| 48 | +Language="$(Language)" |
| 49 | +OutputFile="$(GeneratedFSharpAssemblyVersionFile)" |
| 50 | +Condition="'$(_UseWriteCodeFragmentHack)' != 'true'"> |
| 51 | +<!-- For FSharp.Core, assembly version must be inserted after all Core files, as it defines F# basic types (strings)--> |
| 52 | + <OutputTaskParameter="OutputFile"ItemName="Compile"Condition="'$(Language)' != 'F#' or '$(AssemblyName)' == 'FSharp.Core'" /> |
| 53 | +<!-- For other assemblies, this must be inserted before all source files, to keep exe's EntryPoints (if any) as the last source file--> |
| 54 | + <OutputTaskParameter="OutputFile"ItemName="CompileBefore"Condition="'$(Language)' == 'F#' and '$(AssemblyName)' != 'FSharp.Core'" /> |
| 55 | + <OutputTaskParameter="OutputFile"ItemName="FileWrites" /> |
| 56 | + </WriteCodeFragment> |
| 57 | + |
44 | 58 | <ItemGroupCondition="'$(_UseWriteCodeFragmentHack)' == 'true'"> |
45 | 59 | <_LinesToWriteInclude="//<auto-generated>" /> |
46 | 60 | <_LinesToWriteInclude="namespace FSharp" /> |
|
54 | 68 | <FileWritesInclude="$(GeneratedFSharpAssemblyVersionFile)" /> |
55 | 69 | </ItemGroup> |
56 | 70 |
|
57 | | - <WriteCodeFragmentAssemblyAttributes="@(_AssemblyVersionAttributes)" |
58 | | -Language="$(Language)" |
59 | | -OutputFile="$(GeneratedFSharpAssemblyVersionFile)" |
60 | | -Condition="'$(_UseWriteCodeFragmentHack)' != 'true'"> |
61 | | -<!-- For FSharp.Core, assembly version must be inserted after all Core files, as it defines F# basic types (strings)--> |
62 | | - <OutputTaskParameter="OutputFile"ItemName="Compile"Condition="'$(Language)' != 'F#' or '$(AssemblyName)' == 'FSharp.Core'" /> |
63 | | -<!-- For other assemblies, this must be inserted before all source files, to keep exe's EntryPoints (if any) as the last source file--> |
64 | | - <OutputTaskParameter="OutputFile"ItemName="CompileBefore"Condition="'$(Language)' == 'F#' and '$(AssemblyName)' != 'FSharp.Core'" /> |
65 | | - <OutputTaskParameter="OutputFile"ItemName="FileWrites" /> |
66 | | - </WriteCodeFragment> |
67 | | - |
68 | 71 | <WriteLinesToFileFile="$(GeneratedFSharpAssemblyVersionFile)" |
69 | 72 | Lines="@(_LinesToWrite)" |
70 | 73 | Overwrite="true" |
|