Adam's Lair Forum

game development and casual madness
It is currently 2019/09/17, 15:21

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 2013/09/19, 08:47 
Newbie
Newbie

Joined: 2013/09/19, 08:36
Posts: 2
Role: Hobbyist
I've installed Visual Studio Express, and got started in Duality using the tutorial (with the spacey background and spacey ship), but when I got to the "open sourcecode" step, I've encountered a problem: when clicking the "open sourcecode" button in Duality, I get the following error in a dialog box: "Could not find an appropriate application to open the file."

it appears to be a Visual Studio error, as the taskbar button has the purple infinity-ish Visual Studio icon.

I tried googling this exact error message, and found _nothing_ (well, a single page: "OpenNMS® Installation Guide", which seems completely unrelated, and doesn't even contain the message >_>)

I poked around in the demo project's directory - specifically, Source\Code\, and found files named "ProjectPlugins.sln" and "ProjectPlugins.suo". they have Visual Studio icons, but double-clicking ProjectPlugins.sln yields that same error. double-clicking ProjectPlugins.suo pops up Windows' usual "I dunno what to open this with" dialog.

so a few things, I guess:
1. this seems like maybe a bug with Visual Studio? maybe my install is messed up, somehow?
2. maybe it is a bug with Dualitor? are there any error logs or any other useful information I can give you?
3. regardless, it seems like I should be able to work around this pretty easily, by opening up some specific file from within Visual Studio itself? can you provide any direction there? I have not worked with Visual Studio before (though I have used Xamarin, Eclipse, and other IDEs, so I assume it should be pretty easy to figure out; I may even figure it out before anyone gets back to me, but for now I need to sleep :P)

finally, thanks: this looks like a pretty cool engine! I poked at Unity a little (a very little!), and the interface reminds me a bit of that, but for 2D - even better, in my opinion! :) 'definitely looking forward to playing with it more!


Top
 Profile  
 
PostPosted: 2013/09/19, 15:51 
Newbie
Newbie
User avatar

Joined: 2013/07/18, 04:29
Posts: 8
Role: Hobbyist
I had the same problem. The problem is that the default application to open the Visual Studio project files is a version chooser which acts a bit odd. Try right-clicking on the .sln file, go to Open with>Choose Default Program. You will want to find your version of Visual Studio and make sure the check box is checked that says always use this program to open this type of file. That should fix it for all of Duality.


Top
 Profile  
 
PostPosted: 2013/09/19, 16:17 
Newbie
Newbie

Joined: 2013/09/19, 08:36
Posts: 2
Role: Hobbyist
awesome, thanks! that does it!

(so is this a bug to maybe report to Microsoft?)

I did also poke around in Visual Studio and find an .sln to open that let me continue with the demo, but this solution is obviously preferable. thanks again :)


Top
 Profile  
 
PostPosted: 2013/09/19, 22:54 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
It's probably a bug in Dualitor that somehow fails to generate an .sln file that Visual C# Express is able to parse. Can download Duality into a separate folder, hit that button again, and then pack the Source/Code folder in order to upload it somewhere? I'd really like to check what Dualitor does there, but I don't seem to be able to reproduce it on my machine :S

Other questions:
  • What operating system do you run?
  • What version of Visual Studio do you have installed? Express? Professional? 2010? 2012?

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2013/10/09, 16:25 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
I am posting here because I didn't find a way to upload zip files in github comments.

I have checked around the source to see how you determine which version of VS is installed. This is what I found in my tests:

    Windows 7 32bit + clean install of VS2012 Express for Windows Desktop
Code:
HKLM\SOFTWARE\Microsoft\VisualStudio\10.0
HKLM\SOFTWARE\Microsoft\VisualStudio\11.0
HKLM\SOFTWARE\Microsoft\VisualStudio\8.0
HKLM\SOFTWARE\Microsoft\VisualStudio\Debugger
HKLM\SOFTWARE\Microsoft\VisualStudio\SxS
and
Code:
HKLM\SOFTWARE\Microsoft\VisualStudio\11.0\Setup\Finalizers
HKLM\SOFTWARE\Microsoft\VisualStudio\11.0\Setup\Microsoft Visual Studio Express 2012 for Windows Desktop
HKLM\SOFTWARE\Microsoft\VisualStudio\11.0\Setup\Microsoft Visual Studio Express 2012 for Windows Desktop - ITA
HKLM\SOFTWARE\Microsoft\VisualStudio\11.0\Setup\Microsoft Visual Studio Ultimate 2012 XAML UI Designer Core
HKLM\SOFTWARE\Microsoft\VisualStudio\11.0\Setup\Microsoft Visual Studio Ultimate 2012 XAML UI Designer ita Resources
HKLM\SOFTWARE\Microsoft\VisualStudio\11.0\Setup\VC
HKLM\SOFTWARE\Microsoft\VisualStudio\11.0\Setup\VS


    Windows XP SP3 32bit + clean install of Visual C# 2010 Express
Code:
HKLM\SOFTWARE\Microsoft\VisualStudio\10.0
HKLM\SOFTWARE\Microsoft\VisualStudio\9.0
HKLM\SOFTWARE\Microsoft\VisualStudio\SxS
and
Code:
HKLM\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\Microsoft Visual C# 2010 Express - ENU


    Windows 7 64bit + VS2010 Professional (this is my development pc.. might be a bit more messy than the other two :D)
Code:
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\10.0
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\10.0Exp
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\7.0
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\7.1
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\8.0
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\9.0
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\Debugger
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\SxS
and
Code:
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\F#
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\Microsoft Visual Studio 2010 Express for Windows Phone - ENU
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\Microsoft Visual Studio 2010 Professional - ITA
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\VC
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\VC#
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\Visual Studio 2010 Prerequisites - English
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\VS
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\WEBPROJ
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\WorkflowPROJ


Unfortunately it seems you can't base on 10.0 or 11.0 alone to determine if it's not an Express Edition, only what is the major revision of VS.
In addition, seems that you will find a HKLM\...\Setup\Microsoft Visual Studio ... only for the version that corresponds to the VS installed (10.0 = 2010, 11.0 = 2012) but I hope that there is a better way than parsing literals.

Attached are the 2 solutions generated by the Editor with VS2010 Express and VS2012 Express.

In addition I tried changing "Visual Studio 2010" to "Visual C# Express 2010" in the solution file with the following results:

VS2010 Express: works, skipping the version selector
VS2010 Professional: works
VS2012 Express: doesn't work

Hope it was helpful.

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
PostPosted: 2013/10/09, 19:47 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
Whoa. That's what I call a good bug report. :D

Obviously, the current code for detecting which Visual Studio edition to expect isn't working - your registry excerpts show that clearly. Unfortunately, despite a lot of google research and registry digging, I haven't found a reliable solution to this problem yet, so I've submitted a temporary "workaround" that disables version checking. Instead of trying to provide the appropriate solution type, Duality will now always provide a Visual C# Express 2010 Solution and let Visual Studio itself do the conversion work.

What worries me though is that Visual Studio 2012 Express doesn't seem to like Visual C# 2010 Express very much. My expectation would be a "convert solution" dialog popping up, but your test results show that Visual Studio will simply refuse to open them.

This issue still needs to be resolved.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2013/10/09, 20:22 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
I have checked the source code again, and I am not sure that there is nothing that could be done..

What doesn't ring well for me in your code is that you have a single VisualStudioEdition in charge of bringing back the correct VS version information in order to generate the solution file, and that it only distinguishes between Express and other version, while the main difference that should be taken in to account seems to be between major versions (2010 - 2012.. is there really a need to try to manage older versions?) rather than Express - non Express.

Given what we found in the registry keys, I think that you could skip that part but you could still use visualStudioVersion (lines 89-93) to at least differentiate between VS2010 (in which case you can generate a Visual C# 2010 Express solution) and VS2012 (VS2012 Express solution.. if the behavior is consistent, it should be opened also by non-Express versions).

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
PostPosted: 2013/10/09, 21:35 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
Yes, distinguishing between 2012 Express and 2010 Express should be possible, although it won't solve the issue - merely bring another (but better) workaround into place. I've looked at my own registry, your excerpts and several examples from the internet, but haven't yet identified a fully reliable pattern. The issue certainly can be fixed and I have a diffuse idea on how to do that - but it will need more investigation, which will have to be done first.

Unfortunately, the time I can invest into Duality is quite limited right now. Which more or less is the bottleneck here. :S

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2013/10/10, 10:54 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
I understand it's not exactly the definition of "automatic", but maybe it would be better / easier to manage (I have checked around as well, and it seems that every single version of VS has its own different path and keys in the registry) to let the user select the version of Visual Studio currently installed from a list the first time the solution is generated?
The editor could then only suggest the version it thinks is installed on the system, but still let the user confirm or choose another one.

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
PostPosted: 2013/10/10, 11:03 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
Sounds like a decent solution to me. Maybe a popup dialog when generating the solution file for the first time, which could be reached manually via submenu of the "Open Source Code" button.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group