Skip to content
This repository has been archived by the owner on Dec 21, 2020. It is now read-only.

Commit

Permalink
Merge branch 'netcore3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsck committed Jun 22, 2019
2 parents 98b8beb + dbe52d1 commit 5ad3ad7
Show file tree
Hide file tree
Showing 2,583 changed files with 23,680 additions and 24,003 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public sealed class ConvertToNetstandardReferences : Task {
// Increment it if something changes so the files are re-created
const string VERSION = "cnsrefs_v1";

#pragma warning disable CS8618 // Non-nullable field is uninitialized.
[Required]
public string DestinationDirectory { get; set; }

Expand All @@ -39,6 +40,7 @@ public sealed class ConvertToNetstandardReferences : Task {

[Output]
public ITaskItem[] OutputReferencePath { get; private set; }
#pragma warning restore CS8618 // Non-nullable field is uninitialized.

bool ShouldPatchAssembly(string simpleName) {
if (simpleName.StartsWith("Microsoft.VisualStudio."))
Expand All @@ -48,7 +50,7 @@ bool ShouldPatchAssembly(string simpleName) {
}

static bool IsPublic(TypeDef type) {
while (type != null) {
while (!(type is null)) {
if (!type.IsPublic && !type.IsNestedPublic)
return false;
type = type.DeclaringType;
Expand All @@ -57,7 +59,7 @@ static bool IsPublic(TypeDef type) {
}

static bool IsPublic(ExportedType type) {
while (type != null) {
while (!(type is null)) {
if (!type.IsPublic && !type.IsNestedPublic)
return false;
type = type.DeclaringType;
Expand All @@ -72,8 +74,8 @@ public override bool Execute() {
}

using (var assemblyFactory = new AssemblyFactory(ReferencePath.Select(a => a.ItemSpec))) {
AssemblyRef netstandardAsmRef = null;
AssemblyDef netstandardAsm = null;
AssemblyRef? netstandardAsmRef = null;
AssemblyDef? netstandardAsm = null;
var typeComparer = new TypeEqualityComparer(SigComparerOptions.DontCompareTypeScope);
var netstandardTypes = new HashSet<IType>(typeComparer);
OutputReferencePath = new ITaskItem[ReferencePath.Length];
Expand Down Expand Up @@ -104,15 +106,15 @@ public override bool Execute() {

if (!File.Exists(patchedFilename)) {
var asm = assemblyFactory.Resolve(asmSimpleName);
if (asm == null)
if (asm is null)
throw new Exception($"Couldn't resolve assembly {filename}");
var mod = (ModuleDefMD)asm.ManifestModule;
if (!ShouldPatchAssembly(mod))
continue;

if (netstandardAsm == null) {
if (netstandardAsm is null) {
netstandardAsm = assemblyFactory.Resolve("netstandard");
if (netstandardAsm == null)
if (netstandardAsm is null)
throw new Exception("Couldn't find a netstandard file");
netstandardAsmRef = netstandardAsm.ToAssemblyRef();
foreach (var type in netstandardAsm.ManifestModule.GetTypes()) {
Expand All @@ -127,7 +129,7 @@ public override bool Execute() {

for (uint rid = 1; ; rid++) {
var tr = mod.ResolveTypeRef(rid);
if (tr == null)
if (tr is null)
break;
if (!netstandardTypes.Contains(tr))
continue;
Expand Down Expand Up @@ -177,10 +179,10 @@ public AssemblyFactory(IEnumerable<string> filenames) {
context = new ModuleContext(this, new Resolver(this));
}

AssemblyDef IAssemblyResolver.Resolve(IAssembly assembly, ModuleDef sourceModule) =>
AssemblyDef? IAssemblyResolver.Resolve(IAssembly assembly, ModuleDef sourceModule) =>
Resolve(assembly.Name);

public AssemblyDef Resolve(string name) {
public AssemblyDef? Resolve(string name) {
if (modules.TryGetValue(name, out var module))
return module.Assembly;
if (!nameToPath.TryGetValue(name, out var path))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\..\DnSpyCommon.props" />

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<!-- It should only use netstandard. netxxx/netcorappx.x are added here so dotnet build
with a '-f netxxx/netcorappx.x' arg can be used without failing the build -->
<TargetFrameworks>netstandard2.0;$(TargetFrameworks)</TargetFrameworks>
<Copyright>$(DnSpyAssemblyCopyright)</Copyright>
<Version>$(DnSpyAssemblyVersion)</Version>
<InformationalVersion>$(DnSpyAssemblyInformationalVersion)</InformationalVersion>

<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\dnSpy.snk</AssemblyOriginatorKeyFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NullableContextOptions>enable</NullableContextOptions>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\compiled\ConvertToNetstandardReferences.dll" TaskName="ConvertToNetstandardReferences.ConvertToNetstandardReferences" />
<Target Name="ConvertToNetstandardReferences" AfterTargets="ResolveAssemblyReferences">
<ConvertToNetstandardReferences ReferencePath="@(ReferencePath)" DestinationDirectory="$(MSBuildProjectDirectory)\obj\$(Configuration)\$(TargetFramework)\ConvertToNetstandardReferences">
<ConvertToNetstandardReferences ReferencePath="@(ReferencePath)" DestinationDirectory="$(IntermediateOutputPath)ConvertToNetstandardReferences">
<Output ItemName="_ConvertToNetstandardReferences_OutputReferencePath" TaskParameter="OutputReferencePath" />
</ConvertToNetstandardReferences>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Build/MakeEverythingPublic/IVTPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ bool FindIVT(RidList rids, out bool foundIVT, out uint ivtBlobDataOffset) {
return false;
}

static bool ParseIVTBlob(ref DataReader reader, uint end, out string publicKeyString) {
static bool ParseIVTBlob(ref DataReader reader, uint end, out string? publicKeyString) {
publicKeyString = null;
if ((ulong)reader.Position + 2 > end)
return false;
Expand Down
6 changes: 4 additions & 2 deletions Build/MakeEverythingPublic/MakeEverythingPublic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public sealed class MakeEverythingPublic : Task {
// Increment it if something changes so the files are re-created
const string VERSION = "v1";

#pragma warning disable CS8618 // Non-nullable field is uninitialized.
[Required]
public string IVTString { get; set; }

Expand All @@ -46,6 +47,7 @@ public sealed class MakeEverythingPublic : Task {

[Output]
public ITaskItem[] OutputReferencePath { get; private set; }
#pragma warning restore CS8618 // Non-nullable field is uninitialized.

public override bool Execute() {
if (string.IsNullOrWhiteSpace(IVTString)) {
Expand All @@ -71,7 +73,7 @@ public override bool Execute() {
}

OutputReferencePath = new ITaskItem[ReferencePath.Length];
byte[] ivtBlob = null;
byte[]? ivtBlob = null;
for (int i = 0; i < ReferencePath.Length; i++) {
var file = ReferencePath[i];
OutputReferencePath[i] = file;
Expand All @@ -98,7 +100,7 @@ public override bool Execute() {
continue;

if (!File.Exists(patchedFilename)) {
if (ivtBlob == null)
if (ivtBlob is null)
ivtBlob = CreateIVTBlob(IVTString);
var data = File.ReadAllBytes(filename);
try {
Expand Down
7 changes: 5 additions & 2 deletions Build/MakeEverythingPublic/MakeEverythingPublic.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\..\DnSpyCommon.props" />

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<!-- It should only use netstandard. netxxx/netcorappx.x are added here so dotnet build
with a '-f netxxx/netcorappx.x' arg can be used without failing the build -->
<TargetFrameworks>netstandard2.0;$(TargetFrameworks)</TargetFrameworks>
<Copyright>$(DnSpyAssemblyCopyright)</Copyright>
<Version>$(DnSpyAssemblyVersion)</Version>
<InformationalVersion>$(DnSpyAssemblyInformationalVersion)</InformationalVersion>

<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\dnSpy.snk</AssemblyOriginatorKeyFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NullableContextOptions>enable</NullableContextOptions>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Build/MakeEverythingPublic/MakeEverythingPublic.tasks
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\compiled\MakeEverythingPublic.dll" TaskName="MakeEverythingPublic.MakeEverythingPublic" />
<Target Name="MakeEverythingPublic" AfterTargets="ResolveAssemblyReferences">
<MakeEverythingPublic AssembliesToMakePublic="$(MakeEverythingPublicAssemblies)" ReferencePath="@(ReferencePath)" DestinationDirectory="$(MSBuildProjectDirectory)\obj\$(Configuration)\MakeEverythingPublic" IVTString="$(MakeEverythingPublicIVTString)">
<MakeEverythingPublic AssembliesToMakePublic="$(MakeEverythingPublicAssemblies)" ReferencePath="@(ReferencePath)" DestinationDirectory="$(IntermediateOutputPath)MakeEverythingPublic" IVTString="$(MakeEverythingPublicIVTString)">
<Output ItemName="_MakeEverythingPublic_OutputReferencePath" TaskParameter="OutputReferencePath" />
</MakeEverythingPublic>
<ItemGroup>
Expand All @@ -11,7 +11,7 @@
</Target>
<!-- https://github.com/dotnet/project-system/blob/master/docs/design-time-builds.md#targets-that-run-during-design-time-builds -->
<Target Name="MakeEverythingPublicDesignTime" AfterTargets="ResolveAssemblyReferencesDesignTime">
<MakeEverythingPublic AssembliesToMakePublic="$(MakeEverythingPublicAssemblies)" ReferencePath="@(ReferencePath)" DestinationDirectory="$(MSBuildProjectDirectory)\obj\$(Configuration)\MakeEverythingPublic" IVTString="$(MakeEverythingPublicIVTString)">
<MakeEverythingPublic AssembliesToMakePublic="$(MakeEverythingPublicAssemblies)" ReferencePath="@(ReferencePath)" DestinationDirectory="$(IntermediateOutputPath)MakeEverythingPublic" IVTString="$(MakeEverythingPublicIVTString)">
<Output ItemName="_MakeEverythingPublic_OutputReferencePathDesignTime" TaskParameter="OutputReferencePath" />
</MakeEverythingPublic>
<ItemGroup>
Expand Down
87 changes: 42 additions & 45 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,48 +1,45 @@
<Project>
<PropertyGroup>
<!-- Remove garbage files added by Microsoft.CodeAnalysis.Workspaces.Common 2.9.0+ when target is .NET Framework -->
<!-- Also remove other stuff we don't need -->
<GarbageFile>$(GarbageFile);$(OutputPath)\cs\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\de\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\es\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\fr\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\it\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\ja\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\ko\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\pl\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\pt-BR\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\ru\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\tr\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\zh-Hans\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\zh-Hant\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\Microsoft.CodeAnalysis.Workspaces.Desktop.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\Microsoft.CodeAnalysis.Workspaces.Desktop.pdb</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\SQLitePCLRaw.batteries_green.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\SQLitePCLRaw.batteries_v2.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\SQLitePCLRaw.core.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\SQLitePCLRaw.provider.e_sqlite3.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\e_sqlite3.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\System.Data.Common.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\System.Globalization.Extensions.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\System.Net.Http.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\System.Net.Sockets.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\System.Runtime.Serialization.Primitives.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\System.Security.SecureString.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\System.Threading.Overlapped.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\x64\e_sqlite3.dll</GarbageFile>
<GarbageFile>$(GarbageFile);$(OutputPath)\x86\e_sqlite3.dll</GarbageFile>
<GarbageDir>$(GarbageDir);$(OutputPath)\x86</GarbageDir>
<GarbageDir>$(GarbageDir);$(OutputPath)\x64</GarbageDir>
<GarbageDir>$(GarbageDir);$(OutputPath)\cs</GarbageDir>
<GarbageDir>$(GarbageDir);$(OutputPath)\ja</GarbageDir>
<GarbageDir>$(GarbageDir);$(OutputPath)\ko</GarbageDir>
<GarbageDir>$(GarbageDir);$(OutputPath)\pl</GarbageDir>
<GarbageDir>$(GarbageDir);$(OutputPath)\pt-BR</GarbageDir>
<GarbageDir>$(GarbageDir);$(OutputPath)\zh-Hans</GarbageDir>
<GarbageDir>$(GarbageDir);$(OutputPath)\zh-Hant</GarbageDir>
</PropertyGroup>
<Target Name="MyRemoveGarbageFiles" AfterTargets="AfterBuild">
<Delete Files="$(GarbageFile)" ContinueOnError="WarnAndContinue" />
<RemoveDir Directories="$(GarbageDir)" ContinueOnError="WarnAndContinue" />
<ItemGroup>
<!-- Remove unwanted files, eg. resources of unused files, unused native files -->
<GarbageFile Include="cs\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll" />
<GarbageFile Include="de\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll" />
<GarbageFile Include="es\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll" />
<GarbageFile Include="fr\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll" />
<GarbageFile Include="it\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll" />
<GarbageFile Include="ja\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll" />
<GarbageFile Include="ko\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll" />
<GarbageFile Include="pl\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll" />
<GarbageFile Include="pt-BR\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll" />
<GarbageFile Include="ru\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll" />
<GarbageFile Include="tr\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll" />
<GarbageFile Include="zh-Hans\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll" />
<GarbageFile Include="zh-Hant\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll" />
<GarbageFile Include="Microsoft.CodeAnalysis.Workspaces.Desktop.dll" />
<GarbageFile Include="Microsoft.CodeAnalysis.Workspaces.Desktop.pdb" />
<GarbageFile Include="SQLitePCLRaw.batteries_green.dll" />
<GarbageFile Include="SQLitePCLRaw.batteries_v2.dll" />
<GarbageFile Include="SQLitePCLRaw.core.dll" />
<GarbageFile Include="SQLitePCLRaw.provider.e_sqlite3.dll" />
<GarbageFile Include="e_sqlite3.dll" />
<GarbageFile Include="x64\e_sqlite3.dll" />
<GarbageFile Include="x86\e_sqlite3.dll" />
<GarbageDir Include="x86" />
<GarbageDir Include="x64" />
<GarbageDir Include="cs" />
<GarbageDir Include="ja" />
<GarbageDir Include="ko" />
<GarbageDir Include="pl" />
<GarbageDir Include="pt-BR" />
<GarbageDir Include="zh-Hans" />
<GarbageDir Include="zh-Hant" />
<GarbageDir Include="runtimes" Condition=" '$(IsDotNetFramework)' == 'true' " />
</ItemGroup>
<Target Name="MyRemoveGarbageFiles_AfterBuild" AfterTargets="AfterBuild">
<Delete Files="$(OutputPath)%(GarbageFile.Identity)" ContinueOnError="WarnAndContinue" />
<RemoveDir Directories="$(OutputPath)%(GarbageDir.Identity)" ContinueOnError="WarnAndContinue" />
</Target>
<Target Name="MyRemoveGarbageFiles_Publish" AfterTargets="Publish">
<Delete Files="$(PublishDir)%(GarbageFile.Identity)" ContinueOnError="WarnAndContinue" />
<RemoveDir Directories="$(PublishDir)%(GarbageDir.Identity)" ContinueOnError="WarnAndContinue" />
</Target>
</Project>
25 changes: 20 additions & 5 deletions DnSpyCommon.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,25 @@
<PropertyGroup>
<!--
- appveyor.yml (artifacts)
- build.cmd
- dnSpy/dnSpy/app.config (supportedRuntime, .NET Framework only)
NOTE: Update the ABOVE files when TargetFrameworks is updated -->
<TargetFrameworks>net472</TargetFrameworks>
<TargetFrameworks>net472;netcoreapp3.0</TargetFrameworks>
<IsDotNetFramework>false</IsDotNetFramework>
<IsDotNetCore>false</IsDotNetCore>
<IsSelfContainedDotNetCore>false</IsSelfContainedDotNetCore>
<IsDotNetFramework Condition=" !$(TargetFramework.StartsWith(netcoreapp)) ">true</IsDotNetFramework>
<IsDotNetCore Condition=" $(TargetFramework.StartsWith(netcoreapp)) ">true</IsDotNetCore>
<Features>strict</Features>
<LangVersion>latest</LangVersion>
<IsSelfContainedDotNetCore Condition=" '$(IsDotNetCore)' == 'true' ">true</IsSelfContainedDotNetCore>
<Features>strict;nullablePublicOnly</Features>
<LangVersion>8.0</LangVersion>
<LangVersion Condition=" $(MSBuildProjectFile.EndsWith('.vbproj')) " >latest</LangVersion>
<NeutralLanguage>en</NeutralLanguage>
<AppDesignerFolderContentsVisibleOnlyInShowAllFiles>false</AppDesignerFolderContentsVisibleOnlyInShowAllFiles>
<!-- Make sure we don't have to publish each extension to get all their refs -->
<CopyLocalLockFileAssemblies Condition=" '$(IsDotNetCore)' == 'true' ">true</CopyLocalLockFileAssemblies>
<!-- If this gets updated, also update appveyor.yml and build.cmd -->
<DnSpyRuntimeIdentifiers>win-x86;win-x64</DnSpyRuntimeIdentifiers>
<SatelliteResourceLanguages>de;es;es-ES;fa;fr;hu;it;pt-PT;ru;tr;uk;zh-CN</SatelliteResourceLanguages>

<!-- Update app.config whenever this value changes -->
Expand All @@ -23,20 +31,20 @@
<DnSpyAssemblyCopyright>Copyright (C) 2014-2019 de4dot@gmail.com</DnSpyAssemblyCopyright>

<!-- AD0001: buggy Roslyn analyzer(s) crash, disable that warning -->
<NoWarn>AD0001</NoWarn>
<NoWarn>NU1701;AD0001</NoWarn>

<!-- Update app.config whenever some of these versions change (eg. dnlib version) -->
<DiaSymReaderVersion>1.7.0</DiaSymReaderVersion>
<DnlibVersion>3.2.0</DnlibVersion>
<IcedVersion>1.3.0</IcedVersion>
<MSBuildNuGetVersion>16.0.461</MSBuildNuGetVersion>
<MSDiagRuntimeVersion>1.0.5</MSDiagRuntimeVersion>
<MSRegistryVersion>4.5.0</MSRegistryVersion>
<MSVSCompositionVersion>16.1.8</MSVSCompositionVersion>
<MSVSIntellisenseVersion>15.5.27130</MSVSIntellisenseVersion>
<MSVSTextVersion>15.5.27130</MSVSTextVersion>
<OokiiDialogsVersion>1.0.0</OokiiDialogsVersion>
<RoslynVersion>2.10.0</RoslynVersion>
<SCCompositionVersion>4.6.0-preview5.19224.8</SCCompositionVersion>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)Build\ConvertToNetstandardReferences\ConvertToNetstandardReferences.tasks" Condition=" '$(IsDotNetCore)' == 'true' " />
Expand All @@ -48,4 +56,11 @@
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
</PropertyGroup>

<!-- .NET Core 3.0 SDK doesn't currently support COMReference: https://github.com/0xd4d/dnSpy/issues/1053 -->
<PropertyGroup>
<HasCOMReference>false</HasCOMReference>
<HasCOMReference Condition=" '$(MSBuildRuntimeType)' != 'Core' ">true</HasCOMReference>
<DefineConstants Condition=" '$(HasCOMReference)' == 'true' ">$(DefineConstants);HAS_COMREFERENCE</DefineConstants>
</PropertyGroup>

</Project>
Loading

0 comments on commit 5ad3ad7

Please sign in to comment.