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

Exception thrown once upgrading WiX 4 project again #40

Open
FireGiantHelp opened this issue Jul 11, 2023 · 4 comments
Open

Exception thrown once upgrading WiX 4 project again #40

FireGiantHelp opened this issue Jul 11, 2023 · 4 comments
Labels
bug Something isn't working moreinfo More information requested to diagnose the issue

Comments

@FireGiantHelp
Copy link
Collaborator

HeatWave Version

1.0.1

Visual Studio Version

17.6.2

Repro Steps

  1. Upgrade WiX v3 to WiX v4 in VS2019
  2. Upgrade to VS2022
  3. Open v4 .wixproj
  4. Prompted to upgrade v4 .wixproj again
  5. Exception thrown

Actual Result

We already upgraded from WiX 3 to 4 when using Visual Studio 2019 and all was working well.

We are now moving to VS 2022. After installing Heatwave for VS 2022, Heatwave asked to convert the wixproj, even though it already is in WiX 4 format.

The following stack exception was shown and written to the HeatWaveConvert.log

[05/30/2023 13:55:30.777]: Converting project file Setup.wixproj...
[05/30/2023 13:55:32.281]: *** ERROR ***: Import failed with an exception.
System.InvalidOperationException: Duplicate attribute.
at System.Xml.Linq.XElement.AddAttribute(XAttribute a)
at System.Xml.Linq.XContainer.Add(Object content)
at FireGiant.HeatWave.ProjectConversion.VotiveProjectConverter.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at FireGiant.HeatWave.ProjectConversion.VotiveProjectConverter.d__11.MoveNext().
[05/30/2023 13:55:32.284]: ---- Project Setup: Converted 0 files.
[05/30/2023 13:55:32.284]: ---- Total time: 01.514
[05/30/2023 13:55:32.284]: ========== Import complete: 1 errors, 0 warnings

However, after this, the wixproj works fine and we have no other issues. Also, no changes were made to any of the setup files such as the wxs and wixproj files.

Expected Result

No upgrade of a v4 .wixproj

This was original reported at wixtoolset/issues#7524

@FireGiantHelp FireGiantHelp added the triage To be reviewed by FireGiant label Jul 11, 2023
@FireGiantHelp FireGiantHelp added bug Something isn't working moreinfo More information requested to diagnose the issue and removed triage To be reviewed by FireGiant labels Sep 11, 2023
@FireGiantHelp
Copy link
Collaborator Author

Would it be possible to share the project after the first conversion? It is unexpected that VS2022 prompted to convert the project again and we'd like to see what caused the re-reprompt.

@hskeep
Copy link

hskeep commented Apr 1, 2024

I am experiencing this now. Running VS 2022 Version 17.8.5. I updated HeatWave 2022 to the latest version this morning (1.0.3) and now my wix 4 set up project will not load, is prompting for to upgrade to Wix v4 and is throwing an exception. The project will no longer load at all:

2024-04-01 1:21:12 PM NotRecoverable Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "FireGiant.HeatWave.ProjectSystem.HeatWaveProjectTreeIconPropertyProvider". at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue() at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create() at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState) at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState) at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose() at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.ConstructExportedValue(RuntimeImport import, RuntimeExport export, RuntimePartLifecycleTracker importingPartTracker, PartLifecycleTracker partLifecycle, ReportFaultCallback faultCallback) at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass16_0.<GetExportedValue>b__1() at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_01.b__0()
at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
at Microsoft.VisualStudio.ProjectSystem.MefExtensions.d__122.MoveNext() at Microsoft.VisualStudio.ProjectSystem.DualOrderPrecedenceImporter2.Merge(IReadOnlyCollection1 source1, IReadOnlyCollection1 source2)
at Microsoft.VisualStudio.ProjectSystem.DualOrderPrecedenceImporter2.<LinkExternalInput>b__9_0(IProjectVersionedValue1 data)
at Microsoft.VisualStudio.ProjectSystem.TransformBlockSlim2.TransformBlockSlimSync.ProcessInputAsync(TInput input) at Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim1.d__5.MoveNext()
---> System.MissingMethodException: Method not found: 'Microsoft.VisualStudio.Threading.JoinableTaskFactory Microsoft.VisualStudio.ProjectSystem.IProjectThreadingService.get_JoinableTaskFactory()'.
at FireGiant.HeatWave.ProjectSystem.HeatWaveProjectTreeIconPropertyProvider..ctor(UnconfiguredProject unconfiguredProject, IProjectThreadingService threadingService)
--- End of inner exception stack trace ---
CPS Microsoft.VisualStudio.ProjectSystem.RetailRuntime RunningInVisualStudio HostSetActiveProjectConfiguration AllTargetOutputGroups DeclaredSourceItems VisualStudioWellKnownOutputGroups SdkReferences HeatWaveProject ProjectReferences UserSourceItems SortByDisplayOrder UseFileGlobs OpenProjectFile PackageReferences ProjectConfigurationsDeclaredDimensions ProjectImportsTree OutputGroups DependenciesTree HandlesOwnReload .NET FallbackProjectConfigurationService
===================`

@saadsaeed01
Copy link

saadsaeed01 commented Apr 2, 2024

@hskeep

It is not working o my side too

Microsoft Visual Studio Professional 2022 (64-bit) - Current Version 17.8.3

System.AggregateException: Project system data flow 'ProjectTreePropertiesProvidersAggregator: 12460595' closed because of an exception.
An exception was thrown while initializing part "FireGiant.HeatWave.ProjectSystem.HeatWaveProjectTreeIconPropertyProvider".
---> (Inner Exception #0) Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "FireGiant.HeatWave.ProjectSystem.HeatWaveProjectTreeIconPropertyProvider".
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue()
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create()
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.ConstructExportedValue(RuntimeImport import, RuntimeExport export, RuntimePartLifecycleTracker importingPartTracker, PartLifecycleTracker partLifecycle, ReportFaultCallback faultCallback)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass16_0.<GetExportedValue>b__1()
   at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_0`1.<As>b__0()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Microsoft.VisualStudio.ProjectSystem.MefExtensions.<ExtensionValuesWithMetadata>d__12`2.MoveNext()
   at Microsoft.VisualStudio.ProjectSystem.DualOrderPrecedenceImporter`2.Merge(IReadOnlyCollection`1 source1, IReadOnlyCollection`1 source2)
   at Microsoft.VisualStudio.ProjectSystem.DualOrderPrecedenceImporter`2.<LinkExternalInput>b__9_0(IProjectVersionedValue`1 data)
   at Microsoft.VisualStudio.ProjectSystem.TransformBlockSlim`2.TransformBlockSlimSync.ProcessInputAsync(TInput input)
   at Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim`1.<ProcessInputQueueAsync>d__5.MoveNext()
---> System.MissingMethodException: Method not found: 'Microsoft.VisualStudio.Threading.JoinableTaskFactory Microsoft.VisualStudio.ProjectSystem.IProjectThreadingService.get_JoinableTaskFactory()'.
   at FireGiant.HeatWave.ProjectSystem.HeatWaveProjectTreeIconPropertyProvider..ctor(UnconfiguredProject unconfiguredProject, IProjectThreadingService threadingService)
--- End of inner exception stack trace ---
<--- (Inner Exception #0) 

@FireGiantHelp
Copy link
Collaborator Author

@hskeep and @saadsaeed01 the problem you are seeing is tracked in #59.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working moreinfo More information requested to diagnose the issue
Projects
None yet
Development

No branches or pull requests

3 participants