Avoid reading Configuration in Directory.Build.props (#1776)
This commit is contained in:
parent
f5d54b5c29
commit
aa07c6fcca
4 changed files with 11 additions and 12 deletions
|
|
@ -11,30 +11,19 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- This works around issues with dotnet test which are fixed in https://github.com/dotnet/sdk/pull/51794 -->
|
|
||||||
<!-- It can be safely removed once .NET SDK 10.0.101 is out and is used in the repo -->
|
|
||||||
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
|
|
||||||
|
|
||||||
<RepoRoot>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))</RepoRoot>
|
<RepoRoot>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))</RepoRoot>
|
||||||
<ArtifactsDir Condition="'$(ArtifactsDir)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts'))</ArtifactsDir>
|
<ArtifactsDir Condition="'$(ArtifactsDir)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts'))</ArtifactsDir>
|
||||||
<ArtifactsObjDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'obj'))</ArtifactsObjDir>
|
<ArtifactsObjDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'obj'))</ArtifactsObjDir>
|
||||||
<ArtifactsBinDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin'))</ArtifactsBinDir>
|
<ArtifactsBinDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin'))</ArtifactsBinDir>
|
||||||
<ArtifactsTestResultsDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'TestResults', '$(Configuration)'))</ArtifactsTestResultsDir>
|
|
||||||
<ArtifactsPackagesDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'packages', '$(Configuration)'))</ArtifactsPackagesDir>
|
|
||||||
<OutDirName>$(MSBuildProjectName)</OutDirName>
|
<OutDirName>$(MSBuildProjectName)</OutDirName>
|
||||||
|
|
||||||
<BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath('$(ArtifactsObjDir)$(OutDirName)\'))</BaseIntermediateOutputPath>
|
<BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath('$(ArtifactsObjDir)$(OutDirName)\'))</BaseIntermediateOutputPath>
|
||||||
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
|
|
||||||
|
|
||||||
<BaseOutputPath>$([System.IO.Path]::GetFullPath('$(ArtifactsBinDir)$(OutDirName)\'))</BaseOutputPath>
|
<BaseOutputPath>$([System.IO.Path]::GetFullPath('$(ArtifactsBinDir)$(OutDirName)\'))</BaseOutputPath>
|
||||||
<OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath>
|
|
||||||
|
|
||||||
<PackageOutputPath>$(ArtifactsPackagesDir)</PackageOutputPath>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VSTestLogger Condition="'$(VSTestLogger)' == ''">trx%3bLogFileName=$(MSBuildProjectName).$(TargetFramework).$(OS).trx</VSTestLogger>
|
<VSTestLogger Condition="'$(VSTestLogger)' == ''">trx%3bLogFileName=$(MSBuildProjectName).$(TargetFramework).$(OS).trx</VSTestLogger>
|
||||||
<VSTestResultsDirectory Condition="'$(VSTestResultsDirectory)' == ''">$(ArtifactsTestResultsDir)</VSTestResultsDirectory>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
|
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
|
||||||
|
|
|
||||||
8
Directory.Build.targets
Normal file
8
Directory.Build.targets
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ArtifactsTestResultsDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'TestResults', '$(Configuration)'))</ArtifactsTestResultsDir>
|
||||||
|
<ArtifactsPackagesDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'packages', '$(Configuration)'))</ArtifactsPackagesDir>
|
||||||
|
<PackageOutputPath>$(ArtifactsPackagesDir)</PackageOutputPath>
|
||||||
|
<VSTestResultsDirectory Condition="'$(VSTestResultsDirectory)' == ''">$(ArtifactsTestResultsDir)</VSTestResultsDirectory>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "10.0.100",
|
"version": "10.0.101",
|
||||||
"rollForward": "minor"
|
"rollForward": "minor"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
<Project>
|
<Project>
|
||||||
|
<Import Project="..\Directory.Build.targets" />
|
||||||
|
|
||||||
<Target Name="PinMcpProjectReferencePackageVersions"
|
<Target Name="PinMcpProjectReferencePackageVersions"
|
||||||
AfterTargets="_GetProjectReferenceVersions"
|
AfterTargets="_GetProjectReferenceVersions"
|
||||||
Condition="'$(MSBuildProjectName)' == 'ModelContextProtocol'
|
Condition="'$(MSBuildProjectName)' == 'ModelContextProtocol'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue