Skip to content

Commit

Permalink
[VSIX-Templates] Fix Blank Templates endless nuget installation dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
ghost1372 committed Feb 21, 2025
1 parent d87f6c1 commit d907f9c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,6 @@ public async void RunStarted(object automationObject, Dictionary<string, string>
AddReplacementsDictionary(replacementsDictionary);

#region Libs
// Assuming package list is passed via a custom parameter in the .vstemplate file
if (replacementsDictionary.TryGetValue("$NuGetPackages$", out string packages))
{
_nuGetPackages = new();
var basePackages = packages.Split(';').Where(p => !string.IsNullOrEmpty(p));
foreach (var baseItem in basePackages)
{
_nuGetPackages.Add(new Library(baseItem, WizardConfig.UsePreReleaseVersion));
}
}

foreach (var lib in WizardConfig.LibraryDic.Values)
{
_nuGetPackages?.Add(new Library(lib.Name, lib.IncludePreRelease));
Expand Down Expand Up @@ -489,6 +478,19 @@ private void AddReplacementsDictionary(Dictionary<string, string> replacementsDi
replacementsDictionary.Add("$AppUpdateConfig$", "");
}
#endregion

#region Libs
// Assuming package list is passed via a custom parameter in the .vstemplate file
if (replacementsDictionary.TryGetValue("$NuGetPackages$", out string packages))
{
_nuGetPackages = new();
var basePackages = packages.Split(';').Where(p => !string.IsNullOrEmpty(p));
foreach (var baseItem in basePackages)
{
_nuGetPackages.Add(new Library(baseItem, WizardConfig.UsePreReleaseVersion));
}
}
#endregion
}
public bool ShouldAddProjectItem()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="DevWinUI_Template.18eb89b1-bd1f-4e22-9196-6ea05b8ca61d" Version="11.5.0" Language="en-US" Publisher="Mahdi Hosseini" />
<Identity Id="DevWinUI_Template.18eb89b1-bd1f-4e22-9196-6ea05b8ca61d" Version="11.5.1" Language="en-US" Publisher="Mahdi Hosseini" />
<DisplayName>DevWinUI Templates for WinUI</DisplayName>
<Description xml:space="preserve">DevWinUI Project Template, help you quickly create a new WinUI 3 App with DevWinUI and MVVM Packages. We prepare your project with the following features: NavigationView, Custom TitleBar, HomeLandingPage and Settings Page (with Theme settings).
We also always use the latest version of WindowsAppSDK.
Expand Down

0 comments on commit d907f9c

Please sign in to comment.