How to start .NET 6 console app in WSL2 Ubuntu distro from VS2022? - .net-6.0

[EDIT] I am using Ubuntu 22.04. Using Ubuntu 20.04 I was able to install .NET 6 and run the console app.
I am struggling for several days with an odd issue. I have VS2022 Professional running on Windows 11 with enabled WSL. I have installed Ubuntu 22.04 from Microsoft store. However when I try to debug a console app in the Ubuntu's distro it is not possible since it says that I don't have .NET 6 SDK installed on the distro which is not correct:
enter image description here
Here is my launchSettings.json:
{
"profiles": {
"ConsoleApp": {
"commandName": "Project",
"remoteDebugEnabled": false
},
"WSL : Ubuntu 22.04": {
"commandName": "WSL",
"distributionName": "Ubuntu-22.04"
}
}
}
I have installed VsDbg as well:enter image description here
Any advice how to deal with this?
I have tried to clean the project and to rebuild. I have followed the "install" button in Visual Studio and the installation of the .NET 6 SDK passes successfully and yet I have the same problem. I did several restarts of VS and of PC as well.

Related

Docker Desktop Installation failed: one prerequisite is not fulfilled on Windows 10

I have a problem when installing a Docker Desktop 2.3.0.3
"Installation failed: one prerequisite is not fullfilled"
Docker Desktop requires Windows 10 Pro/Enterprise (15063+) or Windows 10 Home (19018+).
My Computer System Specification:
OS Name: Microsoft Windows 10 Pro
Version: 10.0.10240 Build 10240
RAM: 8Gb
I have tried manually Install Hyper-V and Containers in my Computer, but still failed to install the desktop docker.. Anyone can help me? Im need your help.
You need to install Windows 10 Home 2004 build which was released on May 2020, you can use Microsoft's update assistant to manually get the update if it's not showing up for you on Windows.
Get it here: https://www.microsoft.com/en-us/software-download/windows10
You may want to try Docker Toolbox
Docker Toolbox is an installer for quick setup and launch of a Docker
environment on older Mac and Windows systems that do not meet the
requirements of the new Docker Desktop for Mac and Docker Desktop for
Windows apps.
The actual required Windows version is greater than what it says in the installer GUI.
It might be a typo! and according to Docker this has happened before:
Docker actually requires Windows build xxxxx or greater - we're
working on the typo in the installer gui, but you'll need to update
your Windows to proceed. (Jan 8, 2018)
Just Update Windows and the problem goes away.
If you cannot update the system use choco
Install following the official Сhocolatey documentation: https://chocolatey.org/install
After installation, run the command choco install docker-desktop or follow the official installation documentation https://community.chocolatey.org/packages/docker-desktop

Docker Desktop mixed mode doesn't work anymore

I'm trying to run linux and windows images using Docker Desktop. The approach is described here:
https://devblogs.microsoft.com/premier-developer/mixing-windows-and-linux-containers-with-docker-compose/
It was working pretty well with some limitations 3 months ago, but when I try to do it again today, I get no luck.
I switched to Windows containers and enabled Experimental features. But when I try to use linux image, I've got this error:
docker run -it mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
C:\Program Files\Docker\Docker\resources\bin\docker.exe: image operating system "linux" cannot be used on this platform.
What could be a problem? Was this feature removed from docker desktop? Can't find information about it.
My current setup is:
Windows 10 Enterprise Version 1809 (OS Build 17763.1098)
Docker desktop community 2.2.0.4 (43472) stable channel
Engine: 19.03.8
Compose: 1.25.4
Kubernetes: v1.15.5
Notary: 0.6.1
Credential Helper: 0.6.3
It looks like switch "Enable experimental features" is buggy in current version and doesn't really turn on the features. When I added experimental feature to daemon config directly:
{
"registry-mirrors": [],
"insecure-registries": [],
"debug": true,
"experimental": true
}
mixed linux and windows containers started to work as it was before.

Can't install MS Bot Emulator 3.5.29. Error - this app can't run on your PC?

I am trying to run the Microsoft Bot Emulator setup program:
botframework-emulator-Setup-3.5.29.exe
My system is a Windows 8.1 64-bit install with 16 GB of memory. When I run the setup program I get the following error from Win81:
This app can't run on your PC.
To find a version for your PC, check with the software publisher
I tried downloading the AppImage file too and running that version on my Ubuntu 14.04 LTS box. But then I get an error message saying libfuse.so.2 can not be found, despite the fuse package definitely being installed on that PC.
UPDATE: Tried it on another Win8.1-64-bit station and a Win10 station. Same error message.
How can I get this thing installed?
https://github.com/Microsoft/BotFramework-Emulator/releases
I downloaded the appropriate version of BotFramework-Emulator and run it. It worked. I am running Ubuntu 16.04 64 bit.
I also run BotFramework-Emulator in node js server locally. It ran successfully.
Try restarting your PC and run the bot emulator setup, it would work fine.

Ionic App Built on Mac won’t build on Windows

We developed the app on a Mac, initially. Moved the code over to a Windows 10 machine to compile to run on Windows. However, in the build process I'm getting this error at the end:
Command finished with error code 0: C:\windows\system32\reg.exe query,HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0,/v,MSBuildToolsPath
Found MSBuild v4.0 at C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
Using MSBuild v4.0 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
MSBuild v4.0 is not supported, aborting.
Error: AppPackages doesn't exists
Here's Ionic Info
global packages:
#ionic/cli-utils : 1.3.0
Cordova CLI : 7.0.1
Ionic CLI : 3.3.0
local packages:
#ionic/app-scripts : 1.3.7
#ionic/cli-plugin-cordova : 1.3.0
#ionic/cli-plugin-ionic-angular : 1.3.0
Cordova Platforms : windows 5.0.0
Ionic Framework : ionic-angular 3.3.0
System:
Node : v6.10.3
OS : Windows 10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
We're using Visual Studio Community 2017. I've tried installing everything under the sun for VS and I can't seem to get past this. I've read tons of pages and sites, tried everything I can find and no go.
Not sure what to do next. I've thought about starting a new app on the Windows machine and just copy my code into and see if that works. It seems like a lot of wasted time to me though.
My advice on this is just a simple one. Install and run your project with Visual Studio Code. It was built and well suited for free and open frameworks like Ionic. This is what I work with everyday. When you do that give me a comment below if you have any problem.

Xamarin Android Player Error when attempting to find VirtualBox

I have a clean install of Windows 10. After installing Visual Studio 2015 and Xamarin Bussiness edition I installed Xamarin Android Player x64 and now I receive the following error:
Error when attempting to find VirtualBox please check it's installed and try again.
Xamarin Android Player will now exit.
A solution is referenced in Xamarin fourms stating
Fixed it by adding "C:\Program Files\Oracle\VirtualBox" to my %PATH%
I am able to open VirtualBox version 4.3.28 r 100309 without issue.
How do I implment this solution or is there a newer solution?
I am running Windows 10 Professional and did a clean installation. Had the same problem. I opened the environment variables and the "VBOX_MSI_INSTALL_PATH" was set to:
C:\Program Files\Oracle\VirtualBox\
I changed it to
C:\Program Files\Oracle\VirtualBox
and it worked for me.. (notice the last backslash)
Thanks .. Ragnar Kofi Billy Force on facebook
Try installing the Latest version of Virtual Box, Since v5.0 has fixes for Windows 10
http://download.virtualbox.org/virtualbox/5.0.4/VirtualBox-5.0.4-102546-Win.exe
Changelog: https://www.virtualbox.org/wiki/Changelog
Windows hosts: fixed crash when opening Windows dialogs from the VM process on Windows 10 (bug #14351).
Windows hosts: fixed host-only adapter creation issues on Windows 10 (bug #14040)
Windows hosts: fixed audio on Windows 10 (bug #14432).
Windows Additions: fixed a potential crash in the WDDM driver with Windows 10 (bug #14190).
VRDP: allow Windows 10 RDP clients (bug #14216).
Windows hosts: fix for Windows 10 build 10525 and later (bug #14502).
Windows hosts: fixed network adapter enumeration on Windows 10 (bug #14437).
VMM: fixed an issue with Windows 10 guest kernel debugging over the network for Hyper-V paravirtualized VMs.
I have a same problem too and installing the latest version has fix it
Add VirtualBox to your system environment PATH variable.
None of the other answers helped me. The Android Player installer was forcing the install of Virtual Box 5.0.4 which was not working on Windows 10 Home (build 14393.51).
What did work for me was to install the latest virtual box (version 5.1.2 r108956) after installing Android player. While I can't start the android devices from Virtual Box's manager, I have had no problems starting them from Android Player or Visual Studio.
Just run as admin (Right hand click on desktop shortcut)

Resources