Skip to content

Commit bfeb514

Browse files
committed
Make build deterministic and publish symbols
1 parent ae513c2 commit bfeb514

File tree

2 files changed

+16
-47
lines changed

2 files changed

+16
-47
lines changed

Directory.build.props

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,22 @@
2121
<NoWarn>$(NoWarn);1591;1701;1702;1705;VSX1000;NU1603</NoWarn>
2222
</PropertyGroup>
2323

24+
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
25+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
26+
<Deterministic>true</Deterministic>
27+
</PropertyGroup>
28+
2429
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
25-
<DesignTimeBuild>false</DesignTimeBuild>
2630
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2731
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
28-
<DebugType>portable</DebugType>
29-
<DebugSymbols>true</DebugSymbols>
30-
</PropertyGroup>
31-
32-
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
33-
<DebugType>full</DebugType>
34-
<DebugSymbols>true</DebugSymbols>
35-
</PropertyGroup>
3632

37-
<PropertyGroup Condition=" '$(Configuration)' == 'Release' And '$(OS)' == 'Windows_NT' ">
38-
<!--<IncludeSymbols>true</IncludeSymbols>
39-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>-->
40-
4133
<PublishRepositoryUrl>true</PublishRepositoryUrl>
42-
<EmbedUntrackedSources>true</EmbedUntrackedSources>
34+
<!-- <IncludeSymbols>true</IncludeSymbols> -->
35+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
4336
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
4437
</PropertyGroup>
4538

39+
<ItemGroup>
40+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
41+
</ItemGroup>
4642
</Project>

Directory.build.targets

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,12 @@
11
<Project>
2-
<PropertyGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
3-
<DefineConstants>$(DefineConstants);NETSTANDARD;PORTABLE</DefineConstants>
4-
</PropertyGroup>
5-
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
6-
<DefineConstants>$(DefineConstants);NET;WPF;XAML</DefineConstants>
7-
</PropertyGroup>
8-
<PropertyGroup Condition="$(TargetFramework.StartsWith('uap'))">
9-
<DefineConstants>$(DefineConstants);NETFX_CORE;XAML;WINDOWS;WINDOWS_UWP</DefineConstants>
10-
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
11-
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
12-
</PropertyGroup>
132
<PropertyGroup Condition="$(TargetFramework.StartsWith('xamarin.ios'))">
143
<DefineConstants>$(DefineConstants);MONO;UIKIT;COCOA;IOS</DefineConstants>
154
</PropertyGroup>
16-
<PropertyGroup Condition="$(TargetFramework.StartsWith('xamarin.mac'))">
17-
<DefineConstants>$(DefineConstants);MONO;COCOA;MAC</DefineConstants>
18-
</PropertyGroup>
19-
<PropertyGroup Condition="$(TargetFramework.StartsWith('xamarin.tvos'))">
20-
<DefineConstants>$(DefineConstants);MONO;COCOA;TVOS</DefineConstants>
21-
</PropertyGroup>
22-
<PropertyGroup Condition="$(TargetFramework.StartsWith('xamarin.watchos'))">
23-
<DefineConstants>$(DefineConstants);MONO;COCOA;WATCHOS</DefineConstants>
24-
</PropertyGroup>
25-
<PropertyGroup Condition="$(TargetFramework.StartsWith('monoandroid'))">
26-
<DefineConstants>$(DefineConstants);MONO;ANDROID</DefineConstants>
27-
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
28-
<AndroidResgenClass>Resource</AndroidResgenClass>
29-
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
30-
</PropertyGroup>
31-
<PropertyGroup Condition="$(TargetFramework.StartsWith('netcoreapp'))">
32-
<DefineConstants>$(DefineConstants);NETCOREAPP</DefineConstants>
33-
</PropertyGroup>
34-
<PropertyGroup Condition="$(TargetFramework.StartsWith('tizen'))">
35-
<DefineConstants>$(DefineConstants);TIZEN</DefineConstants>
36-
<TargetFrameworkIdentifier>Tizen</TargetFrameworkIdentifier>
37-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
5+
6+
<PropertyGroup>
7+
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
388
</PropertyGroup>
9+
<ItemGroup>
10+
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
11+
</ItemGroup>
3912
</Project>

0 commit comments

Comments
 (0)