Skip to content

Commit

Permalink
Add 'Directory.Build.props' and lockfile
Browse files Browse the repository at this point in the history
  • Loading branch information
joelvaneenwyk committed Jun 3, 2024
1 parent 31ca911 commit 953ae21
Show file tree
Hide file tree
Showing 3 changed files with 957 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

/.prototools

*LINQPadDriver_*.csproj
*.csproj.nuget.dgspec.json
*.csproj.nuget.g.props
*.csproj.nuget.g.targets

# User-specific files
*.rsuser
*.suo
Expand Down
58 changes: 58 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Set Default Properties -->
<PropertyGroup>
<!--
See: https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2022
-->
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>

<!-- SolutionDir is not defined when building projects explicitly -->
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
</PropertyGroup>

<!-- Set Folder Variables -->
<PropertyGroup>
<WorkspaceFolder>$(MSBuildThisFileDirectory.TrimEnd('\/'))</WorkspaceFolder>
<OutNoSlash>$(WorkspaceFolder)/bin/$(Configuration)/$(Platform)$(TargetArchitecture)</OutNoSlash>
<IntNoSlash>$(WorkspaceFolder)/.build/$(MSBuildProjectName)/$(Configuration)/$(Platform)$(TargetArchitecture)</IntNoSlash>
</PropertyGroup>

<!-- Set Base Variables -->
<PropertyGroup>
<!-- SolutionDir is not defined when building projects explicitly -->
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(WorkspaceFolder)</SolutionDir>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath
Condition="'$(VSToolsPath)' == '' and Exists('$(MSBuildExtensionsPath32)/Microsoft/VisualStudio/v$(VisualStudioVersion)')"
>$(MSBuildExtensionsPath32)/Microsoft/VisualStudio/v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>

<!-- Normalize Output Paths -->
<PropertyGroup>
<OutputPath>$([System.IO.Path]::Combine($(OutNoSlash),$(DirectorySeparatorChar)))</OutputPath>
<IntermediateOutputPath>$([System.IO.Path]::Combine($(IntNoSlash),$(DirectorySeparatorChar)))</IntermediateOutputPath>
</PropertyGroup>

<!-- Set Base Paths -->
<PropertyGroup>
<!--
We intentionally do NOT set 'OutDir' and 'IntDir' since we would rather rely on
internal implementation to set these.
-->
<BaseOutputPath>$(OutputPath)</BaseOutputPath>
<BaseIntermediateOutputPath>$(IntermediateOutputPath)</BaseIntermediateOutputPath>

<DocumentationFile>$(IntNoSlash)/$(MSBuildProjectName).xml</DocumentationFile>

<TransformOnBuild>true</TransformOnBuild>
<OverwriteReadOnlyOutputFiles>true</OverwriteReadOnlyOutputFiles>
<TransformOutOfDateOnly>true</TransformOutOfDateOnly>

<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<Deterministic>true</Deterministic>
<UseCommonOutputDirectory>false</UseCommonOutputDirectory>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
</Project>
Loading

0 comments on commit 953ae21

Please sign in to comment.