|
1 | 1 | <!-- |
2 | 2 | This file allows overriding of properties for all projects in the directory. |
3 | | -See https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2022#directorybuildprops-and-directorybuildtargets |
| 3 | +See |
| 4 | +https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2022#directorybuildprops-and-directorybuildtargets |
4 | 5 | --> |
5 | 6 | <Project> |
6 | 7 |
|
7 | 8 | <PropertyGroup> |
8 | 9 | <_BuildProjBaseIntermediateOutputPath>$(MSBuildThisFileDirectory)build/obj/</_BuildProjBaseIntermediateOutputPath> |
9 | 10 | <_DotnetToolManifestFile>$(MSBuildThisFileDirectory).config/dotnet-tools.json</_DotnetToolManifestFile> |
10 | | - <_DotnetToolRestoreOutputFile>$(_BuildProjBaseIntermediateOutputPath)/dotnet-tool-restore-$(NETCoreSdkVersion)-$(OS)</_DotnetToolRestoreOutputFile> |
11 | | - <_DotnetFantomasOutputFile>$(BaseIntermediateOutputPath)dotnet-fantomas-msbuild-$(NETCoreSdkVersion)-$(OS)</_DotnetFantomasOutputFile> |
| 11 | + <_DotnetToolRestoreOutputFile> |
| 12 | + $(_BuildProjBaseIntermediateOutputPath)/dotnet-tool-restore-$(NETCoreSdkVersion)-$(OS)</_DotnetToolRestoreOutputFile> |
| 13 | + <_DotnetFantomasOutputFile> |
| 14 | + $(BaseIntermediateOutputPath)dotnet-fantomas-msbuild-$(NETCoreSdkVersion)-$(OS)</_DotnetFantomasOutputFile> |
12 | 15 | </PropertyGroup> |
13 | 16 |
|
14 | | - <!-- Make sure that dotnet tools (including paket) are restored before restoring any project --> |
15 | | - <Target Name="ToolRestore" BeforeTargets="Restore;CollectPackageReferences;PaketRestore" Inputs="$(_DotnetToolManifestFile)" Outputs="$(_DotnetToolRestoreOutputFile)"> |
16 | | - <Exec Command="dotnet tool restore" WorkingDirectory="$(MSBuildThisFileDirectory)" StandardOutputImportance="High" StandardErrorImportance="High" /> |
17 | | - <MakeDir Directories="$(_BuildProjBaseIntermediateOutputPath)"/> |
| 17 | + <!-- Make sure that dotnet tools are restored before restoring any project --> |
| 18 | + <Target Name="ToolRestore" BeforeTargets="Restore;CollectPackageReferences" |
| 19 | + Inputs="$(_DotnetToolManifestFile)" Outputs="$(_DotnetToolRestoreOutputFile)"> |
| 20 | + <Exec Command="dotnet tool restore" WorkingDirectory="$(MSBuildThisFileDirectory)" |
| 21 | + StandardOutputImportance="High" StandardErrorImportance="High" /> |
| 22 | + <MakeDir Directories="$(_BuildProjBaseIntermediateOutputPath)" /> |
18 | 23 | <Touch Files="$(_DotnetToolRestoreOutputFile)" AlwaysCreate="True" ForceTouch="True" /> |
19 | 24 | </Target> |
20 | 25 |
|
21 | 26 | <!-- Make sure that files are formatted before building --> |
22 | | - <Target Name="Format" Condition=" '$(MSBuildProjectExtension)' == '.fsproj' AND '$(DesignTimeBuild)' != 'true' " BeforeTargets="BeforeBuild" Inputs="@(Compile)" Outputs="$(_DotnetFantomasOutputFile)" > |
23 | | - <Exec Command="dotnet fantomas $(MSBuildProjectDirectory)" StandardOutputImportance="High" StandardErrorImportance="High" WorkingDirectory="$(MSBuildThisFileDirectory)" ContinueOnError="WarnAndContinue" /> |
| 27 | + <Target Name="Format" |
| 28 | + Condition=" '$(MSBuildProjectExtension)' == '.fsproj' AND '$(DesignTimeBuild)' != 'true' " |
| 29 | + BeforeTargets="BeforeBuild" Inputs="@(Compile)" Outputs="$(_DotnetFantomasOutputFile)"> |
| 30 | + <Exec Command="dotnet fantomas $(MSBuildProjectDirectory)" StandardOutputImportance="High" |
| 31 | + StandardErrorImportance="High" WorkingDirectory="$(MSBuildThisFileDirectory)" |
| 32 | + ContinueOnError="WarnAndContinue" /> |
24 | 33 | <Touch Files="$(_DotnetFantomasOutputFile)" AlwaysCreate="True" ForceTouch="True" /> |
25 | 34 | </Target> |
26 | 35 |
|
|
0 commit comments