How to enable Hyper-V on a Windows machine? - visual-studio

I'm new to Visual Studio, and I just downloaded the Xamarin package over the weekend. The very first time I ran the Android Emulator, it seemed to work fine. (This was simply running the "Hello World" base-script. Then when I opened the emulator again, it began having Deployment errors.
Deploy Failed
Pressing Yes, yields no results. After some research of my own, I believe that the issue may be because Hyper-V is not running. Enabling it should be simple, but i have tried a few different methods and cannot seem to get it to run. One way I tried was via Powershell: Powershell Feature Name Unknown
Having tried that, I tried to enable it manually via settings: Settings
To my understanding, there should be a few different folders here called "Hyper-V" or something to that effect on top of Hypervision Platform folder. Is this why my emulator isn't running, because I don't have access to the Hyper-V folders, or could something be wrong in Vis Studio itself? Like I said, I'm very new to this software and workflow so any trouble shooting ideas would be appreciated.

Related

Clickonce App Doesn't start with Windows 1803

I have a Clickonce app from Visual Studio 2015 SP3 that is published to the network server and used in-house only. The program works just fine when launched from Visual Studio. It runs just fine on a Windows machine that does not have the 1803 update. But once a machine updates to 1803, the application no longer starts. I get the "Checking for updates..." window then nothing. On a fresh install, I usually get the Smartscreen telling me the program may be dangerous. It doesn't get that far.
I've created the Clickonce from a computer with the 1803 update and the problem still exists.
I've disconnected the machine from the network. The application starts but then has no database access and it needs the database. It's also written to hide buttons that would use the database to prevent users from trying to do things that require it.
I found a workaround (third paragraph) at https://social.technet.microsoft.com/Forums/en-US/7cbd16f5-526e-4b0b-a186-3ebf41b7b349/smartscreen-prompt-does-not-show-for-clickonce-app-since-windows-10-update-1803?forum=win10itprogeneral. When I start the application from the directory mentioned, I get the Smartscreen and can tell it to run anyway. Every time I click the desktop icon, it works just fine.
If a new release is published, the new release is downloaded and the program updated, but the Smartscreen no longer appears and the application never starts.
So somewhere between installing the latest update and the Smartscreen, this is failing. Anyone else experiencing this and have an idea as to why?
Yes, frustratingly I also experienced this today. Presumably a security update that they'll release another patch for given this is quite a pain for developers and users of small business apps.
Rather than disable Defender or SmartScreen I chose to add my deployment website to the Trusted Sites in Internet Explorer and that then re-instated the warning dialog and my app updated and ran as before.
Really annoying given the nature of the issue and how long it took to figure out, but at the same time I had to use IE today, which is a rare event nowadays.
This works for me...Warn doesnt warn anymore...
After running in the same problem, I just found that my application was going to halt after a stupid uncaught exception.
Despite the fact that the image below is in Portuguese, Event Viewer shows the right error cause.
In my case, was a corrupted settings file!
It appears as though some subsequent Windows Updates have fixed the issue on several of our PC's that were previously experiencing the issue.
Check for the updates listed here.
https://www.catalog.update.microsoft.com/Search.aspx?q=KB4338548
Running winver.exe will show you which build you have.

Docker toolbox with Visual studio - Volume sharing is not enabled

I'm trying to get running a docker support with Visual studio 2017 for a .net core 2.0 web app running on linux containers. I'm working on machine with win 7 OS, so I must use a Docker toolbox with Virtual box. I've already checked this question: How to get docker toolbox to work with .net core 2.0 project, but I got stuck in the following problem, when trying to run it with VS:
Volume sharing is not enabled. Enable volume sharing in the docker ce
for windows settings
So far I know that there is a default volume mounted under the C:\Users, so my project files should be copied somewhere under this folder in case I don't want to mount any other volume. So I copied them there.
When I check the settings of my Virtual box, folder seems to be shared:
I can even cd into this folder with command line, but still can't get over this problem. Any ideas about this?
Finally I got this running. Error message comming from VS is very misleading and it has nothing to do with volume sharing. Eventually I realized that problem is in running a debugger, because when I ran solution with Ctrl + F5 everything was ok and container started correctly. Problem occurred only when running with F5 and trying to attach a debugger.
Then I found some clues in console output. VS tries to download some tooling for debugging containers with powershell script named GetVsDbg.ps1. When running this script I could observe errors like:
Add-Type : Cannot add type. The assembly
'System.IO.Compression.FileSystem' could not be found.
Finally I fixed this issue by updating powershell version which was somehow in collision with my .net framework installed on my machine.
Well in my case it turned out that I had changed my windows password and docker wasn't able to get access.
So it was just
uncheck shared drives
Apply
Check again. Enter new password
restart docker
Below setting helped me getting rid of this error. Check the drive you want to share and click apply. This might ask you your network credential just enter in case it pops up.
Docker settings
Thanks,
Rakesh
I fixed it by running following command in Powershell:
docker network create nat
I got same issue attempting to publish an Azure Function App to a Container Registry.
Newer version of Docker Desktop for Windows 2.3, has new interface. I had to got to Resources|File Sharing and add a new Folder. This resolved that issue...

DEP0001 : Unexpected Error: -1988945906 while deploying Windows UWP app to phone

Exact error:
Severity Code Description Project File Line Suppression State
Error DEP0001 : Unexpected Error: -1988945906 TestApp
What does it mean? It seems it isn't problem with application, it works OK on PC.
Version of OS: 1511, Windows 10 for phones 10.0.10586.164
I've experienced the same problem after updating Visual Studio community to Update 2. Typing in CMD (under admin rights) the following command solved my issue:
net start IpOverUsbSvc
Thanks to Agrgg for a good tip ;)
This kind of error happens very randomly and usually it means there was an issue during the deployment of the app. Things to check:
Developer mode is correctly enabled on phone
Uninstall the app from phone, rebuild solution and then try debug again
Check that the architecture for all projects is set accordingly (ARM for debugging on real device)
Sometimes the VS debugger hangs up, so closing VS and kill from Task Manager all VS processes that are eventually running and restart VS may also help.
I had the same error with deploying onto Windows Phone 8.1 device. In my case the problem was in Windows Phone IP over USB Transport (IpOverUsbSvc) service, which wasn't running. The deployment error disappeared after I'd started the service manually.
I had the same problem.
"net start IpOverUsbSvc" didn't worked for me (throws Access is denied Exception).
I have followed following steps to fix.
Start Run (Windows+R), Type: services.msc
Start/Restart Windows phone IP over USB Transport.
For the RPi, I have RPi3 with WIOT (build 14376) this error happens after failed deployment. Just restart VS and it'll deploy ok.
After trying some of the answers already provided and nothing worked, I fixed the error by simply restarting the phone.
After that the error was gone for me.
I had the same issue, and found that in my case it was occurring while the phone was downloading system updates in the background.
App updates/installations from the app Store were also prevented from downloading/installing.
After the update had finished, all was back to working again.
As Windows Phone 10 doesn't seem to make it obvious that it's downloading updates, maybe worth checking this out if you hit this problem.
I had the same error, solution is here: https://msdn.microsoft.com/ru-ru/library/windows/apps/jj863509(v=vs.105).aspx
Look at Checking BIOS settings required by Hyper-V for Data Execution Prevention. You must select "Turn on DEP for all programs and services except those i select" and in my case application deploys successfully.
For me, it was as simple as unlocking the phone so that the computer would have access to it.
I had this issue as well. None of the answers helped me. IpOverUsbSvc was up and runing, phone reset, system reboot, nothing...
The issue was fixed after a Visual Studio "repair": control panel -> Programs and features -> select VS2015 -> Repair
I got a similar error.
The reason the error occurred for me was because I forgot to add the new splash images in assets after deleting the old ones.
The solution was to add the images. To get the correct image names and sizes, I used this extension for visual studio.
For Windows 10 (desktop) users
I faced this problem after I uninstalled Windows 10 SDK. It deleted the IpOverUsbSvc service from the system.
Solution
Download the Windows 10 SDK .iso installer
Inside it there is Installers folder.
Find Windows IP Over USB-x86_en-us.msi. Install it. (Don't worry if there is no setup window, it installs fast and silently).
I didn't even have to reboot VS2015, it just worked.
Check if the IpOverUsbSvc service is running
Open a Powershell prompt and type Get-Service -Name *USB*
Or go to the Services window. There you should see the IpOverUsbSvc running.
So, I think I get the trick. After plugged in your Windows Mobile device, Windows App Deploy can see W10M device, but once your device goes to lock screen, WPD can not detect it anymore.
You should to plug out and plugin again, with screen unlocked, to make it detectable. (I'm not a really English speaker).

Visual Studio 2010 Debug Server Not Recognizing My Changes

Using Visual Studio 2010 on Window 7 64bit. I'm trying to test a website project (not a web application project) using the built in dev server (cassini). The problem I'm having is that when I make a change, I now have to actually stop debugging, kill cassini, and restart before I can actually see my changes in the browser. I used to be able to edit and refresh. One of my fellow developers here is able to do this just fine with an identical setup (same project/vs version/os - and settings near as I can tell). I'm beginning to suspect some sort of permissions issue. I've been all over google trying to find an answer to no avail. Any ideas?
As it turns out, this was my fault... I had experienced the dreaded "network BIOS command limit has been reached" issue. I found a post that recommended doing a regedit hack "HKLM\Software\Microsoft\ASP.NET\FCNMode = 1", well this basically turns off File Change Notifications. Changing this value to 2, and applying the changes recommended in knowledge base 810886 fixed both problems.

Visual Studio 2005 Setup project install crashes over Terminal Server

I have a setup project created by Visual Studio 2005, and consists of both a C# .NET 2.0 project and C++ MFC project, and the C++ run time. It works properly when run from the main console, but when run over a Terminal Server session on a Windows XP target, the install fails in the following way -
When the Setup.exe is invoked, it immediately crashes before the first welcome screen is displayed. When invoked over a physical console, the setup runs normally.
I figured I could go back to a lab machine to debug, but it runs fine on a lab machine over Terminal Server.
I see other descriptions of setup problems over Terminal Server sessions, but I don't see a definite solution. Both machines have a nearly identical configuration except that the one that is failing also has the GoToMyPC Host installed.
Has anyone else seen these problems, and how can I troubleshoot this?
Thanks,
I had LOTS of issues with developing installers (and software in general) for terminal server. I hate that damn thing.
Anyway, VS Setup Projects are just .msi files, and run using the Windows installer framework.
This will drop a log file when it errors out, they're called MSIc183.LOG (swap the c183 for some random numbers and letters), and they go in your logged-in-user account's temp directory.
The easiest way to find that is to type %TEMP% into the windows explorer address bar - once you're there have a look for these log files, they might give you a clue.
Note - Under terminal server, sometimes the logs don't go directly into %TEMP%, but under numbered subdirectories. If you can't find any MSIXYZ.LOG files in there, look for directories called 1, 2, and so on, and look in those.
If you find a log file, but can't get any clues from it, post it here. I've looked at more than I care to thing about, so I may be able to help
Before installing, drop to a command prompt and type
CHANGE USER /INSTALL
Then install your software. Once the install has completed, drop back to the command prompt and type:
CHANGE USER /EXECUTE
Alternatively, don't start the installation by a double click but instead go to Add/Remove Programs and select "install software" from there.
Good luck!

Resources