File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,11 +65,15 @@ public void OneTimeSetup()
6565 csprojContent . AppendLine ( "<?xml version=\" 1.0\" encoding=\" utf-8\" ?>" ) ;
6666 csprojContent . AppendLine ( "<Project ToolsVersion=\" 4.0\" DefaultTargets=\" Build\" " +
6767 "xmlns=\" http://schemas.microsoft.com/developer/msbuild/2003\" >" ) ;
68+ // DefineConstants must be in an unconditional PropertyGroup so DocFX reads them
69+ // regardless of whether MSBuild's Platform property is set.
70+ csprojContent . AppendLine ( " <PropertyGroup>" ) ;
71+ csprojContent . AppendLine ( $ " <DefineConstants>{ string . Join ( ";" , asm . defines ) } </DefineConstants>") ;
72+ csprojContent . AppendLine ( " </PropertyGroup>" ) ;
6873 csprojContent . AppendLine ( " <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \" >" ) ;
6974 csprojContent . AppendLine ( $ " <AssemblyName>{ asm . name } </AssemblyName>") ;
7075 csprojContent . AppendLine ( " <TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>" ) ;
7176 csprojContent . AppendLine ( " <OutputType>Library</OutputType>" ) ;
72- csprojContent . AppendLine ( $ " <DefineConstants>{ string . Join ( ";" , asm . defines ) } </DefineConstants>") ;
7377 csprojContent . AppendLine ( " <AllowUnsafeBlocks>True</AllowUnsafeBlocks>" ) ;
7478 csprojContent . AppendLine ( " <LangVersion>9.0</LangVersion>" ) ;
7579 csprojContent . AppendLine ( " <NoConfig>true</NoConfig>" ) ;
You can’t perform that action at this time.
0 commit comments