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

Wix dependency missing #159

Open
6 tasks done
flcdrg opened this issue Jun 10, 2024 · 4 comments
Open
6 tasks done

Wix dependency missing #159

flcdrg opened this issue Jun 10, 2024 · 4 comments
Labels
Bug Issues where something has happened which was not expected or intended

Comments

@flcdrg
Copy link
Member

flcdrg commented Jun 10, 2024

Checklist

  • I confirm there are no unresolved issues reported on the Chocolatey Status page.
  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my problem.
  • I have verified this is not an issue for a specific package.
  • I have verified this issue is not security related.
  • I confirm I am using official, and not unofficial, or modified, Chocolatey products.

What You Are Seeing?

Building choco reports an error because it can't find tools\WiX.3.11.2\build\wix.props

What is Expected?

Wix dependencies should be included so build doesn't report this error

How Did You Get This To Happen?

  1. ./build.ps1

System Details

  • Operating System: Windows 11
  • Windows PowerShell version: 5.1

Installed Packages

N/A

Output Log

Restore
========================================
Restoring src/chocolatey.sln...
MSBuild auto-detection: using msbuild version '17.9.8.16306' from 'C:\Program Files (x86)\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin'.
C:\vagrant\src\chocolatey.install\chocolatey.install.wixproj(3,3): error MSB4019: The imported project "C:\vagrant\tools\WiX.3.11.2\build\wix.props" was not found. Confirm that the expression in the Import declaration "..\..\tools\WiX.3.11.2\build\wix.props" is correct, and that the file exists on disk.

Additional Context

No response

@flcdrg flcdrg added the Bug Issues where something has happened which was not expected or intended label Jun 10, 2024
@TheCakeIsNaOH
Copy link
Member

This can be worked around by adding #tool nuget:?package=WiX&version=3.11.2 to the second line of the recipe.cake.
TheCakeIsNaOH/choco@7021fcf

It may be something that needs to be fixed in Chocolatey.Cake.Recipe

@flcdrg
Copy link
Member Author

flcdrg commented Jun 11, 2024

Yeah, I just manually installed the package via nuget install but I'm assuming fixing it here in the Recipe repo is a better option

flcdrg added a commit to flcdrg/Chocolatey.Cake.Recipe that referenced this issue Jun 11, 2024
@gep13
Copy link
Member

gep13 commented Jun 17, 2024

@flcdrg @TheCakeIsNaOH I am not sure the best approach here...

The whole thought process behind Chocolatey.Cake.Recipe is that it can be used across multiple projects, and not all of those are going to make use of WiX, so adding it as a dependency on the whole recipe is not the right approach in my opinion.

The suggestion that @TheCakeIsNaOH makes putting the onus on the project itself to put this dependency in place.

While this isn't ideal, it does mean that it won't be added everywhere.

Perhaps we could make the Recipe smarter, by looking for the presence of a *.wixproj file in the *.sln file, and if there, add the dependency.

@TheCakeIsNaOH
Copy link
Member

Perhaps we could make the Recipe smarter, by looking for the presence of a *.wixproj file in the *.sln file, and if there, add the dependency.

I think this would be the right long term course of action. Alternatively, using a simple configuration switch in each project to determine if the package should be installed would allow central control of the versioning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues where something has happened which was not expected or intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants