[wix-devs] WixToolset.Dnc.HostGenerator errors

Bob Arnson bob at firegiant.com
Mon Aug 1 17:51:41 PDT 2022


Well, worked around the .NET SDK bug.

> -----Original Message-----
> From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> On Behalf Of Bob
> Arnson via wix-devs
> Sent: Monday, 1 August, 2022 20:51
> 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
> 
> Sean fixed it on develop branch.
> 
> > -----Original Message-----
> > From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> On Behalf Of
> > Ron Martin via wix-devs
> > Sent: Monday, 1 August, 2022 20:46
> > To: wix-devs at lists.wixtoolset.org
> > Cc: Ron Martin <cpuwzd at comcast.net>
> > Subject: Re: [wix-devs] WixToolset.Dnc.HostGenerator errors
> >
> > I attemptedd Rob's work-around, but to no effect. Specifically, I
> > added the code near the end of Directory.Build.targets, so that it
> > looks like
> > this:
> >
> > ----------------------------------------------------------------------
> > ---------------
> >
> >    <Target Name="RemoveDuplicatesFromAnalyzerItemGroup"
> > AfterTargets="ResolveProjectReferences=">
> >      <RemoveDuplicates Inputs="@(Analyzer)" >
> >        <Output TaskParameter="Filtered" ItemName="NonDulicatedAnalyzer"
> > />
> >      </RemoveDuplicates>
> >
> >      <ItemGroup>
> >        <Analyzer Remove="@(Analyzer)" />
> >        <Analyzer Include="@(NonDupliatedAnalyzer)" />
> >      </ItemGroup>
> >    </Target>
> >
> >    <Import Project="Directory$(MSBuildProjectExtension).targets"
> > Condition=" Exists('Directory$(MSBuildProjectExtension).targets') " />
> >    <Import Project="Custom.Build.targets" Condition="
> > Exists('Custom.Build.targets') " />
> > </Project>
> >
> > ----------------------------------------------------------------------
> > ---------------
> >
> > Did I miss something? Wasn't this an OK place to put it? Did I make a typo?
> >
> > Thanks,
> > Ron
> >
> > On 7/30/2022 8:55 PM, Ron Martin via wix-devs wrote:
> > > This problem finally hit me today. It appears to have occurred when
> > > I updated to VS 2022 Version 17.2.6. I'm not sure what my previous
> > > version was. I'd try going back, but I can't; I'm using VS Community
> > > Edition and MS doesn't support downgrading unless you are paying.
> > > That being said, I saw an RTM Retail key available for about $29. Is
> > > there any chance that it's legitimate and would work?
> > >
> > > I'm pretty much dead in the water.
> > >
> > > My pull request needs an update, but I can't produce it unless I can
> > > build it.
> > >
> > > I suppose I could try Rob's work-around if I can follow it.
> > >
> > > Ron
> > >
> > > On 7/27/2022 12:50 PM, Rob Mensching via wix-devs wrote:
> > >> Sure, you've written a source code generator. I only know that they
> > >> exist.
> > >>
> > >> I hacked at our build process--which I do understand--to work
> > >> around the issue. However, given my lack of experience with source
> > >> code generators (and analyzers) it wasn't clear to me if the
> > >> problem was caused by a quirk of our build process (my first
> > >> hypothesis) or deeper in the analyzer system.
> > >>
> > >> I'm eventually going to need to spend some cycles to learn about
> > >> source code generators.
> > >>
> > >>
> > >> -----Original Message-----
> > >> From: wix-devs<wix-devs-bounces at lists.wixtoolset.org>  On Behalf Of
> > >> Sean Hall via wix-devs
> > >> Sent: Wednesday, July 27, 2022 9:34 AM
> > >> 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
> > >>
> > >>> These two things are more than enough quality information to
> > >>> create an
> > >> issue.
> > >>
> > >> I should have said this differently. If our roles were reversed and
> > >> I had just spent my time investigating that workaround, I would
> > >> have immediately created an issue that detailed what I found and
> > >> how I fixed it. We had code that was working until upgrading the
> > >> SDK to a newer patch release. Breaking changes like that shouldn't
> > >> happen. So even if we end up having to fix something on our end, at
> > >> least the people that did the breaking change should be helping us
> > >> and that will also help anyone else that runs into the same problem.
> > >>
> > >> On Wed, Jul 27, 2022 at 9:22 AM Sean
> > Hall<r.sean.hall at gmail.com>  wrote:
> > >>
> > >>> There is nothing wrong with the source generator code or how it's
> > >>> packaged in the nupkg. I did a lot of research when I first built
> > >>> it, and did more when you first brought this up.
> > >>>
> > >>>> 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.
> > >>> These two things are more than enough quality information to
> > >>> create an issue. The problem is at a higher level than the source
> > >>> generator. I am confident that the other analyzers will also
> > >>> duplicate all of their functionality.
> > >>>
> > >>> On Wed, Jul 27, 2022 at 12:23 AM Rob Mensching<rob at firegiant.com>
> > >>> wrote:
> > >>>
> > >>>> I did not. I was not confident I could characterize the problem
> > >>>> correctly. I've not dug into the source generator code.
> > >>>>
> > >>>> -----Original Message-----
> > >>>> From: wix-devs<wix-devs-bounces at lists.wixtoolset.org> On Behalf
> > >>>> Of Sean Hall via wix-devs
> > >>>> Sent: Tuesday, July 26, 2022 8:47 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
> > >>>>
> > >>>> It sounded like it was due to upgrading .NET SDK. Did you create
> > >>>> an issue with them?
> > >>>>
> > >>>> On Tue, Jul 26, 2022 at 10:29 PM Rob Mensching via wix-devs <
> > >>>> wix-devs at lists.wixtoolset.org> wrote:
> > >>>>
> > >>>>> I appears the HostGenerator errors have finally started hitting
> > >>>>> on GitHub Actions. Here's a PR with no code changes (only adding
> > >>>>> manual build ability).
> > >>>>>
> > >>>>> Fromhttps://github.com/wixtoolset/wix4/runs/7532057043
> > >>>>>
> > >>>>>    Example.LatestCoreMBA ->
> > >>>>>
> > D:\a\wix4\wix4\build\Bal.wixext\Release\examples\Example.LatestCor
> > >>>>> e
> > >>>>> MBA
> > >>>>> \net6.0\Example.LatestCoreMBA.dll
> > >>>>>
> > >>>>
> >
> D:\a\wix4\wix4\src\ext\Bal\test\examples\WPFCoreMBA\WixToolset.Dnc.H
> >
> ostGenerator\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:\a\wix4\wix4\src\ext\Bal\test\examples\WPFCoreMBA\Example.WPFCo
> > >>>>> r
> > >>>>> eMB
> > >>>>> A_h1x2k0nd_wpftmp.csproj]
> > >>>>>
> > >>>>
> >
> D:\a\wix4\wix4\src\ext\Bal\test\examples\WPFCoreMBA\WixToolset.Dnc.H
> >
> ostGenerator\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:\a\wix4\wix4\src\ext\Bal\test\examples\WPFCoreMBA\Example.WPFCo
> > >>>>> r
> > >>>>> eMB
> > >>>>> A_h1x2k0nd_wpftmp.csproj]
> > >>>>>
> > >>>>
> >
> D:\a\wix4\wix4\src\ext\Bal\test\examples\WPFCoreMBA\WixToolset.Dnc.H
> >
> ostGenerator\WixToolset.Dnc.HostGenerator.DncHostGenerator\WixToolset
> > .Dnc.Host.g.cs(29,6):
> > >>>>
> > >>>>> error CS0579: Duplicate 'GeneratedCode' attribute
> > >>>>>
> >
> [D:\a\wix4\wix4\src\ext\Bal\test\examples\WPFCoreMBA\Example.WPFCo
> > >>>>> r
> > >>>>> eMB
> > >>>>> A_h1x2k0nd_wpftmp.csproj]
> > >>>>>
> > >>>>
> >
> D:\a\wix4\wix4\src\ext\Bal\test\examples\WPFCoreMBA\WixToolset.Dnc.H
> >
> ostGenerator\WixToolset.Dnc.HostGenerator.DncHostGenerator\WixToolset
> > .Dnc.Host.g.cs(30,6):
> > >>>>
> > >>>>> error CS0579: Duplicate 'CompilerGenerated' attribute
> > >>>>>
> >
> [D:\a\wix4\wix4\src\ext\Bal\test\examples\WPFCoreMBA\Example.WPFCo
> > >>>>> r
> > >>>>> eMB
> > >>>>> A_h1x2k0nd_wpftmp.csproj]
> > >>>>>
> > >>>>
> >
> D:\a\wix4\wix4\src\ext\Bal\test\examples\WPFCoreMBA\WixToolset.Dnc.H
> >
> ostGenerator\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:\a\wix4\wix4\src\ext\Bal\test\examples\WPFCoreMBA\Example.WPFCo
> > >>>>> r
> > >>>>> eMB
> > >>>>> A_h1x2k0nd_wpftmp.csproj]
> > >>>>>
> > >>>>
> >
> D:\a\wix4\wix4\src\ext\Bal\test\examples\WPFCoreMBA\WixToolset.Dnc.H
> >
> ostGenerator\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:\a\wix4\wix4\src\ext\Bal\test\examples\WPFCoreMBA\Example.WPFCo
> > >>>>> r
> > >>>>> eMB
> > >>>>> A_h1x2k0nd_wpftmp.csproj]
> > >>>>>
> > >>>>
> >
> D:\a\wix4\wix4\src\ext\Bal\test\examples\WPFCoreMBA\WixToolset.Dnc.H
> >
> ostGenerator\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:\a\wix4\wix4\src\ext\Bal\test\examples\WPFCoreMBA\Example.WPFCo
> > >>>>> r
> > >>>>> eMB
> > >>>>> A_h1x2k0nd_wpftmp.csproj]
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> -----Original Message-----
> > >>>>> From: wix-devs<wix-devs-bounces at lists.wixtoolset.org>  On Behalf
> > >>>>> Of Bob Arnson via wix-devs
> > >>>>> Sent: Monday, July 18, 2022 8:16 AM
> > >>>>> 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 fails on develop too.
> > >>>>>
> > >>>>>> -----Original Message-----
> > >>>>>> From: wix-devs<wix-devs-bounces at lists.wixtoolset.org> On Behalf
> > >>>>>> Of Sean Hall via wix-devs
> > >>>>>> Sent: Monday, 18 July, 2022 10:50
> > >>>>>> 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
> > >>>>>>
> > >>>>>> Are you sure it was passing on your machine before your changes?
> > >>>>>>
> > >>>>>> On Mon, Jul 18, 2022 at 8:19 AM Bob Arnson via wix-devs < wix-
> > >>>>>> devs at lists.wixtoolset.org> wrote:
> > >>>>>>
> > >>>>>>> I was trying to finish files-in-use for WixStdBA so skipping
> > >>>>>>> wasn't an option. I was punished for my hubris.
> > >>>>>>>
> > >>>>>>> I'll investigate the failing test.
> > >>>>>>>
> > >>>>>>>> -----Original Message-----
> > >>>>>>>> From: wix-devs<wix-devs-bounces at lists.wixtoolset.org> On
> > >>>>>>>> Behalf Of Rob Mensching via wix-devs
> > >>>>>>>> Sent: Sunday, 17 July, 2022 23:33
> > >>>>>>>> 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
> > >>>>>>>>
> > >>>>>>>> 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-
> > >>>>>>>>>>> sa
> > >>>>>>>>>>> vi
> > >>>>>>>>>>> ng-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</EmitCompilerGenerated
> > >>>>>>>>>>> Fil
> > >>>>>>>>>>> es
> > >>>>>>>>>>>
> > >>>>>>
> > <CompilerGeneratedFilesOutputPath>Generated</CompilerGeneratedFil
> > >>>>>> esO
> > >>>>>>>>>>> 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</EmitCompilerGenerat
> > >>>>>>>>>>>> edF
> > >>>>>>>>>>>> il
> > >>>>>>>>>>>> es
> > >>>>>>>>>>>> </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.HostGen
> > >>>>>> era
> > >>>>>>>>>> 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_jxw0
> > >>>>>> bnr
> > >>>>>>>>>> 2
> > >>>>>>>>>>>>> _wpftmp.csproj]
> > >>>>>>>>>>>>>
> > >>>>>>
> > D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.Dnc.HostGen
> > >>>>>> era
> > >>>>>>>>>> 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_jxw0
> > >>>>>> bnr
> > >>>>>>>>>> 2
> > >>>>>>>>>>>>> _wpftmp.csproj]
> > >>>>>>>>>>>>>
> > >>>>>>
> > D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.Dnc.HostGen
> > >>>>>> era
> > >>>>>>>>>> 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_jxw0
> > >>>>>> bnr
> > >>>>>>>>>> 2
> > >>>>>>>>>>>>> _wpftmp.csproj]
> > >>>>>>>>>>>>>
> > >>>>>>
> > D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.Dnc.HostGen
> > >>>>>> era
> > >>>>>>>>>> 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_jxw0
> > >>>>>> bnr
> > >>>>>>>>>> 2
> > >>>>>>>>>>>>> _wpftmp.csproj]
> > >>>>>>>>>>>>>
> > >>>>>>
> > D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.Dnc.HostGen
> > >>>>>> era
> > >>>>>>>>>> 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_jxw0
> > >>>>>> bnr
> > >>>>>>>>>> 2
> > >>>>>>>>>>>>> _wpftmp.csproj]
> > >>>>>>>>>>>>>
> > >>>>>>
> > D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.Dnc.HostGen
> > >>>>>> era
> > >>>>>>>>>> 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_jxw0
> > >>>>>> bnr
> > >>>>>>>>>> 2
> > >>>>>>>>>>>>> _wpftmp.csproj]
> > >>>>>>>>>>>>>
> > >>>>>>
> > D:\src\wix4\src\test\burn\WixToolset.WixBA\WixToolset.Dnc.HostGen
> > >>>>>> era
> > >>>>>>>>>> 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_jxw0
> > >>>>>> bnr
> > >>>>>>>>>> 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
> > >>>>>>>>>>>>> FireGianthttp://www.firegiant.com/
> > >>>>>>>>>>>>>
> > >>>>>>
> >
> ________________________________________________________________
> > >>>>>>>>>>> ____
> > >>>>>>>>>>> WiX Toolset Developer Mailing List provided by
> > >>>>>>>>>>> FireGianthttp://www.firegiant.com/
> > >>>>>>>>>>>
> > >>>>>>
> >
> ________________________________________________________________
> > >>>>>>>>>>> ____
> > >>>>>>>>>>> WiX Toolset Developer Mailing List provided by
> > >>>>>>>>>>> FireGianthttp://www.firegiant.com/
> > >>>>>>>>>>>
> > >>>>>>
> >
> ________________________________________________________________
> > >>>>>>>>>>> ____
> > >>>>>>>>>>> WiX Toolset Developer Mailing List provided by
> > >>>>>>>>>>> FireGianthttp://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/
> > >>>>>
> >
> ________________________________________________________________
> > ___
> > >>>>> _ 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
> > >> FireGianthttp://www.firegiant.com/
> > >>
> >
> ________________________________________________________________
> > ____
> > >> WiX Toolset Developer Mailing List provided by
> > >> FireGianthttp://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