tags:

views:

351

answers:

2

Hi,

I am writing an msbuild file to run tests using galio.Now, I need to give

<UsingTask AssemblyFile="..\dll\Gallio.MSBuildTasks.dll" TaskName="Gallio" />

This does not work, when I give full path c:\program file\galio\bin,it works.But, I want to give path to my dll folder in source control where Gallio.MSBuildTasks.dl is located.How to do this?

A: 

Make sure that you are writing correctly the relative path "..\dll\Gallio.MSBuildTasks.dll". I've tried this and i had no problems in specifying relative paths to my dll's. If the path is not correct you should get an error stating this when you run the build file. If it won't work you can post the error that you get when you use the relative path.

Adrian Faciu
(RunTests target) -> F:\project\trunk\prj\bll\runtests.prj(15,9): error : An unexpected error occurred during execution of the Gallio task. F:\project\trunk\prj\bll\runtests.prj(15,9): error : RuntimeException: Could not resolve component for service type 'Gallio.Runner.Projects.ITestProjectManager' because there do not appear to be any components registered and enabled for that service type.\rF:\project\trunk\prj\bll\runtests.prj(15,9): error : at Gallio.Runtime.Extensibility.RegistryServiceLocator.ResolveNonDisabledDescriptor(Type serviceType)\r
junky_user
+1  A: 

Is he path relative to what? Probobly not to where you are executing msbuild from. If the path is relative to where you MSBuild file is, try to concat the relative path to the MSBuild File path:

<PropertyGroup>
   <AssemblyFileName>$(MSBuildProjectDirectory)\..\dll\Gallio.MSBuildTasks.dll</AssemblyFileName>
</PropertyGroup>
<UsingTask AssemblyFile="&(AssemblyFileName)" TaskName="Gallio" />

Did it help?

sagie
actually the MSbuild file is in a folder called Tests.The dll folder is one hierarchy above this folder
junky_user