From 28b700be89603860f2127dc21170e8f413385602 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 11 Jan 2023 09:18:53 -0800 Subject: Customize project references to not attempt assembly reference resolution Fixes 7132 --- src/wix/WixToolset.Sdk/tools/wix.props | 17 ------------- src/wix/WixToolset.Sdk/tools/wix.targets | 43 +++++++++++++++++++++----------- 2 files changed, 29 insertions(+), 31 deletions(-) diff --git a/src/wix/WixToolset.Sdk/tools/wix.props b/src/wix/WixToolset.Sdk/tools/wix.props index 0e0ed90e..b867ca8a 100644 --- a/src/wix/WixToolset.Sdk/tools/wix.props +++ b/src/wix/WixToolset.Sdk/tools/wix.props @@ -46,27 +46,10 @@ native,Version=v0.0 - - $(NoWarn);NU1702 - - - - $(AssetTargetFallback);net7.0-windows7.0;net7.0-windows;net7.0;net6.0-windows7.0;net6.0-windows;net6.0;net5.0-windows7.0;net5.0-windows;net5.0;netcoreapp3.1;netcoreapp3.0;netcoreapp2.0;net462;net47;net471;net472;net48;native - - false - - - false - - - Never - - - diff --git a/src/wix/WixToolset.Sdk/tools/wix.targets b/src/wix/WixToolset.Sdk/tools/wix.targets index a4603c47..7e87064d 100644 --- a/src/wix/WixToolset.Sdk/tools/wix.targets +++ b/src/wix/WixToolset.Sdk/tools/wix.targets @@ -109,6 +109,21 @@ false + + + + false + false + true + _WixResolvedProjectReference + + + + + Never + + + - + @@ -289,23 +304,23 @@ ================================================================================================ _ConvertResolvedProjectReferencesIntoWixConstructs - Converts _ResolvedProjectReferencePaths (which are the outputs of the ProjectReferences that + Converts _WixResolvedProjectReference (which are the outputs of the ProjectReferences that normally would be passed through ResolveAssemblyReferences then be passed to the C# compiler as references) into the appropriate WiX constructs. For example, references to .wixlibs are - converted into WixLibrary items. In the end, _ResolvedProjectReferencePaths is emptied to + converted into WixLibrary items. In the end, _WixResolvedProjectReference is emptied to prevent ResolveAssemblyReferences and other non-sensical targets (from a WiX point of view) from doing work. [IN] - @(_ResolvedProjectReferencePaths) - Resolved project references. + @(_WixResolvedProjectReference) - Resolved project references. $(VSProjectConfigurations) - map of project names to configurations, provided by VS when building in the IDE. [OUT] $(ProjectReferenceDefineConstants) - Define constants from project references. @(BindPath) - Bind paths from project references. @(WixLibrary) - Target paths from .vcxproj outputs added. - @(_WixReferencedProjectOutputs) - Copy of _ResolvedProjectReferencePaths for use in up-to-date checks. - @(_ResolvedProjectReferencePaths) - All resolved reference paths emptied. + @(_WixReferencedProjectOutputs) - Copy of _WixResolvedProjectReference for use in up-to-date checks. + @(_WixResolvedProjectReference) - All resolved reference paths emptied. ================================================================================================ --> @@ -314,21 +329,21 @@ + Condition=" '@(_WixResolvedProjectReference)' != '' "> - <_WixReferencedProjectOutputs Include="@(_ResolvedProjectReferencePaths)" /> + <_WixReferencedProjectOutputs Include="@(_WixResolvedProjectReference)" /> - - <_ResolvedProjectReferencePaths Remove="@(WixLibrary)" /> + + <_WixResolvedProjectReference Remove="@(WixLibrary)" /> @@ -339,7 +354,7 @@ behavior from kicking in --> - <_ResolvedProjectReferencePaths Remove="@(_ResolvedProjectReferencePaths)" /> + <_WixResolvedProjectReference Remove="@(_WixResolvedProjectReference)" /> @@ -358,7 +373,7 @@ [IN] @(WixLibrary) - the list of .wixlib files. - @(_ResolvedProjectReferencePaths) - resolved project references. + @(_WixResolvedProjectReference) - resolved project references. $(WixLibrarySearchPaths) - optional search paths used to find .wixlibs. [OUT] -- cgit v1.2.3-55-g6feb