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

MonoDevelop.BeforeCommon.targets « msbuild « main - github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7c6ff92b6e603795da0a8258e817a91639a3d353 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
	<PropertyGroup>
		<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
	</PropertyGroup>

	<!-- F# targets import these specifically, prevent them being reimported-->
	<PropertyGroup>
		<CustomBeforeMicrosoftCommonTargets></CustomBeforeMicrosoftCommonTargets>
	</PropertyGroup>

	<!-- force a bunch of default values for consistency -->
	<PropertyGroup>
		<MDConfigIsRelease>$(Configuration.Contains('Release'))</MDConfigIsRelease>
		<MDConfigIsDebug>$(Configuration.Contains('Debug'))</MDConfigIsDebug>
		<Optimize>$(MDConfigIsRelease)</Optimize>
		<Tailcalls>$(Optimize)</Tailcalls>
		<DebugSymbols>true</DebugSymbols>
		<DebugType>portable</DebugType>
		<WarningLevel>4</WarningLevel>
		<Deterministic>True</Deterministic>
		<IsMac>$([MSBuild]::IsOsPlatform('OSX'))</IsMac>
		<IsWindows>$([MSBuild]::IsOsPlatform('Windows'))</IsWindows>
		<IsLinux>$([MSBuild]::IsOsPlatform('Linux'))</IsLinux>
	</PropertyGroup>

	<!-- AddinBuildDir is shorthand for which subdir of build\Addins to build into -->
	<PropertyGroup Condition="'$(AddinBuildDir)'!=''">
		<OutDir>$(MonoDevelopRootDir)build\AddIns\$([MSBuild]::EnsureTrailingSlash('$(AddinBuildDir)'))</OutDir>
	</PropertyGroup>

	<!-- produce docs unless explicitly disabled -->
	<PropertyGroup Condition="'$(SuppressDocs)'!='True'">
		<DocsDir>$([MSBuild]::ValueOrDefault('$(OutDir)', '$(OutputPath)'))</DocsDir>
		<DocumentationFile Condition="'$(DocsDir)' !=''">$([MSBuild]::EnsureTrailingSlash('$(DocsDir)'))$(AssemblyName).xml</DocumentationFile>
		<!-- don't warn about missing doc comments -->
		<NoWarn>$(NoWarn);1591;1573</NoWarn>
	</PropertyGroup>

	<!-- https://aka.ms/roslyn-packages has a list that maps Roslyn version to latest language version -->
	<!-- Set the roslyn language version to the latest stable version our provisioned csc supports -->
	<PropertyGroup Condition="'$(MSBuildProjectExtension)'=='.csproj'">
		<LangVersion>8.0</LangVersion>
	</PropertyGroup>

	<PropertyGroup Condition="'$(MSBuildProjectExtension)'=='.vbproj'">
		<LangVersion>15.5</LangVersion>
	</PropertyGroup>

	<PropertyGroup Condition="'$(MDConfigIsDebug)'=='true'">
		<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
	</PropertyGroup>

	<PropertyGroup Condition="$(Platform.Equals('x86'))">
		<PlatformTarget>x86</PlatformTarget>
	</PropertyGroup>

	<PropertyGroup Condition="$(Platform.Equals('x64'))">
		<PlatformTarget>x64</PlatformTarget>
	</PropertyGroup>

	<PropertyGroup>
		<DefineConstants Condition="$(IsMac)">$(DefineConstants);MAC</DefineConstants>
		<DefineConstants Condition="$(IsWindows)">$(DefineConstants);WIN32;WINDOWS</DefineConstants>
		<DefineConstants Condition="$(IsLinux)">$(DefineConstants);GNOME;LINUX</DefineConstants>
	</PropertyGroup>

	<Target Name="RemoveNoisyAnalyzers" BeforeTargets="CoreCompile">
		<ItemGroup>
			<!--
			This analyzer gets pulled in by Microsoft.VisualStudio.Threading, propagates
			through most of the solution, and produces an overwhelming amount of noise.
			Disable it for now until someone can go audit all its warnings.
			-->
			<Analyzer Remove="@(Analyzer->WithMetadataValue('Filename', 'Microsoft.VisualStudio.Threading.Analyzers.CodeFixes'))" />
			<Analyzer Remove="@(Analyzer->WithMetadataValue('Filename', 'Microsoft.VisualStudio.Threading.Analyzers'))" />
			<Analyzer Remove="@(Analyzer->WithMetadataValue('Filename', 'Microsoft.VisualStudio.Threading.Analyzers.resources'))" />
			<!-- thes analyzers are pulled in by Roslyn but aren't particularly relevant and have some internal errors -->
			<Analyzer Remove="@(Analyzer->WithMetadataValue('Filename', 'Microsoft.CodeAnalysis.CSharp.Analyzers'))" />
			<Analyzer Remove="@(Analyzer->WithMetadataValue('Filename', 'Microsoft.CodeAnalysis.Analyzers'))" />
		</ItemGroup>
	</Target>

	<ItemGroup Condition="$(MSBuildProjectName) != 'MonoDevelop.Core'">
		<Reference Include="$(NuGetPackageRoot)microsoft.visualstudio.composition/$(NuGetVersionVSComposition)/lib/net45/Microsoft.VisualStudio.Composition.dll">
			<Private>false</Private>
			<NuGetPackageId>Microsoft.VisualStudio.Composition</NuGetPackageId>
		</Reference>
	</ItemGroup>

	<!--
	Hide these refs behind an import so NuGet doesn't see them and generate spurious NU1108 "cycle detected" errors even when the condition is false.
	This means that they have to be imported AFTER the project instead of before it, so the project can set AddMonoDevelopCoreReferences.
	-->
	<Import Project="$(MSBuildThisFileDirectory)CoreReferences.props" Condition="'$(AddMonoDevelopCoreReferences)' == 'true'" />


</Project>