Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to open visual studio by double click #81

Open
yanek opened this issue Feb 20, 2018 · 2 comments
Open

Unable to open visual studio by double click #81

yanek opened this issue Feb 20, 2018 · 2 comments

Comments

@yanek
Copy link

yanek commented Feb 20, 2018

Hello,

I'm just installing Projeny (0.3.11 binary release) for the first time, and everything works as intended except for the fact that I cannot open any C# script by double clicking the file (in Unity) or an error pointing to it.

I followed the documentation to configure everything, and my VisualStudioIdePath is correctly set to 'E:/Bin/Microsoft Visual Studio/2017/Community/Common7/IDE/devenv.exe'.

Here's the message I get in the console:

Started OpenInVisualStudio with arguments: D:\Projeny\UnityProjects\TestProj\TestProj-Windows\Assets\LF_Main\UI\Scripts\Inventory.cs 0
Determined Project = TestProj, Platform = Windows
'Image Name'
See PrjLog.txt for more details
Operation completed with errors.  Took 0.0 seconds.
Error occurred!  Unable to open visual studio.

I checked PrjLog.txt multiple times, but it stays empty or contains messages regarding other operations.
Note that I can open VS2017 by going Projeny -> Packages Manager... -> Open Solution, and it works just fine.

Any help would be welcome.

@Gravetow
Copy link

Gravetow commented Feb 20, 2018

Hello Yanek!

Did you follow these instructions as well?

If you want to use the Projeny-generated visual studio solution as your primary editor, you can also set up Unity to use it by default. You can do this by doing the following:

Open Unity and go to Edit -> Preferences -> External Tools
Click the dropdown next to External Script Editor
Click Browse
Navigate to the install directory of Projeny (by default this is at C:\Program Files (x86)\Projeny) and select Bin/PrjOpenInVisualStudio.bat (note that you may have to select AllFiles in the bottom right dropdown)
Next to External Script Editor Args type "$(File)" "$(Line)"

Please make sure the External Script Editor Args type are set properly.

Other then that you might want to try to define the UnityExePath as well in your Projeny.yaml.
I had some issues getting the whole setup to work in the beginning too (because I had several unity versions installed) and addind the UnityExePath helped in my case.
I'm not sure if it will for you though!

@yanek
Copy link
Author

yanek commented Feb 21, 2018

Yep, I followed every instructions. I also tried to start .../Projeny/Bin/PrjOpenInVisualStudio.bat and even .../Projeny/Bin/Data/OpenInVisualStudio.exe directly from the Windows command line with valid arguments, and I got the same error message.

I also had some issues getting Projeny to work; I was not able to link packages from the asset store, and had to add UnityExePath early on the setup process. So everything should be fine on this side.

Here's the full Projeny.yaml file I am currently using:

PathVars:
    UnityExePath: 'E:/Bin/Unity/Editor/Unity.exe'
    UnityProjectsDir: '[ConfigDir]/UnityProjects'
    SharedUnityPackagesDir: '[ConfigDir]/UnityPackages'
    LogPath: '[ConfigDir]/PrjLog.txt'
    VisualStudioIdePath: 'E:/Bin/Microsoft Visual Studio/2017/Community/Common7/IDE/devenv.exe'

Could it be because Unity, VS2017 and Projeny are installed on a drive (E) while my projects and packages are on another one (D)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants