Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSB4057 The target "CollectSuggestedVisualStudioComponentIds" does not exist in the project. #73

Open
YuliiaKovalova opened this issue Dec 18, 2024 · 17 comments
Labels
bug Something isn't working external The root cause of this issue is in another system

Comments

@YuliiaKovalova
Copy link

HeatWave Version

1.0.4.5

Visual Studio Version

17.13.0 Preview 2.0

Repro Steps

Repo: https://github.com/team-charls/netpbm-wic-codec

Actual Result

Exception during design-time build: MSB4057 The target "CollectSuggestedVisualStudioComponentIds" does not exist in the project.

Expected Result

Quick fix:
FireGiant.HeatWave.DesignTime.targets
contains empty target :
<Target Name="CollectSuggestedVisualStudioComponentIds" />

OR

Reliable fix:
FireGiant.HeatWave.DesignTime.targets imports DTB targets form project system:
https://github.com/dotnet/project-system/blob/5f3636c2064201fac04017900e0160193ee8627b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/DesignTimeTargets/Microsoft.Managed.DesignTime.targets#L437

@YuliiaKovalova YuliiaKovalova added the triage To be reviewed by FireGiant label Dec 18, 2024
@YuliiaKovalova YuliiaKovalova changed the title error WIX0200: unhandled extension element 'WixStandardBootstrapperApplication' when building with VS2022 17.13.0 Preview 2.0 MSB4057 The target "CollectSuggestedVisualStudioComponentIds" does not exist in the project. Dec 18, 2024
@vbaderks
Copy link

Note: on a clean machine (with no NuGet packaged installed) the Repro Steps requires an explicit msbuild -restore before executing msbuild -t:build -p:Configuration=Release -p:Platform=x64

@FireGiantHelp FireGiantHelp added bug Something isn't working external The root cause of this issue is in another system and removed triage To be reviewed by FireGiant labels Dec 30, 2024
@FireGiantHelp
Copy link
Collaborator

The Visual Studio team confirmed this issue is a breaking change in VS2022 17.13. We'll address the breaking change when one of our customers requires it.

Until then, you can work around the breaking change by adding the following line to the bottom of your .wixproj.

<Target Name="CollectSuggestedVisualStudioComponentIds" />

@jespersh
Copy link

jespersh commented Jan 8, 2025

Just to clarify @FireGiantHelp are we waiting for a new VS preview release?
I saw a report on this closed as External Other Product: https://developercommunity.visualstudio.com/t/VS-1713-Preview-2-breaks-WiX-v5-project/10809797

@FireGiantHelp
Copy link
Collaborator

@jespersh Visual Studio made it clear that this is an expected breaking change. We will need to update HeatWave to adapt to the breaking change.

None of our current customers are on Visual Studio preview builds, so supporting preview builds is not a priority for us. We will release an updated HeatWave to meet our customers' needs.

@CyberSinh
Copy link

Same issue on VS 2022 v17.13 RTM, released today.

@FireGiantHelp
Copy link
Collaborator

@CyberSinh You will need a version greater than HeatWave v1.0.4. Reach out to your FireGiant support contact to get early access.

@CyberSinh
Copy link

I'm not eligible for paid support. When will the HeatWave extension update be released to the general public?

@FireGiantHelp
Copy link
Collaborator

I'm not eligible for paid support.

Everyone is eligible for paid support. Sign up for WiX Developer Direct, and you'll get priority support like all our customers.

When will the HeatWave extension update be released to the general public?

We do not have a date at this moment. We are actively working with our customers to ensure the next version of HeatWave meets their needs.

@aDisplayName
Copy link

Let us know who your customer is, and we will tell them the great benefit of upgrading to latest Visual Studio 17.13. :)

@tobyjohnm
Copy link

This is a problem for me. I updated Visual Studio yesterday and can't build installers without the workaround. I just warned the rest of the dev team to avoid updating VS. I'm surprised there isn't a greater sense of urgency here about getting a fix out. WIX v3 and v4 are now out of support. Meanwhile, the v5 that is supported is now broken and we're told there is no date in sight.

@aDisplayName
Copy link

aDisplayName commented Feb 13, 2025

This is a problem for me. I updated Visual Studio yesterday and can't build installers without the workaround. I just warned the rest of the dev team to avoid updating VS. I'm surprised there isn't a greater sense of urgency here about getting a fix out. WIX v3 and v4 are now out of support. Meanwhile, the v5 that is supported is now broken and we're told there is no date in sight.

Another bug is related to the use of wixtoolset extension nuget packages. We decided to go forward with the VS upgrade, and use the dotnet CLI to perform the local build. Our CI/CD pipeline is using dotnet CLI so it is not being affected.

@FireGiantHelp
Copy link
Collaborator

@tobyjohnm did you find that the one-line workaround did not work? We found that it was sufficient to address the breaking change in Visual Studio.

With an available workaround, the priority for a general fix was reduced, and we could focus on customer requirements for the next release of HeatWave.

@tobyjohnm
Copy link

The workaround does work, but we have more than 100 installers in our repo. I can't run a full build without touching all of them with something that only benefits me. I either have to hold those changes back, making my change management more difficult, or temporarily pollute all of them.

@elachlan
Copy link

Thank you for the work around!

@fforjanAVEVA
Copy link

@tobyjohnm you shoudl consider the directory.build.props as it would apply to all your installer

@tobyjohnm
Copy link

@fforjanAVEVA can you provide a concrete example of how directory.build.props should be modified to add the necessary workaround line (CollectSuggestedVisualStudioComponentIds) to every WIX project file?

@fforjanAVEVA
Copy link

fforjanAVEVA commented Feb 14, 2025

@tobyjohnm
if you add the following as a Directory.build.targets file next to the solution - assuming the solution is at the root folder

<Project>
    <!-- https://github.com/firegiant/HeatWaveSupport/issues/73 -->
	<Target Condition="'$(MSBuildProjectExtension)'=='.wixproj'" Name="CollectSuggestedVisualStudioComponentIds" />
</Project>

then all the wixproj project shoudl automatically have the target being added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external The root cause of this issue is in another system
Projects
None yet
Development

No branches or pull requests

9 participants