Adam's Lair Forum

game development and casual madness
It is currently 2018/08/16, 07:57

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Can't run in VS2015
PostPosted: 2016/11/12, 10:35 
Member
Member

Joined: 2016/10/14, 01:05
Posts: 71
Role: Hobbyist
Hi there,

For some reason I can't get my code to start from VS2015, and none of the breakpoints that I am setting work.

When I try, I get a form saying that a Project with an Output Class of type DLL cannot be started directly.

I understand what that means, but not quite how to fix it.

I have two solutions in the project, one a hashed version of the camera controller sample, and then my own code in another project.

Any clues?

Thanks.

JB


Top
 Profile  
 
 Post subject: Re: Can't run in VS2015
PostPosted: 2016/11/12, 11:53 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2055
Location: Germany
Role: Professional
When Duality sets up a new project, it configures it in a way that running the debugger actually runs the launcher. However, as the msbuild / csproj format is quite complex and has lots of ways to override this, it is possible that you or VS accidentally replaced this behavior.

You can manually configure the VS solution to do the same as before though: Right-click on the project you want to start and set it as startup project. Then open its properties and navigate to the Run or Debugger tab. As a startup application, select the launcher of your project, and as a working directory, select the directory it is located in.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
 Post subject: Re: Can't run in VS2015
PostPosted: 2016/11/13, 02:06 
Member
Member

Joined: 2016/10/14, 01:05
Posts: 71
Role: Hobbyist
Hi Adam

I tried this but the Properties Tab only has Library, Build, Build Events, Resources, Reference Paths, Signing and Code Analysis...

JB


Top
 Profile  
 
 Post subject: Re: Can't run in VS2015
PostPosted: 2016/11/13, 09:40 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2055
Location: Germany
Role: Professional
When I do this in Visual Studio Community 2013, there is a "Debug" tab. This is where you configure startup behavior.

Image

Maybe it's called differently in your VS version, but I'm pretty sure it's there in one form or another. Which VS version are you using?

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
 Post subject: Re: Can't run in VS2015
PostPosted: 2016/11/13, 10:17 
Member
Member

Joined: 2016/10/14, 01:05
Posts: 71
Role: Hobbyist
I am using VS2015

And inside my Visual Studio project I have no access to the Duality Editor Project - your image seems to show access to the Editor...

There is certainly no Tab that looks anything like the one you posted.

Still trying to figure out how to put images in here.. it would appear I have to upload to the web, then copy a URL???

I managed to attach the Debugger to the project as per your post on Discord so I have sort of got round the problem. Not quite sure how everything became disconnected.

Jb


Top
 Profile  
 
 Post subject: Re: Can't run in VS2015
PostPosted: 2016/11/13, 11:49 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2055
Location: Germany
Role: Professional
MightBeABitLate wrote:
I am using VS2015

Which one? Community, or one of the other versions?

MightBeABitLate wrote:
And inside my Visual Studio project I have no access to the Duality Editor Project - your image seems to show access to the Editor...

No no, that's just as an example. You do this with the game project / plugin you're developing!

MightBeABitLate wrote:
Still trying to figure out how to put images in here.. it would appear I have to upload to the web, then copy a URL???

You can use an image hosting service, imgur being one example, but there are tons of others. Just pick one you like ^^

Can you upload an image of what the project properties look like in your case?

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
 Post subject: Re: Can't run in VS2015
PostPosted: 2016/11/13, 18:25 
Member
Member

Joined: 2016/10/14, 01:05
Posts: 71
Role: Hobbyist
VS 2015 Community Edition

http://imgur.com/a/SDCQa

JB

Can't get the image to show so I've put it in as a link - sorry!


Top
 Profile  
 
 Post subject: Re: Can't run in VS2015
PostPosted: 2016/11/13, 18:43 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2055
Location: Germany
Role: Professional
Just checked and it appears that VS does not allow you to configure this for PCL projects? Sorry - I was pretty sure there had to be that option! :eh:

As a workaround, open your project's .csproj file with a text editor and insert the following blocks above the first PropertyGroup:

Code:
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
    <StartAction>Program</StartAction>
    <StartProgram>$(SolutionDir)..\..\DualityLauncher.exe</StartProgram>
    <StartWorkingDirectory>$(SolutionDir)..\..</StartWorkingDirectory>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
    <StartAction>Program</StartAction>
    <StartProgram>$(SolutionDir)..\..\DualityLauncher.exe</StartProgram>
    <StartWorkingDirectory>$(SolutionDir)..\..</StartWorkingDirectory>
  </PropertyGroup>


This should take care of it. It's the same block that Duality inserts initially to set it up.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
 Post subject: Re: Can't run in VS2015
PostPosted: 2016/11/13, 22:02 
Member
Member

Joined: 2016/10/14, 01:05
Posts: 71
Role: Hobbyist
Thank you Adam for that - I will give that a go and report back.

Thanks as always for your help.

JB


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 8 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