I am getting problem while deploying fake driver in my local windows virtual Computer.
I am getting error like,
Deploying driver files for project "C:\ioctl\sys\sioctl-Package\sioctl-Package.vcxproj". Deployment may take a few minutes...
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\x64\ImportAfter\DriverDeployment8.0.targets(69,9): error : Kernel mode drivers cannot be deployed to the local machine
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\x64\ImportAfter\DriverDeployment8.0.targets(69,9): error : Value cannot be null.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\x64\ImportAfter\DriverDeployment8.0.targets(69,9): error : Parameter name: path
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
Related
Edited: as #Diego Malanij pointed out in answer
https://stackoverflow.com/a/74768591/4489263 it's the MSTest.TestAdapter 3.0.0 package causing the following observed misbehavior, whereas MSTest.TestFramework 3.0.0 works well
After updating NuGet packages in a .Net 4.8 solution, MS UnitTests just reproducibly stopped working here in Visual Studio 2022 "Community Edition" on Windows 10 without having changed anything in the custom solution itself.
The same update(s) work well in a .Net6.0 solution
UnitTests
Updates:
MSTest.TestFramework.2.2.10 -> MSTest.TestFramework.3.0.0
MSTest.TestAdapter.2.2.10 -> MSTest.TestAdapter.3.0.0
The Output window in the .Net4.8 solution shows exceptions, and the Test Explorer says:
UnitTests
Tests in group: 134
Outcomes
134 Not Run
Output Window :
========== Test run finished: 0 Tests (0 Passed, 0 Failed, 0 Skipped) run in 127 ms ==========
Log level is set to Informational (Default).
Source code repository not available. Some features may not work as expected.
Connected to test environment '< Local Windows Environment >'
Test data store opened in 0,139 sec.
========== Starting test discovery ==========
No test is available in D:\Dev.Net\ProdSW\RingManager\RingManager\RingManager.Data\bin\Debug\RingManager.Data.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
No test is available in D:\Dev.Net\ProdSW\RingManager\RingManager\RingManager\bin\Debug\RingManager.exe. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
No test is available in D:\Dev.Net\ProdSW\RingManager\RingManager\RingManager.CommonViews\bin\Debug\RingManager.CommonViews.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
No test is available in D:\Dev.Net\ProdSW\RingManager\RingManager\RingManager.Common\bin\Debug\RingManager.Common.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
========== Test discovery finished: 134 Tests found in 3 sec ==========
========== Starting test run ==========
========== Test run finished: 134 Tests (134 Passed, 0 Failed, 0 Skipped) run in 16,7 sec ==========
Starting test discovery for requested test run
========== Starting test discovery ==========
========== Test discovery finished: 134 Tests found in 1,7 sec ==========
========== Starting test run ==========
An exception occurred while invoking executor 'executor://mstestadapter/v2': Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Stack trace:
at Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestDeployment.GetDeploymentInformation(String source)
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestExecutionManager.ExecuteTestsInSource(IEnumerable1 tests, IRunContext runContext, IFrameworkHandle frameworkHandle, String source, Boolean isDeploymentDone) at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestExecutionManager.ExecuteTests(IEnumerable1 tests, IRunContext runContext, IFrameworkHandle frameworkHandle, Boolean isDeploymentDone)
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestExecutionManager.RunTests(IEnumerable1 tests, IRunContext runContext, IFrameworkHandle frameworkHandle, TestRunCancellationToken runCancellationToken) at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.MSTestExecutor.RunTests(IEnumerable1 tests, IRunContext runContext, IFrameworkHandle frameworkHandle)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.RunTestsWithTests.InvokeExecutor(LazyExtension2 executor, Tuple2 executorUri, RunContext runContext, IFrameworkHandle frameworkHandle)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.BaseRunTests.<>c__DisplayClass46_0.b__0()
at Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformThread.<>c__DisplayClass0_0.b__0()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformThread.Run(Action action, PlatformApartmentState apartmentState, Boolean waitForCompletion)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.BaseRunTests.TryToRunInStaThread(Action action, Boolean waitForCompletion)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.BaseRunTests.RunTestInternalWithExecutors(IEnumerable`1 executorUriExtensionMap, Int64 totalTests)
========== Test run finished: 0 Tests (0 Passed, 0 Failed, 0 Skipped) run in 127 ms ==========
After reverting the changes via version control system - and restarting VS - all is back to normal.
So I guess I'll wait a little and then might try again with a next NuGet version, and this is more a warning than a question asking for help
I've found the same issue with my solution. Today I was able to dig a bit deeper with fusion log and the problem is that the assembly is being searched in the appbase for the testhost, rather than the location of the unit test output itself (meaning bin\debug or bin\release).
I've taken a look at the MSTest.TestAdapter package itself and its props... it has changed the structure regarding the previous version, and now it contains the Microsoft.VisualStudio.TestPlatform.TestFramework assembly (which is loaded from the packages\MSTest.TestAdapter.3.0.0\build\net462 location), but the extensions are no there.
I tried copying the missing dll in that location and tests execution succeeded, however that's clearly not a solution.
In my case this is with Visual Studio 2019, and I thought 2022 might have this solved but clearly after finding your post, that's not the case; I'll try to go a bit further with the analysis later, but as for now the only option is not updating the MSTest.TestAdapter package (the MSTest.TestFramwork is fine at 3.0.0).
MSTest.TestAdapter.3.0.1 now being available apparently cures the symptom, may have been a temporary bug in its version 3.0.0.
After installing NuGet
Updates:
MSTest.TestFramework.3.0.0 -> MSTest.TestFramework.3.0.1
MSTest.TestAdapter.2.2.10 -> MSTest.TestAdapter.3.0.1
... all seems to be okay again
I made that question to the Microsoft community months ago, the solution I came up with was to install the previous version of Visual Studio, 17.2.6, that could work with that phone. Then I got a new testing phone and I could debug on it just fine with any later Visual Studio version. But that old problem resurfaced when I tried to debug on my old phone again lately.
So, when I try to debug on the Samsung J5 I get the message that deployment is successful but debugging and the app stop. The app gets installed on the phone just fine, I can run it and test things, and for those parts that I would have added breakpoints I add temporary log entries to see what is happening. But debugging would be so much faster and easier. So I don't know what happened to Visual Studio 2022 after version 17.2.6 and the debugging on the J5 stopped working without changing the Android project's settings.
On to the output. The last lines of the Build output:
Found device: dbb6c608
Creating "obj\Debug\130\upload.flag" because "AlwaysCreate" was specified.
Creating directory "obj\.cache\".
Done building project "iService5.Droid.csproj".
Build succeeded.
2>Deployment was successful to Samsung SM-J510FN.
========== Build: 1 succeeded, 0 failed, 3 up-to-date, 0 skipped ==========
========== Elapsed 02:07,822 ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
========== Elapsed 02:07,824 ==========
Last lines of Build Order output:
2>Starting deployment to Samsung SM-J510FN ...
2>Deploying to Samsung SM-J510FN ...
2>Deployment was successful to Samsung SM-J510FN.
========== Build: 1 succeeded, 0 failed, 3 up-to-date, 0 skipped ==========
========== Elapsed 02:07,822 ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
========== Elapsed 02:07,824 ==========
On Debug output:
This debug engine does not support exception conditions. The condition(s) will be ignored.
Forwarding debugger port 8815
Detecting existing process
> am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "com.bshg.iservice5.droid/crc649586142a72936f38.MainActivity"
> Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.bshg.iservice5.droid/crc649586142a72936f38.MainActivity launchParam=MultiScreenLaunchParams { mDisplayId=0 mBaseDisplayId=0 mFlags=0 } }
The error I get in Xamarin Diagnostics window:
[E:]: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.Format(String format, Object[] args)
at Mono.AndroidTools.AndroidLogger.LogError(String task, String format, Object[] args) in D:\a\_work\1\s\External\androidtools\Mono.AndroidTools\AndroidLogger.cs:line 63
at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass118_0.<RunShellCommandAsync>b__0() in D:\a\_work\1\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 1012
[D:RunShellCommand]: dbb6c608 setprop "debug.mono.extra" ""
-- Start SetProperty - 12/02/2022 13:15:16 (148.7124ms) --
[INPUT] setprop "debug.mono.extra" ""
[OUTPUT]
-- End SetProperty --
[D:RunShellCommand]: dbb6c608 am force-stop com.bshg.iservice5.droid
-- Start ForceStop - 12/02/2022 13:15:16 (1794.4007ms) --
[INPUT] am force-stop com.bshg.iservice5.droid
[OUTPUT]
-- End ForceStop --
I have searched and searched and I can't find anything usefull. As for the configuration:
Android Options
Advanced Android Options
Deleting bin and obj after testing different Android options made no difference. The same options debug on the new phone just fine. And I haven't changed the developers setting in the J5. They are the same ones that VS 17.2.6 could debug with.
I am currently installing 17.2.6 to exist in parallel with 17.4.2 on my pc to see if that will help. But any insights regarding the reason behind my problem would be greately appreciated!
Edit: Community is not available for versions before 17.2.10 anymore. So I'll try 17.2.10.
Edit 2: 17.2.10 debugs on my old phone just fine. Same settings, same everything. So, since our target android version is now 13 on the solution on latest vs, I also created a clone of the repo to work with on the old phone because older vs can have only up to android 12.1 as a target version.
Installed VS 2017 (prof & community) RTM for xamarin development. Getting the below error while running the app. I have verified that installed the Intel Acceleration component. Any insights ?
1>C:\Users\Sowmyan\documents\visual studio 2017\Projects\App1\App1\App1.Android\App1.Android.csproj : warning XA0105: The $(TargetFrameworkVersion) for FormsViewGroup.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project.
1>C:\Users\Sowmyan\documents\visual studio 2017\Projects\App1\App1\App1.Android\App1.Android.csproj : warning XA0105: The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.Android.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project.
1>C:\Users\Sowmyan\documents\visual studio 2017\Projects\App1\App1\App1.Android\App1.Android.csproj : warning XA0105: The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project.
1> Processing: obj\Debug\res\layout\tabbar.xml
1> Processing: obj\Debug\res\layout\toolbar.xml
1> Processing: obj\Debug\res\values\styles.xml
1> Processing: obj\Debug\res\layout\tabbar.xml
1> Processing: obj\Debug\res\layout\toolbar.xml
1> Processing: obj\Debug\res\values\styles.xml
2>Starting deploy VisualStudio_android-23_x86_phone ...
2>Starting emulator VisualStudio_android-23_x86_phone ...
2>C:\PROGRA~2\Android\ANDROI~1\tools\emulator.EXE -partition-size 512 -no-boot-anim -avd VisualStudio_android-23_x86_phone -prop monodroid.avdname=VisualStudio_android-23_x86_phone
**2>emulator: ERROR: x86 emulation currently requires hardware acceleration!**
2>Please ensure Intel HAXM is properly installed and usable.
2>CPU acceleration status: HAXM is not installed on this machine
2>Emulator VisualStudio_android-23_x86_phone cannot be started.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
I had a similar problem on my laptop. It turned out the Virtualization was turned off in my BIOS. My recommendation is to enter the BIOS setup on reboot (refer to manual as all machines are different) and see if Intel Virtualization is enabled. If not, you will need to enable it.
Im quite new to Xamarin and android development. I have made a new virtual device but when Im trying to run debug (by hitting "play" in Visual Studio) I get the message "Deployment failed", but I cant find any error message or logs.
Any tips on how to find that or troubleshoot for failing deployments?
(I can deploy when using a simple program and the pre-installed kit kat 4.4)
EDIT:
From output window:
Starting deploy 0001 ...
Starting emulator 0001 ...
An error occured. See full exception on logs for more details.
An error occured. See full exception on logs for more details.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
I'm trying to remotely debug a Windows 8.1 app on an x86 tablet.
The Remote Debugger is started on the Tablet, but every time I try to deploy the app to the Tablet, the Visual Studio output window shows this:
1>------ Build started: Project: $REDACTED, Configuration: Debug x86 ------
1> $REDACTED-> C:\Users\$REDACTED\bin\x86\Debug\$REDACTED.exe
2>------ Deploy started: Project: $REDACTED, Configuration: Debug x86 ------
2>Error: The method or operation is not implemented.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
Also, the Remote Debugger on the tablet prints Failed attempt to connect from $REDACTED
Changing remote machine (VS 2015 Remote Debugger settings) from No Authentication to Windows Authentication fixed the problem for me.