[wix-devs] WixToolset.Dnc.HostGenerator errors

Rob Mensching rob at firegiant.com
Sun Jul 17 20:33:14 PDT 2022


I do see issues in Bal.wixext as well but I had them skipped at the time. Same work-around worked both places. I haven't tried running the runtime integration tests.

-----Original Message-----
From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> On Behalf Of Sean Hall via wix-devs
Sent: Sunday, July 17, 2022 7:59 PM
To: WiX Toolset Developer Mailing List <wix-devs at lists.wixtoolset.org>
Cc: Sean Hall <r.sean.hall at gmail.com>
Subject: Re: [wix-devs] WixToolset.Dnc.HostGenerator errors

Rob only reported his issue in the IntegrationBurn layer, but you are pointing to tests in the Bal.wixext layer. Why wasn't Rob seeing his issue in Bal.wixext? Are you also using the .NET SDK 6.0.302?

I've never seen that Ordinal Not Found before.

One test tries to load the .NET Core 3.1 x86 runtime and another tries to load the .NET Core 6.0 x86 runtime. I can't tell which one is producing that output. The 3.1 test is supposed to dynamically skip the test if the runtime is missing (because it's an optional component), but the 6.0 test is supposed to fail if the runtime is missing.

On Sun, Jul 17, 2022 at 9:30 PM Bob Arnson via wix-devs < wix-devs at lists.wixtoolset.org> wrote:

> Your workaround worked. Tests are now failing:
>
> ---------------------------
> Example.TestEngine.exe - Ordinal Not Found
> ---------------------------
> The ordinal 345 could not be located in the dynamic link library 
> X:\tmp\4vr10i1v.li3\ba\dncpreq.dll.
> ---------------------------
> OK
> ---------------------------
>
> And
>
> Expected: 0: Loading .NET Core FDD bootstrapper application.
> Actual:   0: error from hostfxr: You must install or update .NET to run
> this application.
>
> I have the x86 .NET 6.0.7 runtime installed. Is a different version 
> required?
>
> > -----Original Message-----
> > From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> On Behalf Of 
> > Bob Arnson via wix-devs
> > Sent: Sunday, 17 July, 2022 22:16
> > To: WiX Toolset Developer Mailing List 
> > <wix-devs at lists.wixtoolset.org>
> > Cc: Bob Arnson <bob at firegiant.com>
> > Subject: Re: [wix-devs] WixToolset.Dnc.HostGenerator errors
> >
> > It's not just you. I'm also getting those errors.
> >
> > > -----Original Message-----
> > > From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> On Behalf 
> > > Of Rob Mensching via wix-devs
> > > Sent: Thursday, 14 July, 2022 19:58
> > > To: WiX Toolset Developer Mailing List 
> > > <wix-devs at lists.wixtoolset.org>
> > > Cc: Rob Mensching <rob at firegiant.com>
> > > Subject: Re: [wix-devs] WixToolset.Dnc.HostGenerator errors
> > >
> > > My hypothesis about the item metadata being different does NOT 
> > > look correct. Items are exactly the same and duplicated and it 
> > > appears all Analyzer may be duplicated now.
> > >
> > > I worked around this issue locally by adding the following target.
> > > Since CI is passing, I'll keep this change local as I don't think 
> > > this is the correct fix (assuming the issue isn't localized to my computer).
> > >
> > >   <Target Name="RemoveDuplicatesFromAnalyzerItemGroup"
> > > AfterTargets="ResolveProjectReferences">
> > >     <RemoveDuplicates Inputs="@(Analyzer)">
> > >       <Output TaskParameter="Filtered"
> > ItemName="NonDuplicatedAnalyzer"
> > > />
> > >     </RemoveDuplicates>
> > >
> > >     <ItemGroup>
> > >       <Analyzer Remove="@(Analyzer)" />
> > >       <Analyzer Include="@(NonDuplicatedAnalyzer)" />
> > >     </ItemGroup>
> > >   </Target>
> > >
> > > -----Original Message-----
> > > From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> On Behalf 
> > > Of Rob Mensching via wix-devs
> > > Sent: Thursday, July 14, 2022 4:20 PM
> > > To: WiX Toolset Developer Mailing List 
> > > <wix-devs at lists.wixtoolset.org>
> > > Cc: Rob Mensching <rob at firegiant.com>
> > > Subject: Re: [wix-devs] WixToolset.Dnc.HostGenerator errors
> > >
> > > You are correct the issue is that "WixToolset.Dnc.HostGenerator.dll"
> > > is duplicated in the Analyzer item group.
> > >
> > > I think I just tracked down the duplication to a WPF's 
> > > "GenerateTemporaryTargetAssembly" target executing the 
> > > DncBA.targets "ResolveProjectReferences" target a second time 
> > > (which adds the output of "WixToolset.Dnc.HostGenerator.csproj" to 
> > > the Analyzer item group a second time).
> > >
> > > I'm guessing the item metadata is different causing the 
> > > duplication where before the item metadata was the same so no 
> > > duplicate was added... still digging.
> > >
> > > I have .NET SDK 6.0.302 so maybe there is a subtle change in there.
> > >
> > > -----Original Message-----
> > > From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> On Behalf 
> > > Of Sean Hall via wix-devs
> > > Sent: Thursday, July 14, 2022 4:10 PM
> > > To: WiX Toolset Developer Mailing List 
> > > <wix-devs at lists.wixtoolset.org>
> > > Cc: Sean Hall <r.sean.hall at gmail.com>
> > > Subject: Re: [wix-devs] WixToolset.Dnc.HostGenerator errors
> > >
> > > Any luck? I've never seen this. I currently have .NET SDK 6.0.301 
> > > and
> > > VS2022 17.2.5.
> > >
> > > After some searching, the only thing I found was at 
> > > https://andrewlock.net/creating-a-source-generator-part-6-saving-s
> > > ourc
> > > e-
> > > generator-output-in-source-control/.
> > > Where the project needed two properties together, though it would 
> > > only occur after the first time it's built:
> > >
> > > <PropertyGroup>
> > >     <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
> > >
> > >
> > <CompilerGeneratedFilesOutputPath>Generated</CompilerGeneratedFilesO
> > > utputPath>
> > > </PropertyGroup>
> > >
> > > The source generator itself is super simple. It shouldn't be 
> > > possible to output the generated code twice like it appears to be 
> > > doing from your errors. I probably need to add a diagnostic when 
> > > there's multiple attributes defined, but currently it would only 
> > > use the first one it
> finds.
> > > The only other way I can imagine what happened here is if there 
> > > were some kind of bug causing Roslyn to run our generator twice.
> > >
> > > On Thu, Jul 14, 2022 at 10:53 AM Sean Hall <r.sean.hall at gmail.com>
> > wrote:
> > >
> > > > You can get the files to be written to disk by adding this to 
> > > > the project consuming the generator
> > > (D:\src\wix4\src\test\burn\WixToolset.WixBA):
> > > >
> > > > <PropertyGroup>
> > > >     
> > > > <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
> > > > </PropertyGroup>
> > > >
> > > > It seems like the generator is running twice for some reason.
> > > >
> > > > On Thu, Jul 14, 2022 at 10:48 AM Rob Mensching via wix-devs < 
> > > > wix-devs at lists.wixtoolset.org> wrote:
> > > >
> > > >> I just started getting these sorts of errors in my local build 
> > > >> (not showing up in CI):
> > > >>
> > > >>
> > >
> > D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.Dnc.HostGenera
> > to
> > >
> > r\WixToolset.Dnc.HostGenerator.DncHostGenerator\WixToolset.Dnc.Host.g.
> > > cs(31,25):
> > > >> error CS0101: The namespace 'WixToolset.Dnc.Host' already 
> > > >> contains a definition for 'BootstrapperApplicationFactory'
> > > >>
> > >
> > [D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.WixBA_jxw0bnr
> > 2
> > > >> _wpftmp.csproj]
> > > >>
> > >
> > D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.Dnc.HostGenera
> > to
> > >
> > r\WixToolset.Dnc.HostGenerator.DncHostGenerator\WixToolset.Dnc.Host.g.
> > > cs(24,46):
> > > >> error CS0101: The namespace 'WixToolset.Dnc.Host' already 
> > > >> contains a definition for 'StaticEntryDelegate'
> > > >>
> > >
> > [D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.WixBA_jxw0bnr
> > 2
> > > >> _wpftmp.csproj]
> > > >>
> > >
> > D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.Dnc.HostGenera
> > to
> > >
> > r\WixToolset.Dnc.HostGenerator.DncHostGenerator\WixToolset.Dnc.Host.g.
> > > cs(29,6):
> > > >> error CS0579: Duplicate 'GeneratedCode' attribute
> > > >>
> > >
> > [D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.WixBA_jxw0bnr
> > 2
> > > >> _wpftmp.csproj]
> > > >>
> > >
> > D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.Dnc.HostGenera
> > to
> > >
> > r\WixToolset.Dnc.HostGenerator.DncHostGenerator\WixToolset.Dnc.Host.g.
> > > cs(30,6):
> > > >> error CS0579: Duplicate 'CompilerGenerated' attribute
> > > >>
> > >
> > [D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.WixBA_jxw0bnr
> > 2
> > > >> _wpftmp.csproj]
> > > >>
> > >
> > D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.Dnc.HostGenera
> > to
> > >
> > r\WixToolset.Dnc.HostGenerator.DncHostGenerator\WixToolset.Dnc.Host.g.
> > > cs(38,21):
> > > >> error CS0111: Type 'BootstrapperApplicationFactory' already 
> > > >> defines a member called 'Create' with the same parameter types
> > > >>
> > >
> > [D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.WixBA_jxw0bnr
> > 2
> > > >> _wpftmp.csproj]
> > > >>
> > >
> > D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.Dnc.HostGenera
> > to
> > >
> > r\WixToolset.Dnc.HostGenerator.DncHostGenerator\WixToolset.Dnc.Host.g.
> > > cs(45,55):
> > > >> error CS0111: Type 'BootstrapperApplicationFactory' already 
> > > >> defines a member called 'CreateBAFactory' with the same 
> > > >> parameter types
> > > >>
> > >
> > [D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.WixBA_jxw0bnr
> > 2
> > > >> _wpftmp.csproj]
> > > >>
> > >
> > D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.Dnc.HostGenera
> > to
> > >
> > r\WixToolset.Dnc.HostGenerator.DncHostGenerator\WixToolset.Dnc.Host.g.
> > > cs(59,28):
> > > >> error CS0111: Type 'BootstrapperApplicationFactory' already 
> > > >> defines a member called 'ModuleInitialize' with the same 
> > > >> parameter types
> > > >>
> > >
> > [D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.WixBA_jxw0bnr
> > 2
> > > >> _wpftmp.csproj]
> > > >>
> > > >> What should I start looking at to diagnose what is going wrong? 
> > > >> The .g.cs files mentioned in the error messages do not exist.
> > > >>
> > > >>
> > > >> Regards,
> > > >>
> > > >>   Rob Mensching
> > > >>   CEO
> > > >>   FireGiant
> > > >>
> > >
> > _______________________________________________________________
> > > >> FireGiant  |  Dedicated support for the WiX toolset  | 
> > > >> http://www.firegiant.com/
> > > >>
> > > >>
> > >
> > ________________________________________________________________
> > > ____
> > > >> WiX Toolset Developer Mailing List provided by FireGiant 
> > > >> http://www.firegiant.com/
> > > >>
> > > >
> > >
> > ________________________________________________________________
> > > ____
> > > WiX Toolset Developer Mailing List provided by FireGiant 
> > > http://www.firegiant.com/
> > >
> > ________________________________________________________________
> > > ____
> > > WiX Toolset Developer Mailing List provided by FireGiant 
> > > http://www.firegiant.com/
> > >
> > ________________________________________________________________
> > > ____
> > > WiX Toolset Developer Mailing List provided by FireGiant 
> > > http://www.firegiant.com/
> > ________________________________________________________________
> > ____
> > WiX Toolset Developer Mailing List provided by FireGiant 
> > http://www.firegiant.com/
> ____________________________________________________________________
> WiX Toolset Developer Mailing List provided by FireGiant 
> http://www.firegiant.com/
>
____________________________________________________________________
WiX Toolset Developer Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-devs mailing list