From 3863dbaf4f7512e8040141e46cc67780ebb1ca8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Matou=C5=A1ek?= Date: Tue, 9 Oct 2018 08:50:41 -0700 Subject: [PATCH] Move ILAsm publishing to ILAsmDeploy project (#30346) * Move ILAsm publishing to ILAsmDeploy project * BuildBoss: recognize ReferenceOutputAssembly attribute * Add GlobalPropertiesToRemove --- build/Targets/BeforeCommonTargets.targets | 2 +- .../Portable/Roslyn.Test.Utilities.csproj | 20 ++++---- src/Tools/BuildBoss/ProjectUtil.cs | 6 +-- src/Tools/ILAsm/DeployILAsm.targets | 48 ------------------- src/Tools/ILAsm/IlAsmDeploy.csproj | 45 ++++++++++++++++- 5 files changed, 60 insertions(+), 61 deletions(-) delete mode 100644 src/Tools/ILAsm/DeployILAsm.targets diff --git a/build/Targets/BeforeCommonTargets.targets b/build/Targets/BeforeCommonTargets.targets index 8d4d767ad65..ea264a8c645 100644 --- a/build/Targets/BeforeCommonTargets.targets +++ b/build/Targets/BeforeCommonTargets.targets @@ -65,7 +65,7 @@ identifier to the end of the output path https://github.com/dotnet/roslyn/issues/23547 --> - $(OutputPath)$(RuntimeIdentifier)\$(PublishDirName)\ + $(OutputPath)$(RuntimeIdentifier)\$(PublishDirName)\ $(OutputPath)$(TargetFramework)\$(PublishDirName)\ $(AssemblyName).xml diff --git a/src/Test/Utilities/Portable/Roslyn.Test.Utilities.csproj b/src/Test/Utilities/Portable/Roslyn.Test.Utilities.csproj index 378d4d5b822..ff0ea37b572 100644 --- a/src/Test/Utilities/Portable/Roslyn.Test.Utilities.csproj +++ b/src/Test/Utilities/Portable/Roslyn.Test.Utilities.csproj @@ -12,18 +12,24 @@ false false - - - $(ArtifactsDir)Tools\ILAsm\ + + + + @@ -111,6 +117,4 @@ - - \ No newline at end of file diff --git a/src/Tools/BuildBoss/ProjectUtil.cs b/src/Tools/BuildBoss/ProjectUtil.cs index db0bf162012..009fa0a2d35 100644 --- a/src/Tools/BuildBoss/ProjectUtil.cs +++ b/src/Tools/BuildBoss/ProjectUtil.cs @@ -184,10 +184,10 @@ internal List GetDeclaredProjectReferences() { // Make sure to check for references that exist only for ordering purposes. They don't count as // actual references. - var refOutputAssembly = r.Element(Namespace.GetName("ReferenceOutputAssembly")); - if (refOutputAssembly != null) + var referenceOutputAssemblyValue = r.Element(Namespace.GetName("ReferenceOutputAssembly"))?.Value ?? r.Attribute(XName.Get("ReferenceOutputAssembly"))?.Value; + if (referenceOutputAssemblyValue != null) { - if (bool.TryParse(refOutputAssembly.Value.Trim().ToLower(), out var isRealReference) && !isRealReference) + if (bool.TryParse(referenceOutputAssemblyValue.Trim().ToLower(), out var isRealReference) && !isRealReference) { continue; } diff --git a/src/Tools/ILAsm/DeployILAsm.targets b/src/Tools/ILAsm/DeployILAsm.targets deleted file mode 100644 index d53fcb7ac9f..00000000000 --- a/src/Tools/ILAsm/DeployILAsm.targets +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - <_IlasmRid>win-x64 - - - - - <_IlasmRid>osx-x64 - - - - - <_IlasmRid>linux-x64 - - - - - <_IlasmRid /> - - - - - - <_IlasmDeployProj>$(MSBuildThisFileDirectory)IlAsmDeploy.csproj - <_IlasmIncrementalBuildMarker>$(IlasmPublishDir).v$(MicrosoftNETCoreILAsmVersion) - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Tools/ILAsm/IlAsmDeploy.csproj b/src/Tools/ILAsm/IlAsmDeploy.csproj index 60ae51cbce0..eee21d9f804 100644 --- a/src/Tools/ILAsm/IlAsmDeploy.csproj +++ b/src/Tools/ILAsm/IlAsmDeploy.csproj @@ -3,15 +3,58 @@ netcoreapp2.1 - $(RoslynPortableRuntimeIdentifiers) Exe + false + true + + + true + + $(ArtifactsDir)Tools\ILAsm\ + + + + + win-x64 + + + + + osx-x64 + + + + + linux-x64 + + + + + + + <_IlasmIncrementalBuildMarker>$(PublishDir).v$(MicrosoftNETCoreILAsmVersion) + + + + + + + + + + + + \ No newline at end of file -- GitLab