Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatelyn Gadd <kg@luminance.org>2018-03-24 01:35:21 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2018-03-24 01:35:21 +0300
commit954911d3f1a550b2ceba4af95a7030da1fbdc498 (patch)
treecb2a683a96417ed6811f6a69aee3c51e40e02dce /msvc/scripts/csproj.tmpl
parent431c67415cfed1a33d088dfb50a7cea58a10c388 (diff)
Genproj updates for BCL build in Windows Visual Studio (#7755)
This batch of commits makes further updates to our support for building the BCL using msbuild (Visual Studio, to be specific). * Generates a single sln and set of csproj files with support for all of our build profiles (orbis, monodroid, net_4_x, etc) * Project configuration selector (in VS or as parameter to msbuild) can be used to select which profile to build * Includes partial dependency information so that culevel and jay are compiled before the rest of the sln (this keeps pre/post events from from failing on first build) As of this rev things are working pretty good, but a lot of the measures I took here are temporary so I'd appreciate thoughts on how to go about them. The hard-coded System.Web -> Culevel dependency feels gross, for example - I kind of want to go through and build an automatic solution for it but I'm not sure it's necessary. Implements #6858 --- * Checkpoint: Generate single .csproj file with conditional item/property groups * Checkpoint: Updates to csproj and sln generation to support building specific profiles * Move targets file in csproj template so that it isn't evaluated before all properties are set * Checkpoint profile fallback (use net_4_x if project does not have appropriate profile) * Use in-process cache for project guids to fix bug where many guids were being generated. Fix profile fallback. * Clean up unnecessary debug writelines * genproj error fixes * Remove duplicate gacutil entry from makefile to fix order.xml corruption. Cleaner project names in msbuild sln. Compile genproj before generating inputs. * Delete genproj.exe at beginning of update-solution-files because otherwise syntax errors will cause an old version to be used silently Cleaner messages from genproj * Hard-code the guid for culevel and add it as a dependency for system.web * Bug fixes * sln files are sensitive to whitespace format * Don't generate pointless solution configurations if we have no information for them * Updates based on PR feedback
Diffstat (limited to 'msvc/scripts/csproj.tmpl')
-rw-r--r--msvc/scripts/csproj.tmpl61
1 files changed, 27 insertions, 34 deletions
diff --git a/msvc/scripts/csproj.tmpl b/msvc/scripts/csproj.tmpl
index c18b51d334e..32f186fd228 100644
--- a/msvc/scripts/csproj.tmpl
+++ b/msvc/scripts/csproj.tmpl
@@ -3,7 +3,6 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>@PROJECTGUID@</ProjectGuid>
@@ -13,62 +12,56 @@
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Windows_NT'">win32</HostPlatform>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix' and $([System.IO.File]::Exists('/usr/lib/libc.dylib'))">darwin</HostPlatform>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix'">linux</HostPlatform>
- <OutputPath>@OUTPUTDIR@</OutputPath>
- <IntermediateOutputPath>obj-@OUTPUTSUFFIX@</IntermediateOutputPath>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
@NOSTDLIB@
@METADATAVERSION@
@STARTUPOBJECT@
@NOCONFIG@
@ALLOWUNSAFE@
<AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>
- </RootNamespace>
+ <RootNamespace></RootNamespace>
<AssemblyName>@ASSEMBLYNAME@</AssemblyName>
- <TargetFrameworkVersion>v@FX_VERSION</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v@FX_VERSION@</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
@SIGNATURE@
</PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+
+ <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
+ Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
+ is a problem to compile the Mono mscorlib.dll -->
+ <PropertyGroup>
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
+ </PropertyGroup>
+
+<!-- @ALL_PROFILE_PROPERTIES@ -->
+
+ <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
- <NoWarn>@DISABLEDWARNINGS@</NoWarn>
<Optimize>false</Optimize>
- <DefineConstants>TRACE;@DEFINECONSTANTS@</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
+ <!-- TRACE is set only for Debug configuration, so inherit from platform-specific value -->
+ <DefineConstants>TRACE;$(DefineConstants)</DefineConstants>
</PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugType>pdbonly</DebugType>
- <NoWarn>@DISABLEDWARNINGS@</NoWarn>
<Optimize>true</Optimize>
- <DefineConstants>@DEFINECONSTANTS@</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
- Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
- is a problem to compile the Mono mscorlib.dll -->
- <PropertyGroup>
- <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <ItemGroup>
-@SOURCES@ </ItemGroup>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
+
+<!-- @ALL_SOURCES@ -->
+<!-- @ALL_REFERENCES@ -->
+
<PropertyGroup>
@PREBUILD@
@POSTBUILD@
</PropertyGroup>
- <ItemGroup>
-@REFERENCES@ </ItemGroup>
+
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
-@RESOURCES@</Project>
+
+<!-- @ALL_RESOURCES@ -->
+</Project>