[wix-devs] Dtf repository MakeSfxCA and SfxCa tools

Sean Hall r.sean.hall at gmail.com
Wed Jun 10 15:13:47 PDT 2020


It seemed to be a chicken and egg problem to me - you need the new
SDK-style behavior for MSBuild to know how to handle Nuget packages
natively but how do you get MSBuild to use Nuget to get your custom SDK?
All of the standard SDKs are actually installed on the machine.

I see now that there is a Nuget-based resolver for the Sdk behavior -
https://docs.microsoft.com/en-us/visualstudio/msbuild/how-to-use-project-sdk?view=vs-2019.
So it's essentially doing a pre-restore restore. The project can't just
specify Sdk="WixToolset.Whatever", it has to be
Sdk="WixToolset.Whatever/4.0.0". I can't tell from that documentation
whether wildcards are supported.

On Thu, Jun 11, 2020 at 2:00 AM Rob Mensching <rob at firegiant.com> wrote:

> What sort of "something" are you thinking needs to be installed?
>
> It's been a long while since I searched for documentation on SDK-style
> projects. Everything was scattered when .NET Core started but a lot has
> finally congealed on MSDN. IIRC, they aren't much more than properly named
> .props/.targets files in a .nupkg and MSBuild can resolve them from there.
>
> Not sure I answered the question.
>
> -----Original Message-----
> From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> On Behalf Of Sean
> Hall via wix-devs
> Sent: Friday, June 5, 2020 6:20 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] Dtf repository MakeSfxCA and SfxCa tools
>
> Do you know whether all of that is possible without installing something
> on the machine first? I did a quick look when migrating the MSBuild tests
> in Tools and didn't find anything on how to create your own Sdk.
>
> On Sat, Jun 6, 2020 at 1:13 AM Rob Mensching <rob at firegiant.com> wrote:
>
> > Sean's basically got it. If you look at a C# project to day, you'll
> > see normal C# assembly and executable projects use the
> "Microsoft.NET.Sdk"
> > moniker:
> >
> > <Project Sdk="Microsoft.NET.Sdk">
> >
> > But if you look at a web project they use the "Micorosft.NET.Sdk.Web"
> > moniker:
> >
> > <Project Sdk="Microsoft.NET.Sdk.Web">
> >
> > That's because web projects build on the assembly project and add more
> > web specific tooling.
> >
> > For managed custom actions, we'll want to do the same thing as what
> > the web projects do but add the additional steps are to create the
> > custom action.
> >
> > We haven't discussed the moniker for that SDK-style MSBuild project (I
> > wish MSBuild gave these project types a better than "SDK-style") but
> > it'll be _something_ like:
> >
> > <Project Sdk="WixToolset.Sdk.CustomAction">
> >
> > ...or one of the options that Sean mentioned, or something we haven't
> > thought of yet. We can noodle on the naming but it won't materially
> > affect the solution (noted, changing the moniker does mean changing
> > some of the filenames).
> >
> > The delivery mechanism for all of the above is a NuGet file, just like
> > what WixToolset.MSBuild from the Tools repo does (note, it is highly
> > likely we _will_ change the WixToolset.MSBuild moniker at least one
> > more time after doing a survey of the world of SDK-style projects and
> > picking a name that fits in best).
> >
> > -----Original Message-----
> > From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> On Behalf Of
> > Sean Hall via wix-devs
> > Sent: Friday, June 5, 2020 3:43 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] Dtf repository MakeSfxCA and SfxCa tools
> >
> > If you're interested in doing the MSBuild integration as well, that
> > would be great. The problem is that I don't know what exactly Rob
> > means by an SDK-style MSBuild Nuget package.
> >
> > If you follow the example of WixToolset.MSBuild from the Tools repo,
> > you'd create a Nuget package called... I don't know.
> WixToolset.MSBuild.CA?
> > WixToolset.ManagedCA? Let's pretend it's WixToolset.Dtf.MSBuild. You'd
> > setup a build folder in the nuget package containing
> > WixToolset.Dtf.MSBuild.props which initializes a Property named
> > something like WixCATargetsPath to the path of wix.ca.targets.
> > wix.ca.targets would be in the tools folder, and so would
> > MakeSfxCA.exe. There would be platform specific folders for SfxCA in the
> tools folder.
> >
> > After that, you'd need to know a lot about MSBuild in order to bring
> > wix.ca.targets up to date so that it can be used in an SDK-style csproj.
> >
> > But is that an SDK-style MSBuild Nuget package? When I hear that, I
> > can't help but think that we're trying to get something like this to
> work:
> >
> > <Project Sdk="WixToolset.CA.Sdk">
> >     <PackageReference Include="WixToolset.Dtf.MSBuild" /> </Project>
> >
> > But I don't know if that's even possible without installing something
> > into MSBuild's main directory.
> >
> ____________________________________________________________________
> WiX Toolset Developer Mailing List provided by FireGiant
> http://www.firegiant.com/
>



More information about the wix-devs mailing list