Good day!
It's very convenient for me to use NCrunch not only as test environment, but also as build environment, because of its shadow building. I really need "Browse to workspace" button somewhere on the toolbar. Could you do it as a minor change version - because I've just purchased NCrunch and I hope to see in that license.
Remco NCrunch Developer
#3089
03 Nov 2012 00:14 UTC
Hi, thanks for the suggestion!
Although adding a toolbar option is a fairly low risk/effort task, I'd first like to learn a bit more about the use case you're following to see if I can offer you something better.
Are you using the NCrunch workspaces to run an application that has been built by NCrunch? (i.e. testing your application though its UI)
Cheers,
Remco
Although adding a toolbar option is a fairly low risk/effort task, I'd first like to learn a bit more about the use case you're following to see if I can offer you something better.
Are you using the NCrunch workspaces to run an application that has been built by NCrunch? (i.e. testing your application though its UI)
Cheers,
Remco
>Are you using the NCrunch workspaces to run an application that has been built by NCrunch? (i.e. testing your application though its UI)
Yes, that's exactly what I'm doing. With NCrunch I'don need to build solution in VS(except loading forms designer). But going to Advanced->Workspace-> find executable takes time. What I need is something like F5 in VS.
Yes, that's exactly what I'm doing. With NCrunch I'don need to build solution in VS(except loading forms designer). But going to Advanced->Workspace-> find executable takes time. What I need is something like F5 in VS.
Remco NCrunch Developer
#3093
04 Nov 2012 22:24 UTC
I have an idea that may make this easier .. I'm wondering if you're keen to give it a try. If it works well for you, I may introduce it as a packaged feature.
The NCrunch workspaces aren't really designed with the intention of executing applications directly. Because they always end up in different places, and it can be hard to tell which workspace holds the latest files, you invariably need to rely on the 'browse to workspace' option via the Tests Window.
A way around this could be to make sure that a copy of the files always end up in a consistent place.
Create a directory on your disk - c:\temp\workingdir, then try adding the following build step to your UI project:
<PropertyGroup Condition="'$(NCrunch)' == '1'">
<PostBuildEvent>xcopy /Y *.* c:\temp\workingdir</PostBuildEvent>
</PropertyGroup>
... And ensure you have NCrunch configured to run post build events for this project. My assumption (if you're already running from the workspace) is that the project either works independently or you already have the 'Copy referenced assemblies to workspace' setting turned on. In this way, it should be fine to simply copy the files from this project as part of a build step. If you want to disable the 'Copy referenced assemblies to workspace' setting to improve performance, you can also place this build step against the dependency projects in your solution so that they are also copied into the temporary directory where they can be used by your UI.
In theory, the copying shouldn't interfere with parallel execution and should always leave you with a automatically built set of files stored in a consistent location on your disk. If you want to go a step further, you could always set up a shortcut from your start menu (or some kind of O/S hotkey tool) that will automatically launch the .EXE from the temporary directory. This would be about as close to F5 as you can get.
Anyway I'm eager to hear if this works for you. If so, I may be able to make a more formal approach built into the tool.
Cheers,
Remco
The NCrunch workspaces aren't really designed with the intention of executing applications directly. Because they always end up in different places, and it can be hard to tell which workspace holds the latest files, you invariably need to rely on the 'browse to workspace' option via the Tests Window.
A way around this could be to make sure that a copy of the files always end up in a consistent place.
Create a directory on your disk - c:\temp\workingdir, then try adding the following build step to your UI project:
<PropertyGroup Condition="'$(NCrunch)' == '1'">
<PostBuildEvent>xcopy /Y *.* c:\temp\workingdir</PostBuildEvent>
</PropertyGroup>
... And ensure you have NCrunch configured to run post build events for this project. My assumption (if you're already running from the workspace) is that the project either works independently or you already have the 'Copy referenced assemblies to workspace' setting turned on. In this way, it should be fine to simply copy the files from this project as part of a build step. If you want to disable the 'Copy referenced assemblies to workspace' setting to improve performance, you can also place this build step against the dependency projects in your solution so that they are also copied into the temporary directory where they can be used by your UI.
In theory, the copying shouldn't interfere with parallel execution and should always leave you with a automatically built set of files stored in a consistent location on your disk. If you want to go a step further, you could always set up a shortcut from your start menu (or some kind of O/S hotkey tool) that will automatically launch the .EXE from the temporary directory. This would be about as close to F5 as you can get.
Anyway I'm eager to hear if this works for you. If so, I may be able to make a more formal approach built into the tool.
Cheers,
Remco
Thanks, it worked! However my proposal is to save original VisualStudio variables like $SolutionDir, so that I can get path to solution and set up relative paths. It's inconvenient to set up separate directory for each solution I have.
Remco NCrunch Developer
#3096
05 Nov 2012 21:04 UTC
Great to hear! I have a backlog task planned for the 1.43 release that will involve adding a new environment variable to the NCrunch build process that points back to the original solution location - I think this is what you're asking for. I'd be very interested to hear how you've found this new file copying approach after a couple of weeks of using it ... as if it works well, I'd like to turn it into a packaged feature.
OK! Could you give me the details when 1.43 will be released? Would it be considered as "minor change version" so that I could use it in the limits of my license?
Edited 06 Nov 2012 06:41 UTC
Remco NCrunch Developer
#3104
06 Nov 2012 09:31 UTC
Absolutely. All decimal releases are minor and do not require a new license. The release date of 1.43 is variable at the moment, although I'm aiming to have the build ready about 3-4 weeks from now.
Post a reply
Log in to reply.