-
Notifications
You must be signed in to change notification settings - Fork 4.1k
/
Copy pathMicrosoft.Build.Tasks.CodeAnalysis.csproj
116 lines (106 loc) · 5.48 KB
/
Microsoft.Build.Tasks.CodeAnalysis.csproj
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?xml version="1.0" encoding="utf-8"?>
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<OutputType>Library</OutputType>
<RootNamespace>Microsoft.CodeAnalysis.BuildTasks</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetFrameworks>$(NetRoslynSourceBuild);net472</TargetFrameworks>
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
<!--
Prevent the generation of binding redirects as they are not respected by
MSBuild. At the moment it's on by default due to arcade settings that we
need to override here
https://github.com/dotnet/arcade/issues/9305
-->
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
<AssemblyVersion/>
<!-- CA1819 (Properties should not return arrays) disabled as it is very common across this project. -->
<NoWarn>$(NoWarn);CA1819</NoWarn>
<!-- NuGet -->
<IsPackable>true</IsPackable>
<PackageId>Microsoft.CodeAnalysis.Build.Tasks</PackageId>
<PackageDescription>
The build task and targets used by MSBuild to run the C# and VB compilers.
Supports using VBCSCompiler on Windows.
</PackageDescription>
<GenerateMicrosoftCodeAnalysisCommitHashAttribute>true</GenerateMicrosoftCodeAnalysisCommitHashAttribute>
</PropertyGroup>
<ItemGroup>
<Content Include="*.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Pack>true</Pack>
<BuildAction>None</BuildAction>
<PackageCopyToOutput>true</PackageCopyToOutput>
<PackagePath>contentFiles\any\any</PackagePath>
</Content>
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\Shared\NamedPipeUtil.cs" />
<Compile Include="..\..\Shared\BuildServerConnection.cs" />
<Compile Include="..\..\Shared\RuntimeHostInfo.cs" />
<Compile Include="..\CommandLine\BuildProtocol.cs" />
<Compile Include="..\CommandLine\ConsoleUtil.cs" />
<Compile Include="..\CommandLine\NativeMethods.cs" />
<Compile Include="..\CommandLine\CompilerServerLogger.cs" />
<Compile Include="..\Portable\CommitHashAttribute.cs" />
<Compile Include="..\Portable\InternalUtilities\CommandLineUtilities.cs" />
<Compile Include="..\Portable\InternalUtilities\CompilerOptionParseUtilities.cs" />
<Compile Include="..\Portable\InternalUtilities\Debug.cs" Link="Debug.cs" />
<Compile Include="..\Portable\InternalUtilities\IReadOnlySet.cs" />
<Compile Include="..\Portable\InternalUtilities\NullableAttributes.cs" />
<Compile Include="..\Portable\InternalUtilities\PlatformInformation.cs" />
<Compile Include="..\Portable\InternalUtilities\ReflectionUtilities.cs" />
<Compile Include="..\Portable\InternalUtilities\RoslynString.cs" />
<Compile Include="..\Portable\InternalUtilities\UnicodeCharacterUtilities.cs" />
<Compile Include="..\Portable\InternalUtilities\InterpolatedStringHandlerAttribute.cs" />
<Compile Include="..\Portable\InternalUtilities\InterpolatedStringHandlerArgumentAttribute.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="ErrorString.resx" GenerateSource="true" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Tasks.Core" ExcludeAssets="Runtime" />
<PackageReference Include="System.Memory" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Build.Tasks.CodeAnalysis.UnitTests" />
</ItemGroup>
<!-- Generate a .targets file that sets $(CompilerApiVersion) to the current Roslyn version -->
<PropertyGroup>
<CompilerVersionTargetsFileIntermediatePath>$(IntermediateOutputPath)Microsoft.Managed.Core.CurrentVersions.targets</CompilerVersionTargetsFileIntermediatePath>
</PropertyGroup>
<Target Name="GenerateCompilerVersionTargets"
BeforeTargets="AssignTargetPaths"
DependsOnTargets="GenerateCompilerVersionTargetsFile">
<ItemGroup>
<Content Include="$(CompilerVersionTargetsFileIntermediatePath)">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Pack>true</Pack>
<BuildAction>None</BuildAction>
<PackageCopyToOutput>true</PackageCopyToOutput>
<PackagePath>contentFiles\any\any</PackagePath>
</Content>
</ItemGroup>
</Target>
<Target Name="GenerateCompilerVersionTargetsFile"
Outputs="$(CompilerVersionTargetsFileIntermediatePath)">
<PropertyGroup>
<_CompilerApiVersion>$([System.Version]::Parse($(VersionPrefix)).Major).$([System.Version]::Parse($(VersionPrefix)).Minor)</_CompilerApiVersion>
<_CompilerVersionTargetsFileContent>
<![CDATA[<Project>
<PropertyGroup>
<CompilerApiVersion>roslyn$(_CompilerApiVersion)</CompilerApiVersion>
</PropertyGroup>
</Project>]]>
</_CompilerVersionTargetsFileContent>
</PropertyGroup>
<WriteLinesToFile File="$(CompilerVersionTargetsFileIntermediatePath)"
Lines="$(_CompilerVersionTargetsFileContent)"
Overwrite="true"
WriteOnlyWhenDifferent="true" />
</Target>
</Project>