-
Notifications
You must be signed in to change notification settings - Fork 144
Expand file tree
/
Copy pathCommon.targets
More file actions
47 lines (42 loc) · 2.44 KB
/
Common.targets
File metadata and controls
47 lines (42 loc) · 2.44 KB
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
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!-- This file is included in all projects inside src and tests directories. -->
<Import Project="$(MSBuildThisFileDirectory)\CodeAnalysis.targets" />
<PropertyGroup>
<LangVersion>latest</LangVersion>
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<AutomaticallyUseReferenceAssemblyPackages>false</AutomaticallyUseReferenceAssemblyPackages>
<!-- Disable package pruning to ensure lock files are consistent across platforms (Linux/Windows).
Without this, .NET 10 SDK prunes platform-specific dependencies, causing NU1004 errors when
lock files generated on Linux are restored on Windows. See sonar-dotnet-enterprise#1677. -->
<RestoreEnablePackagePruning>false</RestoreEnablePackagePruning>
<!-- Disable automatic RuntimeIdentifier inference to ensure lock files are consistent across platforms.
Without this, the SDK infers platform-specific RIDs (e.g., win-x86) on Windows but not on Linux,
causing NU1004 errors when lock files generated on Linux are restored on Windows.
See: https://github.com/NuGet/Home/issues/12711 -->
<UseCurrentRuntimeIdentifier>false</UseCurrentRuntimeIdentifier>
<RuntimeIdentifier></RuntimeIdentifier>
<RuntimeIdentifiers></RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup Condition="'$(ProjectName)' != 'LogArgs'">
<Using Include="System" />
<Using Include="System.Collections.Generic" />
<Using Include="System.Diagnostics" />
<Using Include="System.IO" />
<Using Include="System.Linq" />
<Using Include="System.Reflection" />
<Using Include="System.Text" />
</ItemGroup>
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<Deterministic>true</Deterministic>
</PropertyGroup>
<!-- Explicit reference to ensure consistent lock files across platforms (Linux/Windows).
On Linux, this package is implicitly added for .NET Framework targets, but not on Windows.
See: https://github.com/NuGet/Home/issues/9195 and sonar-dotnet-enterprise#1676. -->
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
</ItemGroup>
</Project>