Open vdrasutis opened 11 months ago
Please provide a minimal reproducible example as an attachment or GitHub repo.
Hello, here the test project - with it you can repeat the issue: https://github.com/vdrasutis/wix_installer_issue_7925
Also same time could you provide sample how with defining/getting version parameter from some dll/exe, thank.
As I have in "Package.wxs"
<?define ProductVersion="$(fileVersion.ProductVersion($(var.MyOutputDirectory)\MyApp.exe))"?>
But if I add it to this minimal project as example - when I have commended out UI part and MSI is building successfully. Then I get that "ProductVersion" is not defined. Updated test project to also include this parameter code part.
Thanks
Your test repo does not build, and those warnings are also troublesome. Can you fix it, please?
MSBuild version 17.8.3+195e7f5a3 for .NET Framework
Build started 12/19/2023 5:50:04 PM.
Project "D:\src\xxx\wix_installer_issue_7925\Wix4Msi.sln" on node 1 (Restore target(s)).
ValidateSolutionConfiguration:
Building solution configuration "Debug|ARM64".
D:\src\xxx\wix_installer_issue_7925\Installers\MyApp1\MyApp1.wixproj(2,3): warning MSB4011: "C:\Users\Rob\.nuget\packag
es\wixtoolset.sdk\4.0.3\Sdk\Sdk.props" cannot be imported again. It was already imported at "D:\src\xxx\wix_installer_i
ssue_7925\Installers\MyApp1\MyApp1.wixproj". This is most likely a build authoring error. This subsequent import will b
e ignored.
_GetAllRestoreProjectPathItems:
Determining projects to restore...
D:\src\xxx\wix_installer_issue_7925\Installers\MyApp1\MyApp1.wixproj(2,3): warning MSB4011: "C:\Users\Rob\.nuget\packag
es\wixtoolset.sdk\4.0.3\Sdk\Sdk.props" cannot be imported again. It was already imported at "D:\src\xxx\wix_installer_i
ssue_7925\Installers\MyApp1\MyApp1.wixproj". This is most likely a build authoring error. This subsequent import will b
e ignored.
Restore:
X.509 certificate chain validation will use the default trust store selected by .NET for code signing.
X.509 certificate chain validation will use the default trust store selected by .NET for timestamping.
Restoring packages for D:\src\xxx\wix_installer_issue_7925\Installers\MyApp1\MyApp1.wixproj...
CACHE https://api.nuget.org/v3/vulnerabilities/index.json
CACHE https://api.nuget.org/v3/vulnerabilities/vulnerability.base.json
CACHE https://api.nuget.org/v3/vulnerabilities/vulnerability.update.json
Generating MSBuild file D:\src\xxx\wix_installer_issue_7925\Installers\MyApp1\obj\MyApp1.wixproj.nuget.g.props.
Generating MSBuild file D:\src\xxx\wix_installer_issue_7925\Installers\MyApp1\obj\MyApp1.wixproj.nuget.g.targets.
Writing assets file to disk. Path: D:\src\xxx\wix_installer_issue_7925\Installers\MyApp1\obj\project.assets.json
Restored D:\src\xxx\wix_installer_issue_7925\Installers\MyApp1\MyApp1.wixproj (in 445 ms).
NuGet Config files used:
C:\Users\Rob\AppData\Roaming\NuGet\NuGet.Config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.FallbackLocation.config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
Feeds used:
https://api.nuget.org/v3/index.json
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
https://nuget.pkg.github.com/wixtoolset/index.json
D:\src\firegiant\HeatWaveBuildTools\build\artifacts\
Done Building Project "D:\src\xxx\wix_installer_issue_7925\Wix4Msi.sln" (Restore target(s)).
Project "D:\src\xxx\wix_installer_issue_7925\Wix4Msi.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Debug|ARM64".
D:\src\xxx\wix_installer_issue_7925\Installers\MyApp1\MyApp1.wixproj(2,3): warning MSB4011: "C:\Users\Rob\.nuget\packag
es\wixtoolset.sdk\4.0.3\Sdk\Sdk.props" cannot be imported again. It was already imported at "D:\src\xxx\wix_installer_i
ssue_7925\Installers\MyApp1\MyApp1.wixproj". This is most likely a build authoring error. This subsequent import will b
e ignored.
Project "D:\src\xxx\wix_installer_issue_7925\Wix4Msi.sln" (1:2) is building "D:\src\xxx\wix_installer_issue_7925\Instal
lers\MyApp1\MyApp1.wixproj" (2:9) on node 1 (default targets).
D:\src\xxx\wix_installer_issue_7925\Installers\MyApp1\MyApp1.wixproj(15,3): error MSB4019: The imported project "D:\src
\xxx\wix_installer_issue_7925\GEO.CSharp.sdk.targets" was not found. Confirm that the expression in the Import declarat
ion "..\..\GEO.CSharp.sdk.targets" is correct, and that the file exists on disk.
Done Building Project "D:\src\xxx\wix_installer_issue_7925\Installers\MyApp1\MyApp1.wixproj" (default targets) -- FAILE
D.
Done Building Project "D:\src\xxx\wix_installer_issue_7925\Wix4Msi.sln" (default targets) -- FAILED.
Build FAILED.
D:\src\xxx\wix_installer_issue_7925\Installers\MyApp1\MyApp1.wixproj(2,3): warning MSB4011: "C:\Users\Rob\.nuget\pack
ages\wixtoolset.sdk\4.0.3\Sdk\Sdk.props" cannot be imported again. It was already imported at "D:\src\xxx\wix_installer
_issue_7925\Installers\MyApp1\MyApp1.wixproj". This is most likely a build authoring error. This subsequent import will
be ignored.
D:\src\xxx\wix_installer_issue_7925\Installers\MyApp1\MyApp1.wixproj(2,3): warning MSB4011: "C:\Users\Rob\.nuget\pack
ages\wixtoolset.sdk\4.0.3\Sdk\Sdk.props" cannot be imported again. It was already imported at "D:\src\xxx\wix_installer
_issue_7925\Installers\MyApp1\MyApp1.wixproj". This is most likely a build authoring error. This subsequent import will
be ignored.
D:\src\xxx\wix_installer_issue_7925\Installers\MyApp1\MyApp1.wixproj(2,3): warning MSB4011: "C:\Users\Rob\.nuget\pack
ages\wixtoolset.sdk\4.0.3\Sdk\Sdk.props" cannot be imported again. It was already imported at "D:\src\xxx\wix_installer
_issue_7925\Installers\MyApp1\MyApp1.wixproj". This is most likely a build authoring error. This subsequent import will
be ignored.
"D:\src\xxx\wix_installer_issue_7925\Wix4Msi.sln" (default target) (1:2) ->
"D:\src\xxx\wix_installer_issue_7925\Installers\MyApp1\MyApp1.wixproj" (default target) (2:9) ->
D:\src\xxx\wix_installer_issue_7925\Installers\MyApp1\MyApp1.wixproj(15,3): error MSB4019: The imported project "D:\s
rc\xxx\wix_installer_issue_7925\GEO.CSharp.sdk.targets" was not found. Confirm that the expression in the Import declar
ation "..\..\GEO.CSharp.sdk.targets" is correct, and that the file exists on disk.
Updated - hopefully should build now. Try and let me know. I know commended out the
<UIRef Id="WixUI_Common" />
<ui:WixUI Id="MyUICommon" />
So MSI should build initially successfully - need to uncomment to get error.
TargetFrameworks
is not applicable to WiX and prevents a proper restore.
WiX Version
4.0.3
.NET or MSBuild or Visual Studio Version
.NET 8 / VS 2022 17.8
HeatWave Version
1.0.2
Windows Version
Win11 23H2
Repro Repo
No response
Repro Steps
I have "Product.wxs" like below:
And "GeoUICommon.wxs" liek this:
When I tried to build project, I get error below:
...
...