Skip to content

Commit 65b1d79

Browse files
committed
Changes to support app-silo; requires app-silo to be applied despite TargetDeviceFaimly not matching magic versions
1 parent 0093c26 commit 65b1d79

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/AppInstallerCLIPackage/Package.appxmanifest

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
55
xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
66
xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5"
7+
xmlns:uap18="http://schemas.microsoft.com/appx/manifest/uap/windows10/18"
78
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
89
xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10"
910
xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6"
10-
IgnorableNamespaces="uap uap3 uap5 rescap">
11+
IgnorableNamespaces="uap uap3 uap5 uap18 rescap">
1112
<Identity Name="WinGetDevCLI" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="0.0.2.0" />
1213
<Properties>
1314
<DisplayName>WinGet Dev CLI</DisplayName>
@@ -97,7 +98,7 @@
9798
</com:Extension>
9899
</Extensions>
99100
</Application>
100-
<Application Id="WinGetMCPServer" Executable="DotNet\WinGetMCPServer.exe" EntryPoint="Windows.FullTrustApplication">
101+
<Application Id="WinGetMCPServer" Executable="DotNet\WinGetMCPServer.exe" EntryPoint="Windows.FullTrustApplication" uap18:EntryPoint="Isolated.App" uap18:TrustLevel="appContainer" uap18:RuntimeBehavior="appSilo">
101102
<uap:VisualElements DisplayName="WinGet Dev MCP Server" Square150x150Logo="Images\MedTile.png" Square44x44Logo="Images\AppList.png" Description="The WinGet MCP server." BackgroundColor="#0078d7" AppListEntry="none" >
102103
<uap:DefaultTile/>
103104
</uap:VisualElements >

src/WinGetMCPServer/Program.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
namespace WinGetMCPServer
88
{
9+
using Microsoft.Extensions.Configuration;
910
using Microsoft.Extensions.DependencyInjection;
1011
using Microsoft.Extensions.Hosting;
1112
using Microsoft.Extensions.Logging;
@@ -17,7 +18,13 @@ internal class Program
1718

1819
static void Main(string[] args)
1920
{
20-
var builder = Host.CreateApplicationBuilder();
21+
// Set the content root to our package location
22+
HostApplicationBuilderSettings settings = new HostApplicationBuilderSettings { Configuration = new ConfigurationManager() };
23+
string contentRootPath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "MCP");
24+
Directory.CreateDirectory(contentRootPath);
25+
settings.Configuration[HostDefaults.ContentRootKey] = contentRootPath;
26+
27+
var builder = Host.CreateApplicationBuilder(settings);
2128
builder.Logging.AddConsole(consoleOptions => { consoleOptions.LogToStandardErrorThreshold = LogLevel.Trace; });
2229

2330
builder.Services

0 commit comments

Comments
 (0)