简体   繁体   中英

How can I change the user path for .NET?

After changing my username and user path (eg /Users/) in OSX settings, when I try to use the do.net command to install a package like do.net new --install CelesteMod.Templates I get the following error:

[2023-01-18 16:09:16.528] [Debug] [Microsoft.TemplateEngine.Edge.Installers.NuGet.NuGetInstaller] => [Execute]: Uninstalling CelesteMod.Templates::1.0.2 failed. Details:System.IO.DirectoryNotFoundException: Could not find a part of the path '/Users/<old username>/.templateengine/packages/CelesteMod.Templates.1.0.2.nupkg'.
   at System.IO.FileSystem.DeleteFile(String fullPath)
   at Microsoft.TemplateEngine.Edge.Installers.NuGet.NuGetInstaller.UninstallAsync(IManagedTemplatePackage templatePackage, IManagedTemplatePackageProvider provider, CancellationToken cancellationToken)
Failed to install CelesteMod.Templates::1.0.2, the template package is invalid.

It seems like the issue lies within the .NET/NuGet template engine cache since it doesn't automatically update for some reason. I just deleted the ~/.templateengine/ folder recursively and re-downloaded all my templates using do.net new from the CLI.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM