Skip to content

Commit 0ce4d9e

Browse files
committed
build: drop old targets/props and add new ones
Drop the older custom targets and props files for the new ones.
1 parent bfc909d commit 0ce4d9e

9 files changed

+93
-43
lines changed

Directory.Build.props

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<Project>
2+
3+
<!-- Import version props -->
4+
<Import Project="Version.props" />
5+
6+
<!-- Common project properties -->
7+
<PropertyGroup>
8+
<RepoPath>$(MSBuildThisFileDirectory)</RepoPath>
9+
<RepoSrcPath>$(RepoPath)</RepoSrcPath>
10+
<RepoOutPath>$(RepoPath)..\out\</RepoOutPath>
11+
<ProjectOutPath>$(RepoOutPath)$(MSBuildProjectName)\</ProjectOutPath>
12+
<BuildPackagesPath>$(RepoPath)..\packages\</BuildPackagesPath>
13+
14+
<!--
15+
Ensure `msbuild /t:restore` restores both PackageReference and
16+
package.config styles of NuGet package references.
17+
Native/C++ projects do not support the new PackageReference style,
18+
but our .NET projects do.
19+
-->
20+
<RestorePackagesConfig>true</RestorePackagesConfig>
21+
</PropertyGroup>
22+
23+
<!-- Managed project properties -->
24+
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
25+
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
26+
<PlatformTarget>x64</PlatformTarget>
27+
<BaseOutputPath>$(ProjectOutPath)bin\</BaseOutputPath>
28+
<BaseIntermediateOutputPath>$(ProjectOutPath)obj\</BaseIntermediateOutputPath>
29+
</PropertyGroup>
30+
31+
<!-- Native project properties -->
32+
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.vcxproj'">
33+
<Platform>x64</Platform>
34+
<OutDir>$(ProjectOutPath)bin\$(Platform)\$(Configuration)\</OutDir>
35+
<IntDir>$(ProjectOutPath)intermediate\$(Platform)\$(Configuration)\</IntDir>
36+
<GeneratedIncludePath>$(IntDir)include\</GeneratedIncludePath>
37+
</PropertyGroup>
38+
39+
</Project>

Directory.Build.targets

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Project>
2+
3+
<!-- Define common properties that rely on SDK/props-defined properties -->
4+
<PropertyGroup>
5+
<Version>$(GVFSVersion)</Version>
6+
</PropertyGroup>
7+
8+
<!-- Include custom MSBuild targets/tasks -->
9+
<Import Project="$(MSBuildThisFileDirectory)GVFS\GVFS.MSBuild\GVFS.targets" />
10+
11+
</Project>

Directory.Solution.props

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project>
2+
3+
<!-- Import common build props for solution builds -->
4+
<Import Project="Directory.Build.props" />
5+
6+
</Project>

GVFS/Directory.Build.props

-9
This file was deleted.

GVFS/LibGit2Sharp.NativeBinaries.props

-17
This file was deleted.

GVFS/ProjectedFSLib.NativeBinaries.props

-9
This file was deleted.

Version.props

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<!-- Default GVFS version number if not specified at build time -->
5+
<GVFSVersion Condition="'$(GVFSVersion)' == ''" >0.2.173.2</GVFSVersion>
6+
7+
<!--
8+
Update the GitPackageVersion for the version that is shipped and tested with Scalar.
9+
The MinimumGitVersion is intentionally lower to allow side-by-side installs of
10+
VFS for Git (which is less flexible). Only update that version if we rely upon a
11+
new command-line interface in Git or if there is a truly broken interaction.
12+
13+
Note that we require that the revision (Z) of the Git version string (2.X.Y.vfs.Z.W)
14+
is an exact match. We will use this to signal that a microsoft/git version introduces
15+
a breaking change that requires a VFS for Git upgrade.
16+
17+
Using the revision part allows us to modify the other version items arbitrarily,
18+
including taking version numbers 2.X.Y from upstream and updating .W if we have any
19+
hotfixes to microsoft/git.
20+
-->
21+
<GitPackageVersion>2.20210322.1</GitPackageVersion>
22+
<MinimumGitVersion>v2.31.0.vfs.0.1</MinimumGitVersion>
23+
</PropertyGroup>
24+
25+
</Project>

global.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"msbuild-sdks": {
3+
"Microsoft.Build.Traversal": "2.0.19",
4+
"Microsoft.Build.NoTargets": "1.0.85"
5+
}
6+
}

nuget.config

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<config>
4-
<add key="repositoryPath" value="../packages/" />
4+
<add key="repositoryPath" value="..\packages" />
55
</config>
66
<packageSources>
77
<clear />
88
<add key="Dependencies" value="https://pkgs.dev.azure.com/gvfs/ci/_packaging/Dependencies/nuget/v3/index.json" />
99
</packageSources>
10-
<activePackageSource>
11-
<add key="All" value="(Aggregate source)" />
12-
</activePackageSource>
13-
<disabledPackageSources>
14-
<add key="Microsoft and .NET" value="true" />
15-
</disabledPackageSources>
10+
<packageRestore>
11+
<add key="enabled" value="true" />
12+
<add key="automatic" value="true" />
13+
</packageRestore>
1614
</configuration>

0 commit comments

Comments
 (0)