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 detect Visual Studio if installed by admin user and never launched by normal user #62

Open
sgtcoolguy opened this issue Dec 13, 2016 · 5 comments

Comments

@sgtcoolguy
Copy link
Contributor

If I install Visual Studio 2015 as an Administrator, windowslib detects the install and emulators fine. If I switch over to a normal user account that can run Visual Studio but hasn't yet - it does not detect Visual Studio. Once I run it one time, it will generate the registry key we're searching for and find the VS install - but will not find the emulators.

It looks like it's because we're searching for a registry key ending in "_Config" which is generated by the install for the installing user, or on first run for other users. I'm not sure we need that registry entry for the most important data needed by the detection code. Specifically, it seems that we can grab the install directory via another registry key that's always there for VS 2015+.

HKLM\Software\Wow6432Node\Microsoft\VisualStudio\14.0

For older versions, I don't think it contains the data we need.

@sgtcoolguy
Copy link
Contributor Author

I'm just guessing here, but it appears that the emulator issue is because we can't build our special stool binary. Specifically, this FIXME here looks to be the root cause: https://github.com/appcelerator/windowslib/blob/master/lib/wptool.js#L486

The normal user account I have doesn't have rights to modify the windowslib/wptool/wptool.csproj file. We could easily modify the code to write the modified file to $HOME and update the reference to use that copy when we build.

The other issue is not having rights to copy the resulting binary exe to windowslib/wptool/bin. I'm not sure there's any way around this other than modifying the permissions to that folder to allow normal Users to write to it.

@sgtcoolguy
Copy link
Contributor Author

Hmm, maybe permissions for the a-tool build isn't the issue? I think I was looking in the wrong windowslib copy. I did find a wptool.exe int he SDK's windowslib, ran it as the Admin account and could enumerate devices. When I ran it as the normal user, it throws a file not found exception for the datastore it attempts to connect to. The issue is that I have no idea what file or files it's attempting to load here, so I don't know if I can simply upgrade the normal user account's permissions to read those?

@sgtcoolguy
Copy link
Contributor Author

I should note that I added the normal user to the Administrators group and that didn't help any.

@sgtcoolguy
Copy link
Contributor Author

screen shot 2016-12-13 at 11 28 08 am

@sgtcoolguy
Copy link
Contributor Author

Turns out this is a not uncommon issue with Visual Studio? http://stackoverflow.com/questions/28354388/visual-studio-2015-missing-emulators

I ended up having to wipe C:\Users\build\AppData\Local\Microsoft\Phone Tools\CoreCon\12.0. Then I launched Visual Studio with a universal app and the emulator listing showed. Then verified titanium could find them as well.

I'll have to investigate to see if I need to open VS2015 at all to fix the issue...

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

1 participant