Thank you both for your comments. I have tried mapped drives and as Rob suggested it does not work :-(
I have also had a play with CASPOL and am trying to get this to work, I have 2 questions around this. 1. Do I need to set this up every time I run my tests or is it a one shot deal on the server ie it permanently defines the permission on the server in similar way to setting other security settings. 2. What is the -ag 1.2 I'm not sure I understand why 1.2 is used? Another alternative I may try if I can't get this working is to make my post compile script copy the assemblies to the local server. But I would rather crack the challenge of remote assemblies if possible :-) Thanks for your comments so far Rob On Jun 2, 5:26 pm, Rob Prouse <[email protected]> wrote: > I am pretty sure that mapping to a network drive will not work. I use > CASPOL for this. The following is an old BAT file I used to use which > should give you what you need with minor changes. > > @ECHO OFF > SET CASPOL=%windir%\Microsoft.NET\Framework\v2.0.50727\CasPol.exe > > REM > =========================================================================== > ============ > REM - Add full trust to the destination directory > REM > =========================================================================== > ============ > %CASPOL% -pp off > %CASPOL% -m -ag 1.2 -url > file://nas1/teamcity/test/trunk/thirdparty/tools/Gallio/* > FullTrust > > On Jun 2, 1:48 am, Jeff Brown <[email protected]> wrote: > > > The problem is that .net does not trust assemblies on shared folders > > out of the box. So loading an assembly from a unc path like \\nas\... > > will cause problems for many apps. > > > Two things to try: > > > 1. Map the network share to a drive. (Try to make the codebase look > > local so the local machine zone policy is used instead of the > > Internet / Intranet zone policy.) > > > 2. Investigate the use of the caspol tool. > > > In all honesty I do not remember the details of the code access > > security policy governing files loaded across machine boundaries. I > > do recall that the MSDN has articles on it. > > > Jeff > > > On Jun 1, 2009, at 10:33 PM, Rob Langley <[email protected]> wrote: > > > > Hi > > > > Got back to day to try and finish this installation. I have been > > > trying to resolve a new error which gets reported in Teamcity. Its > > > strange as I did not see this error last time when I built on VM's and > > > I'am not sure if I have missed something? If I have I can't work out > > > what I have missed this time. > > > > [06:25:39]: [Project "msbuildCfg.xml.teamcity.patch.tcprojx" (RunTests > > > target(s)):] \\nas1\teamcity\test\trunk\msbuildCfg.xml(15, 5): error > > > MSB4061: The "Gallio" task could not be instantiated from the assembly > > > "\\nas1\teamcity\test\trunk\thirdparty\tools\Gallio > > > \Gallio.MSBuildTasks.dll". > > > System.Security.SecurityException: That assembly does not allow > > > partially trusted callers. > > > at System.Security.CodeAccessSecurityEngine.ThrowSecurityException > > > (Assembly asm, PermissionSet granted, PermissionSet refused, > > > RuntimeMethodHandle rmh, SecurityAction action, Object demand, > > > IPermission permThatFailed) > > > at Gallio.MSBuildTasks.Gallio..ctor() > > > The action that failed was: > > > LinkDemand > > > The assembly or AppDomain that failed was: > > > Gallio.MSBuildTasks, Version=3.0.6.0, Culture=neutral, > > > PublicKeyToken=eb9cfa67ee6ab36e > > > The Zone of the assembly that failed was: > > > Internet > > > The Url of the assembly that failed was: > > > file://nas1/teamcity/test/trunk/thirdparty/tools/Gallio/ > > > Gallio.MSBuildTasks.dll > > > > The only difference is that the installation is now on physical > > > machines as opposed to Virtual Machines and the code is checked out to > > > a separate NAS. I also tried adding URL for the client of the machine > > > as a 'Trusted Site' via IE. > > > > Any ideas > > > > Thanks in Advance > > > > Rob > > > > On May 26, 7:07 am, Rob Langley <[email protected]> wrote: > > >> Jeff > > > >> I think my issues with setup are due to not being a 'real' > > >> developer :-). my back ground is infrastructure so I often need very > > >> clear instructions when it comes to compiling code, references etc > > >> etc > > > >> I initially made the assumption I did NOT need Gallio, my thinking > > >> was > > >> TeamCity would talk to MbUnit directly and Gallio was just the UI for > > >> MBunit if I were to run tests manually > > > >> My next assumption was that I only need the dll's and I guess this > > >> was > > >> because I did not understand the significance of the .plugins. > > > >> I had searched the web sites at teamcity, Gallio, MBUnit & Selnium > > >> but > > >> could not find anything to help me understand what I was missing, I > > >> was not even sure in which product the issue was. > > > >> The MbUnit document link gave me an error docs.mbunit.com and was a > > >> little frustrating. I hope to write an article on my blog on how I > > >> got all the components working. Once I have done this I will drop > > >> you > > >> a line and your welcome to either link to it or copy & paste it to > > >> your site with a small acknowledgement :-) > > > >> Perhaps I'll even do a short screen capture demonstrating the setup > > > >> Thanks > > > >> Rob > > > >> Having said > > > >> On May 25, 8:54 pm, "Jeff Brown" <[email protected]> wrote: > > > >>> If you have any suggestion as to how the packaging process can be > > >>> improved, > > >>> please let me know. > > > >>> This is a fairly common mistake for people new to Gallio. > > > >>> Jeff. > > > >>> -----Original Message----- > > >>> From: [email protected] [mailto:[email protected] > > >>> ] On > > > >>> Behalf Of Rob Langley > > >>> Sent: Monday, May 25, 2009 1:52 PM > > >>> To: MbUnit.User > > >>> Subject: MbUnit Re: Trying to join up the dots > > > >>> Thanks.... > > > >>> It now working... > > > >>> I had not copied any of the .plugin files. I had only copied the > > >>> dlls. > > > >>> Rob > > > >>> On May 24, 7:15 pm, Jeff Brown <[email protected]> wrote: > > >>>> The likely problem is that you have not copied all of the required > > >>>> Gallio plugins files to the build server in the selenium references > > >>>> folder. > > > >>>> Jeff > > > >>>> On May 24, 2009, at 10:45 AM, Rob Langley <[email protected]> > > >>>> wrote: > > > >>>>> Hi > > > >>>>> I love the idea of automated testing but an new to it all. Over > > >>>>> the > > >>>>> last few weeks I have had a play with Selenium and Teamcity in > > >>>>> isolation. Teamcity now builds and deploys my code to a test > > >>>>> server > > >>>>> and I have written a few simple tests in selenium that work when I > > >>>>> compile my code in Visual Studio. I'm now trying to but it > > >>>>> together > > >>>>> with MbUnit and am getting an error now. > > > >>>>> "C:\build\msbuildCfg.xml.teamcity.patch.tcprojx" (RunTests > > >>>>> target) (1) > > >>>>> -> > > >>>>> (RunTests target) -> > > >>>>> C:\build\msbuildCfg.xml(12,5): error : An unexpected error > > >>>>> occurred > > >>>>> during execution of the Gallio task. > > >>>>> C:\build\msbuildCfg.xml(12,5): error : RuntimeException: Could > > >>>>> not > > >>>>> resolve service of type Gallio.Runner.Reports.IReportManager. > > > >>>>> Below is my msbuildCfg.xml file which teamcity calls, which I have > > >>>>> copied from various postings on the net > > > >>>>> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003 > > >>>>> "> > > >>>>> <!-- This is needed by MSBuild to locate the Gallio task --> > > >>>>> <UsingTask AssemblyFile="selenium\referances > > >>>>> \Gallio.MSBuildTasks.dll" TaskName="Gallio" /> > > > >>>>> <!-- Specify the tests assemblies --> > > >>>>> <ItemGroup> > > >>>>> <TestAssemblies Include="selenium\bin\Debug\selenium.dll" /> > > >>>>> </ItemGroup> > > > >>>>> <Target Name="RunTests"> > > >>>>> <Gallio IgnoreFailures="false" Assemblies="@(TestAssemblies)" > > >>>>> RunnerExtensions="TeamCityExtension,Gallio.TeamCityIntegration"> > > >>>>> <!-- This tells MSBuild to store the output value of the > > >>>>> task's > > >>>>> ExitCode property into the project's ExitCode property --> > > >>>>> <Output TaskParameter="ExitCode" PropertyName="ExitCode"/> > > >>>>> </Gallio> > > > >>>>> <Error Text="Tests execution failed" Condition="'$ > > >>>>> (ExitCode)' != > > >>>>> 0" / > > > >>>>> </Target> > > > >>>>> <Target Name="Build"> > > >>>>> <Message Text="Starting to Build"/> > > >>>>> <MSBuild Projects="Selenium.sln" Targets="Rebuild" > > >>>>> Properties="Configuration=Debug" /> > > >>>>> </Target> > > >>>>> </Project> > > > >>>>> Any help would be appriciated > > > >>>>> Thanks > > > >>>>> Rob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MbUnit.User" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MbUnitUser?hl=en -~----------~----~----~----~------~----~------~--~---
