John Luo
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
2 deletions
-
src/Microsoft.Tye.Core/ApplicationFactory.cs
|
|
|
@ -516,16 +516,17 @@ namespace Microsoft.Tye |
|
|
|
|
|
|
|
output.WriteDebugLine("Restoring and evaluating projects"); |
|
|
|
|
|
|
|
var projectEvaluationTargets = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "ProjectEvaluation.targets"); |
|
|
|
var msbuildEvaluationResult = await ProcessUtil.RunAsync( |
|
|
|
"dotnet", |
|
|
|
$"build " + |
|
|
|
$"\"{projectPath}\" " + |
|
|
|
// CustomAfterMicrosoftCommonTargets is imported by non-crosstargeting (single TFM) projects
|
|
|
|
$"/p:CustomAfterMicrosoftCommonTargets={Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "ProjectEvaluation.targets")} " + |
|
|
|
@$"/p:CustomAfterMicrosoftCommonTargets=""{projectEvaluationTargets}"" " + |
|
|
|
// CustomAfterMicrosoftCommonCrossTargetingTargets is imported by crosstargeting (multi-TFM) projects
|
|
|
|
// This ensures projects properties are evaluated correctly. However, multi-TFM projects must specify
|
|
|
|
// a specific TFM to build/run/publish and will otherwise throw an exception.
|
|
|
|
$"/p:CustomAfterMicrosoftCommonCrossTargetingTargets={Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "ProjectEvaluation.targets")} " + |
|
|
|
@$"/p:CustomAfterMicrosoftCommonCrossTargetingTargets=""{projectEvaluationTargets}"" " + |
|
|
|
$"/nologo", |
|
|
|
throwOnError: false, |
|
|
|
workingDirectory: directory.DirectoryPath); |
|
|
|
|