You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I’m trying to build winget in a Windows container, using Docker for Windows.
Could you describe exactly what is the minimal set of Visual Studio Build Tools components required? I’m not sure what this maps to.
The source for winget is contained in a Visual Studio 2019 C++ solution. To build the solution correctly, install the latest Visual Studio with the C++ workload.
I'm not aware of an easy way to pare this down to the purely minimal set of components that are required to build the solution. In addition, I would imagine that you might also want it segregated into product and test components in the event that you are not interested in the tests.
I don't know if there is a single URL that one could use to get "AppInstallerCLI.exe from the artifacts of the latest build for branch foo". Nor am I particularly familiar with Dockerfiles to know if you could process it there, but I you could run a shell script that could do it at a minimum.
If that is what you want, we can also publish the resources.pri file to the artifacts so that it can run. I think this would fall into the unofficially supported category. I want this flow to keep working, but it is not a method that we currently ship and so if it broke and was extremely expensive to fix, it might be down for some time.
I am very interested in using winget in our Dockerfile builds for Windows containers, which seems like the sort of thing it is designed for. But installing in a container doesn't seem to work. Having the raw .exe available could be a good workaround?
Step 13/14 : RUN Add-AppPackage -Path "C:\TEMP\Microsoft.DesktopAppInstaller.msixbundle"
---> Running in 24a49ceb7815
Add-AppPackage : Deployment failed with HRESULT: 0x80073D19, An error occurred
because a user was logged off.
Unspecified error
NOTE: For additional information, look for [ActivityId]
40991304-8568-0000-e6d0-ef406885d701 in the Event Log or use the command line
Get-AppPackageLog -ActivityID 40991304-8568-0000-e6d0-ef406885d701
At line:1 char:1
+ Add-AppPackage -Path C:\TEMP\Microsoft.DesktopAppInstaller.msixbundle
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (C:\TEMP\Microso...ller.msixbundle
:String) [Add-AppxPackage], Exception
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageMa
nager.Commands.AddAppxPackageCommand
Demitrius Nelon (@denelon)Antonin Décimo (@MisterDA) I've tried the method above, extracted both the DesktopInstaller package and the VCLibs package, copied the VCLibs DLLs next to the winget.exe client and searched for packages with success. (All this in a 20H2 Win10 docker container.) However I can't install the store package I'd like, because I'm getting an error:
Nagy-Egri Máté Ferenc (@MathiasMagnus) we're working on eliminating the requirement to be signed into the Microsoft Store via MSA for free packages rated "e" for everyone.
Activity
denelon commentedon Dec 29, 2020
We will take a look at this when we return from holiday.
JohnMcPMS commentedon Jan 4, 2021
Here is my current config, which is almost certainly a superset of what is needed:
{ "version": "1.0", "components": [ "Microsoft.VisualStudio.Component.CoreEditor", "Microsoft.VisualStudio.Workload.CoreEditor", "Microsoft.NetCore.Component.Runtime.5.0", "Microsoft.NetCore.Component.Runtime.3.1", "Microsoft.NetCore.Component.SDK", "Microsoft.VisualStudio.Component.NuGet", "Microsoft.Net.Component.4.6.1.TargetingPack", "Microsoft.VisualStudio.Component.Roslyn.Compiler", "Microsoft.VisualStudio.Component.Roslyn.LanguageServices", "Microsoft.VisualStudio.Component.FSharp", "Microsoft.ComponentGroup.ClickOnce.Publish", "Microsoft.NetCore.Component.DevelopmentTools", "Microsoft.VisualStudio.Component.FSharp.WebTemplates", "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions", "Microsoft.VisualStudio.Component.DockerTools", "Microsoft.NetCore.Component.Web", "Microsoft.Net.Component.4.8.SDK", "Microsoft.Net.Component.4.7.2.TargetingPack", "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites", "Microsoft.VisualStudio.Component.TypeScript.4.0", "Microsoft.VisualStudio.Component.JavaScript.TypeScript", "Microsoft.VisualStudio.Component.JavaScript.Diagnostics", "Microsoft.Component.MSBuild", "Microsoft.VisualStudio.Component.TextTemplating", "Component.Microsoft.VisualStudio.RazorExtension", "Microsoft.VisualStudio.Component.IISExpress", "Microsoft.VisualStudio.Component.SQL.ADAL", "Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime", "Microsoft.VisualStudio.Component.Common.Azure.Tools", "Microsoft.VisualStudio.Component.SQL.CLR", "Microsoft.VisualStudio.Component.MSODBC.SQL", "Microsoft.VisualStudio.Component.MSSQL.CMDLnUtils", "Microsoft.VisualStudio.Component.ManagedDesktop.Core", "Microsoft.Net.Component.4.5.2.TargetingPack", "Microsoft.Net.Component.4.5.TargetingPack", "Microsoft.VisualStudio.Component.SQL.SSDT", "Microsoft.VisualStudio.Component.SQL.DataSources", "Component.Microsoft.Web.LibraryManager", "Microsoft.VisualStudio.ComponentGroup.Web", "Microsoft.VisualStudio.Component.Web", "Microsoft.VisualStudio.Component.IntelliCode", "Microsoft.Net.Component.4.TargetingPack", "Microsoft.Net.Component.4.5.1.TargetingPack", "Microsoft.Net.Component.4.6.TargetingPack", "Microsoft.Net.ComponentGroup.TargetingPacks.Common", "Microsoft.Net.Core.Component.SDK.2.1", "Component.Microsoft.VisualStudio.Web.AzureFunctions", "Microsoft.VisualStudio.ComponentGroup.AzureFunctions", "Microsoft.VisualStudio.Component.Azure.Compute.Emulator", "Microsoft.VisualStudio.Component.Azure.Storage.Emulator", "Microsoft.VisualStudio.Component.Azure.ClientLibs", "Microsoft.VisualStudio.Component.Azure.AuthoringTools", "Microsoft.VisualStudio.Component.CloudExplorer", "Microsoft.VisualStudio.Component.Debugger.TimeTravel", "Microsoft.VisualStudio.Component.Debugger.Snapshot", "Microsoft.VisualStudio.Component.IntelliTrace.FrontEnd", "Microsoft.VisualStudio.Component.DiagnosticTools", "Microsoft.VisualStudio.Component.EntityFramework", "Microsoft.VisualStudio.Component.LiveUnitTesting", "Microsoft.VisualStudio.Component.AspNet45", "Microsoft.VisualStudio.Component.AppInsights.Tools", "Microsoft.VisualStudio.Component.WebDeploy", "Microsoft.VisualStudio.Component.Debugger.JustInTime", "Microsoft.VisualStudio.Component.Wcf.Tooling", "Microsoft.VisualStudio.Component.ClassDesigner", "Microsoft.VisualStudio.Component.GraphDocument", "Microsoft.VisualStudio.Component.CodeMap", "Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites", "Microsoft.VisualStudio.Component.Azure.Waverton.BuildTools", "Microsoft.VisualStudio.Component.Azure.Waverton", "Microsoft.Component.Azure.DataLake.Tools", "Microsoft.VisualStudio.Component.Azure.Kubernetes.Tools", "Microsoft.VisualStudio.Component.Azure.ResourceManager.Tools", "Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools", "Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices", "Microsoft.VisualStudio.Component.Azure.ServiceFabric.Tools", "Microsoft.VisualStudio.Component.Azure.Powershell", "Microsoft.VisualStudio.Workload.Azure", "Microsoft.VisualStudio.Component.VC.CoreIde", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", "Microsoft.VisualStudio.Component.Graphics.Tools", "Microsoft.VisualStudio.Component.VC.DiagnosticTools", "Microsoft.VisualStudio.Component.Windows10SDK.18362", "Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites", "Microsoft.ComponentGroup.Blend", "Microsoft.VisualStudio.Component.DotNetModelBuilder", "Microsoft.VisualStudio.Component.FSharp.Desktop", "Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging", "Microsoft.VisualStudio.Workload.ManagedDesktop", "Microsoft.VisualStudio.Component.VC.Redist.14.Latest", "Microsoft.VisualStudio.ComponentGroup.ArchitectureTools.Native", "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core", "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.CMake", "Microsoft.VisualStudio.Component.VC.CMake.Project", "Microsoft.VisualStudio.Component.VC.ATL", "Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest", "Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest", "Microsoft.VisualStudio.Component.VC.ASAN", "Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset", "Microsoft.VisualStudio.Component.VC.Llvm.Clang", "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang", "Microsoft.VisualStudio.Workload.NativeDesktop", "Microsoft.Component.NetFX.Native", "Microsoft.VisualStudio.ComponentGroup.UWP.NetCoreAndStandard", "Microsoft.VisualStudio.Component.Graphics", "Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin", "Microsoft.VisualStudio.ComponentGroup.UWP.Support", "Microsoft.VisualStudio.Component.VC.Tools.ARM64", "Microsoft.VisualStudio.Component.UWP.VC.ARM64", "Microsoft.VisualStudio.Component.VC.Tools.ARM", "Microsoft.VisualStudio.ComponentGroup.UWP.VC", "Microsoft.VisualStudio.Workload.Universal", "Microsoft.Component.ClickOnce" ] }And here I have dropped at least the Azure workload:
{ "version": "1.0", "components": [ "Microsoft.VisualStudio.Component.CoreEditor", "Microsoft.VisualStudio.Workload.CoreEditor", "Microsoft.NetCore.Component.Runtime.5.0", "Microsoft.NetCore.Component.Runtime.3.1", "Microsoft.NetCore.Component.SDK", "Microsoft.VisualStudio.Component.NuGet", "Microsoft.Net.Component.4.6.1.TargetingPack", "Microsoft.VisualStudio.Component.Roslyn.Compiler", "Microsoft.VisualStudio.Component.Roslyn.LanguageServices", "Microsoft.VisualStudio.Component.FSharp", "Microsoft.ComponentGroup.ClickOnce.Publish", "Microsoft.NetCore.Component.DevelopmentTools", "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions", "Microsoft.VisualStudio.Component.DockerTools", "Microsoft.Net.Component.4.8.SDK", "Microsoft.Net.Component.4.7.2.TargetingPack", "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites", "Microsoft.VisualStudio.Component.TypeScript.4.0", "Microsoft.VisualStudio.Component.JavaScript.TypeScript", "Microsoft.VisualStudio.Component.JavaScript.Diagnostics", "Microsoft.Component.MSBuild", "Microsoft.VisualStudio.Component.TextTemplating", "Component.Microsoft.VisualStudio.RazorExtension", "Microsoft.VisualStudio.Component.IISExpress", "Microsoft.VisualStudio.Component.SQL.ADAL", "Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime", "Microsoft.VisualStudio.Component.Common.Azure.Tools", "Microsoft.VisualStudio.Component.SQL.CLR", "Microsoft.VisualStudio.Component.MSODBC.SQL", "Microsoft.VisualStudio.Component.MSSQL.CMDLnUtils", "Microsoft.VisualStudio.Component.ManagedDesktop.Core", "Microsoft.Net.Component.4.5.2.TargetingPack", "Microsoft.Net.Component.4.5.TargetingPack", "Microsoft.VisualStudio.Component.SQL.SSDT", "Microsoft.VisualStudio.Component.SQL.DataSources", "Component.Microsoft.Web.LibraryManager", "Microsoft.VisualStudio.ComponentGroup.Web", "Microsoft.VisualStudio.Component.Web", "Microsoft.VisualStudio.Component.IntelliCode", "Microsoft.Net.Component.4.TargetingPack", "Microsoft.Net.Component.4.5.1.TargetingPack", "Microsoft.Net.Component.4.6.TargetingPack", "Microsoft.Net.ComponentGroup.TargetingPacks.Common", "Microsoft.Net.Core.Component.SDK.2.1", "Microsoft.VisualStudio.Component.IntelliTrace.FrontEnd", "Microsoft.VisualStudio.Component.DiagnosticTools", "Microsoft.VisualStudio.Component.EntityFramework", "Microsoft.VisualStudio.Component.LiveUnitTesting", "Microsoft.VisualStudio.Component.AppInsights.Tools", "Microsoft.VisualStudio.Component.Debugger.JustInTime", "Microsoft.VisualStudio.Component.Wcf.Tooling", "Microsoft.VisualStudio.Component.ClassDesigner", "Microsoft.VisualStudio.Component.GraphDocument", "Microsoft.VisualStudio.Component.CodeMap", "Microsoft.VisualStudio.Component.VC.CoreIde", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", "Microsoft.VisualStudio.Component.Graphics.Tools", "Microsoft.VisualStudio.Component.VC.DiagnosticTools", "Microsoft.VisualStudio.Component.Windows10SDK.18362", "Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites", "Microsoft.ComponentGroup.Blend", "Microsoft.VisualStudio.Component.DotNetModelBuilder", "Microsoft.VisualStudio.Component.FSharp.Desktop", "Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging", "Microsoft.VisualStudio.Workload.ManagedDesktop", "Microsoft.VisualStudio.Component.VC.Redist.14.Latest", "Microsoft.VisualStudio.ComponentGroup.ArchitectureTools.Native", "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core", "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.CMake", "Microsoft.VisualStudio.Component.VC.CMake.Project", "Microsoft.VisualStudio.Component.VC.ATL", "Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest", "Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest", "Microsoft.VisualStudio.Component.VC.ASAN", "Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset", "Microsoft.VisualStudio.Component.VC.Llvm.Clang", "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang", "Microsoft.VisualStudio.Workload.NativeDesktop", "Microsoft.Component.NetFX.Native", "Microsoft.VisualStudio.ComponentGroup.UWP.NetCoreAndStandard", "Microsoft.VisualStudio.Component.Graphics", "Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin", "Microsoft.VisualStudio.ComponentGroup.UWP.Support", "Microsoft.VisualStudio.Component.VC.Tools.ARM64", "Microsoft.VisualStudio.Component.UWP.VC.ARM64", "Microsoft.VisualStudio.Component.VC.Tools.ARM", "Microsoft.VisualStudio.ComponentGroup.UWP.VC", "Microsoft.VisualStudio.Workload.Universal", "Microsoft.Component.ClickOnce" ] }I'm not aware of an easy way to pare this down to the purely minimal set of components that are required to build the solution. In addition, I would imagine that you might also want it segregated into product and test components in the event that you are not interested in the tests.
MisterDA commentedon Feb 10, 2021
For reference, this is the Dockerfile I've come up with to build winget:
JohnMcPMS commentedon Feb 10, 2021
If you are mostly interested in getting binaries in the container to then run, you could acquire them from the commit build. For instance:
https://dev.azure.com/ms/winget-cli/_build/results?buildId=137672&view=artifacts&pathAsName=false&type=publishedArtifacts
I don't know if there is a single URL that one could use to get "AppInstallerCLI.exe from the artifacts of the latest build for branch foo". Nor am I particularly familiar with Dockerfiles to know if you could process it there, but I you could run a shell script that could do it at a minimum.
If that is what you want, we can also publish the resources.pri file to the artifacts so that it can run. I think this would fall into the unofficially supported category. I want this flow to keep working, but it is not a method that we currently ship and so if it broke and was extremely expensive to fix, it might be down for some time.
hjmallon commentedon Aug 6, 2021
I am very interested in using winget in our Dockerfile builds for Windows containers, which seems like the sort of thing it is designed for. But installing in a container doesn't seem to work. Having the raw .exe available could be a good workaround?
MisterDA commentedon Aug 9, 2021
You can try this to download and install a build of the latest release from GitHub:
MathiasMagnus commentedon Nov 24, 2021
Demitrius Nelon (@denelon) Antonin Décimo (@MisterDA) I've tried the method above, extracted both the DesktopInstaller package and the VCLibs package, copied the VCLibs DLLs next to the winget.exe client and searched for packages with success. (All this in a 20H2 Win10 docker container.) However I can't install the store package I'd like, because I'm getting an error:
I'd need this package badly to run OpenCL code in CI.
denelon commentedon Nov 24, 2021
Nagy-Egri Máté Ferenc (@MathiasMagnus) we're working on eliminating the requirement to be signed into the Microsoft Store via MSA for free packages rated "e" for everyone.
wingetto install MS Store packages without account just like the MS Store #1585