Code Monkey home page Code Monkey logo

Comments (8)

MaulingMonkey avatar MaulingMonkey commented on July 4, 2024 1

Ahh, sorry, I've just noticed that the logic is different in Visual Rust 1.2.0 - it doesn't support CARGO_HOME: https://github.com/PistonDevelopers/VisualRust/blob/0.1.2/VisualRust.Shared/Environment.cs

Setting MULTIRUST_HOME to your .cargo path might work, or there are some earlier workarounds with registry keys: #263 . Alternatively, grab the trunk version from https://ci.appveyor.com/project/vosen/visualrust/build/artifacts (or follow the Readme's appveyor links).

from visualrust.

MaulingMonkey avatar MaulingMonkey commented on July 4, 2024

Here is where installation paths that get checked are enumerated:

public static IEnumerable<string> GetAllInstallPaths()
{
if (System.Environment.Is64BitOperatingSystem)
{
return GetInstallRoots(RegistryHive.CurrentUser, RegistryView.Registry64)
.Union(GetInstallRoots(RegistryHive.CurrentUser, RegistryView.Registry32))
.Union(new string[] { GetMultirustInstallRoot(), GetRustupInstallRoot() })
.Union(GetInstallRoots(RegistryHive.LocalMachine, RegistryView.Registry64))
.Union(GetInstallRoots(RegistryHive.LocalMachine, RegistryView.Registry32))
.Union(GetInnoInstallRoot());
}
else
{
return GetInstallRoots(RegistryHive.CurrentUser, RegistryView.Registry32)
.Union(new string[] { GetMultirustInstallRoot(), GetRustupInstallRoot() })
.Union(GetInstallRoots(RegistryHive.LocalMachine, RegistryView.Registry32))
.Union(GetInnoInstallRoot());
}
}

static string GetRustupInstallRoot()
{
// rustup.rs installs into %CARGO_HOME%\bin\ and %CARGO_HOME% defaults to %USERPROFILE%\.cargo\
string cargoHome = System.Environment.GetEnvironmentVariable("CARGO_HOME");
if (String.IsNullOrEmpty(cargoHome))
{
string userprofile = System.Environment.GetFolderPath(System.Environment.SpecialFolder.UserProfile);
return Path.Combine(userprofile, ".cargo");
}
return cargoHome;
}

Might just need to set CARGO_HOME appropriately.

from visualrust.

dzmitry-lahoda avatar dzmitry-lahoda commented on July 4, 2024

Same for me with rust 1.20 on Windows 10 64bit Visual Studio 2015.

I have set CARGO_HOME to C:\Users\dzmitry_lahoda\.cargo, but still have and issues.

from visualrust.

dzmitry-lahoda avatar dzmitry-lahoda commented on July 4, 2024

Latest installation for 2015

9/16/2017 4:49:56 PM - Microsoft VSIX Installer
9/16/2017 4:49:56 PM - -------------------------------------------
9/16/2017 4:49:56 PM - vsixinstaller.exe version:
9/16/2017 4:49:56 PM - 15.0.26209.1 built by: D15REL
9/16/2017 4:49:56 PM - -------------------------------------------
9/16/2017 4:49:56 PM - Command line parameters:
9/16/2017 4:49:56 PM - C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe,/admin,/logFile:C:\Users\DZMITR~1\AppData\Local\Temp\Visual_Rust_for_Visual_Studio_2015_20170916164815_002_VSIXBootstrapper.log,C:\ProgramData\Package Cache\9864EE5369359DB622D0234B6C6B7640B949140C\VisualRust.vsix
9/16/2017 4:49:56 PM - -------------------------------------------
9/16/2017 4:49:56 PM - Microsoft VSIX Installer
9/16/2017 4:49:56 PM - -------------------------------------------
9/16/2017 4:49:58 PM - Initializing Install...
9/16/2017 4:49:59 PM - Microsoft.VisualStudio.ExtensionManager.InvalidExtensionPackageException: The file is not a valid VSIX package.
   at Microsoft.VisualStudio.ExtensionManager.InstallableExtensionImpl.ReadVSIXManifestFromPackage(Stream stream, CultureInfo preferredCulture)
   at Microsoft.VisualStudio.ExtensionManager.InstallableExtensionImpl..ctor(String path, CultureInfo preferredCulture)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.CreateInstallableExtension(String extensionPath, CultureInfo preferredCulture)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.CreateInstallableExtension(String extensionPath)
   at VSIXInstaller.App.GetInstallableData(String vsixPath, Boolean isRepairSupported, IEnumerable`1& skuData)
   at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
   at VSIXInstaller.App.Initialize()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

I have installed VS 2017 Pro and latest plugin. No install errors, but no templates in New Project.

from visualrust.

dzmitry-lahoda avatar dzmitry-lahoda commented on July 4, 2024

MULTIRUST_HOME seems deprecated.

from visualrust.

MaulingMonkey avatar MaulingMonkey commented on July 4, 2024

There's an unmerged pull request to fix the templates and other issues: #286

from visualrust.

ekardnam avatar ekardnam commented on July 4, 2024

Any news on this Issue, I'm having the same problem, even after setting the CARGO_HOME
Need any help fixing this?

from visualrust.

seechov avatar seechov commented on July 4, 2024

Solution from this bug helped me.
Solution. Create file rust-win.reg with similar content (replace TODO_Place_your_username_here to your actual path.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla Foundation\Rust\1.66.0]
"InstallDir"="C:\\Users\\TODO_Place_your_username_here\\.cargo\\"

Then run it by double-clicking on the file.

from visualrust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.