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
{{ message }}
Repository navigation
Missing VisualRust Project/Item Templates. (Originally: Installed. And Now?) #283
I installed VisualRust via the latest msi installer from AppVeyor. It has been installed successfully, but if I open Visual Studio, I can't see any Templates for Rust if I open the project wizard.
I can open the file itself, I can open any file with Visual Studio... However, if I force to open the folder (where the Cargo.toml resides), it opens up, but it doesn't offer any Rust-ish tools/features, such as debugging, syntax highlighting and autocompletion.
I'm currently trying to use the Rust plugin with VS 2017 and still had a rsproj lying around (I think I tested the Rust plugin with VS 2015, which I do not have installed anymore ... I honestly don't know how I created that file 😆). It looks like this (perhaps you need to generate a unique guid, when you are trying to use it different projects):
With this I could load the project, but the build hangs. Auto-completion worked only for local variables. I'll try to look further into it, when I have the time.
it opens up, but it doesn't offer any Rust-ish tools/features, such as debugging, syntax highlighting and autocompletion. i can confirm (partly). debugging with rust doesnt work, autocompletion,too. furthermore, git doesnt really work.
After following the steps described by @CountOmega the solution opens. It looks like VS understands it's a Rust project. I had to enable "Show All Files" to see the project files... Also as described by @CountOmega all other features don't work.
vs always wants to save a sln in addition to rsproj after code edits if you close vs but you have to delete it otherwise your not able to open rsproj later
so you are forced to debug with rustup using the vs developer command prompt @echo off cd C:\Users\Count Omega\Documents\Visual Studio 2017\Projects\Inventar C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat cls
batch script for debugging if it helps
When attempting to build master ( f005c24 ) myself, I've noticed that src/VisualRust/VisualRust.projitems appears to incorrectly reference the templates, which may be related. This is my fix:
Ahh - from that snippet you can also see the project and item templates were previously only included in Debug builds, whereas AppVeyor is only doing Release builds. I've created a fix for this in #286 .
Same here. Installed latest build from AppVeyor on 2017, but no project template appeared. Then I created rsproj manually and pasted @denis-golubev 's xml and it worked. It compiles and runs, but under debugger it just fails first time:
1>Target "BeforeBuild" in file "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\VisualRust\VisualRust.Core.targets":
1>Done building target "BeforeBuild" in project "hello_world.rsproj".
1>Target "BeforeCompile" in file "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\VisualRust\VisualRust.Core.targets":
1>Done building target "BeforeCompile" in project "hello_world.rsproj".
1>Target "CoreCompile" in file "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\VisualRust\VisualRust.Rust.targets":
1> Using "CargoBuild" task from assembly "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\VisualRust\\VisualRust.Build.dll".
1> Task "CargoBuild"
1> Task Parameter:ManifestPath=Cargo.toml
1> Task Parameter:Release=False
1> Running cargo in directory D:\Rust\hello_world
1> C:\Users\Alex\.cargo\bin\cargo.exe build --message-format json
1> MSBUILD : error MSB4166: Child node "2" exited prematurely. Shutting down. Diagnostic information may be found in files in the temporary files directory named MSBuild_*.failure.txt.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
But starts debug successfully if you run it again.
And autocomplete is not working (perhaps I didn't install something? But I ran rustup component add rust-src).
Activity
werdahias commentedon May 31, 2017
same problem. loading shows a possibility of .rsproj but you cant create it
Boddlnagg commentedon May 31, 2017
Can you open a
Cargo.tomlfile? There should also be templates in the wizard, though ...ioncodes commentedon May 31, 2017
I can open the file itself, I can open any file with Visual Studio... However, if I force to open the folder (where the Cargo.toml resides), it opens up, but it doesn't offer any Rust-ish tools/features, such as debugging, syntax highlighting and autocompletion.
denis-golubev commentedon May 31, 2017
I'm currently trying to use the Rust plugin with VS 2017 and still had a rsproj lying around (I think I tested the Rust plugin with VS 2015, which I do not have installed anymore ... I honestly don't know how I created that file 😆). It looks like this (perhaps you need to generate a unique guid, when you are trying to use it different projects):
With this I could load the project, but the build hangs. Auto-completion worked only for local variables. I'll try to look further into it, when I have the time.
werdahias commentedon May 31, 2017
seems to work
ioncodes commentedon May 31, 2017
@denis-golubev How can I open the rsproj file? It isn't recognized by VS
werdahias commentedon May 31, 2017
new text document-> enter it select standord opening program vs
werdahias commentedon May 31, 2017
it opens up, but it doesn't offer any Rust-ish tools/features, such as debugging, syntax highlighting and autocompletion. i can confirm (partly). debugging with rust doesnt work, autocompletion,too. furthermore, git doesnt really work.
ioncodes commentedon Jun 1, 2017
After following the steps described by @CountOmega the solution opens. It looks like VS understands it's a Rust project. I had to enable "Show All Files" to see the project files... Also as described by @CountOmega all other features don't work.
werdahias commentedon Jun 1, 2017
Cargo.toml can be opened and edited, though. But working with it is really tricky.
werdahias commentedon Jun 1, 2017
Biuld configurations cant be edited, too.
werdahias commentedon Jun 1, 2017
It seems that line numbers arent really visible whilst using rust. I had to switch to on manually.
werdahias commentedon Jun 1, 2017
vs always wants to save a sln in addition to rsproj after code edits if you close vs but you have to delete it otherwise your not able to open rsproj later
werdahias commentedon Jun 2, 2017
only a few key words are highlighted e.g. mut let pub. String and comments, too. but other rustish word like use blalba arent highlighted.
werdahias commentedon Jun 2, 2017
so you are forced to debug with rustup using the vs developer command prompt
@echo off cd C:\Users\Count Omega\Documents\Visual Studio 2017\Projects\Inventar C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat clsbatch script for debugging if it helps
MaulingMonkey commentedon Jul 1, 2017
When attempting to build master ( f005c24 ) myself, I've noticed that src/VisualRust/VisualRust.projitems appears to incorrectly reference the templates, which may be related. This is my fix:
I can't spot the corresponding errors in AppVeyor, no idea what the build difference is, but this might be related to the templates being missing.
MaulingMonkey commentedon Jul 1, 2017
Ahh - from that snippet you can also see the project and item templates were previously only included in Debug builds, whereas AppVeyor is only doing Release builds. I've created a fix for this in #286 .
[-]Installed. And Now?[/-][+]Missing VisualRust Project/Item Templates. (Originally: Installed. And Now?)[/+]Pzixel commentedon Oct 7, 2017
Same here. Installed latest build from AppVeyor on 2017, but no project template appeared. Then I created
rsprojmanually and pasted @denis-golubev 's xml and it worked. It compiles and runs, but under debugger it just fails first time:But starts debug successfully if you run it again.
And autocomplete is not working (perhaps I didn't install something? But I ran
rustup component add rust-src).werdahias commentedon Oct 7, 2017
Using this fix Autocompletion feature works, but building still crashes.