Getting an error when trying to start REPL window


I'm trying to start up my REPL console via my Xamarin UI Test but I am unable to and getting an error on the console.

I've tried cleaning and rebuilding the solution, checked ANDRIOD_HOME is pointing to the correct location and verified that the xamarin.uitest.dll file is present in my solution but unable to remove the error. There doe snot seem to be an issue with the app itself because it is opening up in the emulator.

This is the error I am seeing:

Android SDK Path: C:\Program Files (x86)\Android\android-sdk
Execution failed with exception: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\Sayali.Sheode\Source\Repos\Crewpad Pro\UITests\bin\Release\Xamarin.UITest.DLL' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\Sayali.Sheode\Source\Repos\Crewpad Pro\UITests\bin\Release\Xamarin.UITest.DLL' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See for more information.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at Mono.CSharp.DynamicLoader.LoadAssemblyFile(String assembly, Boolean isImplicitReference)
   at Mono.CSharp.Evaluator.LoadAssembly(String file)
   at Xamarin.UITest.Repl.Program.Main(String[] args)

Press any key to exit.

This is my test class:

using System.Linq;
using NUnit.Framework;
using Xamarin.UITest;
using Xamarin.UITest.Queries;

namespace UITests
    public class Tests
        IApp app;
        Platform platform;

        public Tests(Platform platform)
            this.platform = platform;

        public void BeforeEachTest()
            app = AppInitializer.StartApp(platform);

        public void WelcomeTextIsDisplayed()
            AppResult[] results = app.WaitForElement(c => c.Marked("Welcome"));
            app.Screenshot("First Screenshot!");

asked on Stack Overflow Aug 23, 2019 by ssheode

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0