未验证 提交 4eeff858 编写于 作者: S Sam Harwell 提交者: GitHub

Merge pull request #40885 from sharwell/msbuild-netcore

Avoid setting BuildingInsideVisualStudio on .NET Core builds
......@@ -28,7 +28,13 @@ internal class ProjectBuildManager
{ PropertyNames.DesignTimeBuild, bool.TrueString },
// this will force CoreCompile task to execute even if all inputs and outputs are up to date
#if NETCOREAPP
{ PropertyNames.NonExistentFile, "__NonExistentSubDir__\\__NonExistentFile__" },
#else
// Setting `BuildingInsideVisualStudio` indirectly sets NonExistentFile:
// https://github.com/microsoft/msbuild/blob/ab9b2f36a5ff7a85f842b205d5529e77fdc9d7ab/src/Tasks/Microsoft.Common.CurrentVersion.targets#L3462-L3470
{ PropertyNames.BuildingInsideVisualStudio, bool.TrueString },
#endif
{ PropertyNames.BuildProjectReferences, bool.FalseString },
{ PropertyNames.BuildingProject, bool.FalseString },
......
......@@ -33,6 +33,7 @@ internal static class PropertyNames
public const string LangVersion = nameof(LangVersion);
public const string ModuleAssemblyName = nameof(ModuleAssemblyName);
public const string NoCompilerStandardLib = nameof(NoCompilerStandardLib);
public const string NonExistentFile = nameof(NonExistentFile);
public const string NoWarn = nameof(NoWarn);
public const string _NoWarnings = nameof(_NoWarnings);
public const string Optimize = nameof(Optimize);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册