Use Visual Studio's selected project configuration rather than Debug

229 views
Skip to first unread message

Dominick O'Dierno

unread,
Feb 18, 2014, 4:31:52 PM2/18/14
to autot...@googlegroups.com
Hello, 

I am attempting to evangelize TDD among my fellow engineers at my company, and continuous testing is something that could really help with adoption would be a continuous test runner such as this, I gave it a shot on some home projects and I really like it.  Unfortunately due to enterprise restrictions at work none of our projects have a "Debug" project configuration, and therefore when I try to run Continuous Tests in "Build Changed Projects" mode I always get the following error:

Project: C:\mysolution\someproject.csproj

 

File: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets:line 609

 

Message:

: The OutputPath property is not set for project 'someproject.csproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Debug'  Platform='AnyCPU'.  You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [C:\mysolution\someproject.csproj] 


I have determined that it is because MSBuild is trying to build the project with the Debug configuration, which does not exist in our projects.

Is there a way to point it at a different configuration?

Svein Arne Ackenhausen

unread,
Feb 18, 2014, 5:04:17 PM2/18/14
to autot...@googlegroups.com
Hi,

Great to hear that the product brings value for you. To extend msbuild with additional configs like /property:Configuration:YourConfig. There are quite a few config options that you can specify directly in the configuration file (https://github.com/continuoustests/AutoTest.Net/blob/master/src/AutoTest.Core/AutoTest.config.template). For additional msbuild command line arguments use the MSBuildAdditionalParameters setting. To get to the config file go to ContinuousTests->Configuration->Solution and click the Open Configuration File option in the bottom left corner. This will open the config file for you to edit. Add the configuration and restart Visual Studio. If you enable logging you can see and verify the msbuild command line being run. The log file is located at C:\Users\you\appdata\local\mightymoose\debug.log. Hope this helps

-Svein Arne


--
Du mottar denne meldingen fordi du abonnerer på Google-gruppen «AutoTest.Net».
For å melde seg av denne gruppen og slutte å motta e-poster fra den, send en e-post til autotestnet...@googlegroups.com.
Du finner flere alternativer på https://groups.google.com/groups/opt_out.



--
Best regards
Svein Arne Ackenhausen

Blog - http://ackenpacken.blogspot.com/
Twitter - http://twitter.com/ackenpacken

Dominick O'Dierno

unread,
Feb 19, 2014, 12:35:03 AM2/19/14
to autot...@googlegroups.com, ac...@acken.no
Hey Svein Arne,

Thanks for the reply!

So far I have it half-working :-)

I added this to the config: <MSBuildAdditionalParameters>/p:Configuration:Local /p:Platform:AnyCPU /p:RunCodeAnalysis:false</MSBuildAdditionalParameters>

Now whenever I hit save the ContinuousTests Run Output window detects a change to the file and builds the project.  However it never finds any of the unit tests to run.  The tests are in a separate project in same solution file, so it should be finding and running them.  

Here is what I am trying to do:
I would like AutoTest to run only the affected tests based on the code I just changed when I save a code file.
I want it to build the projects with Configuration:Local and not run code analysis.

What I have so far, it automatically detects a changed file and builds the project, but does not run the tests.

Here is the config for the solution: 
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<mm-GraphProvider>BUILTINDARK</mm-GraphProvider>
<BuildExecutable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</BuildExecutable>
  <MSBuildAdditionalParameters>/p:Configuration:Local /p:Platform:AnyCPU /p:RunCodeAnalysis:false</MSBuildAdditionalParameters>
  <WhenWatchingSolutionBuildSolution>false</WhenWatchingSolutionBuildSolution>
</configuration>

Thank you again for your guidance,

-Dominick
Reply all
Reply to author
Forward
0 new messages