Intellisense has stopped working for me and whenever I run VSCode this error comes up in the OmniSharp Log.
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file '/Users/leogaunt/Documents/Programming/Unity/Cube Stack/Assembly-CSharp.csproj'.
/Users/leogaunt/Documents/Programming/Unity/Cube Stack/Assembly-CSharp.csproj
/Users/leogaunt/.vscode/extensions/ms-dotnettools.csharp-1.23.1/.omnisharp/1.37.0/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1178,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /Users/leogaunt/Documents/Programming/Unity/Cube Stack/Assembly-CSharp.csproj
I have tried re-installing the plugin, and re-intsalling VSCode but it hasn't worked.
I know I have .NET Core installed as I am a Mac user and I know this because when I type dotnet --version in terminal it outputs:
3.1.401
I am programming in Unity and am creating a game for iOS.
Change the mono path to always, in C# extension config.
For anyone that uses VSCode v1.67.2 dotnet v3.x.x and OmniSharp v1.25.0 (or v1.23.17 and above).
The above accepted answer does not solve the issue.
The simplest thing to do is downgrade ms-dotnettools.csharp (C# Extension), the only issue is if you downgrade to any version above v1.23.16 it gives you "Can't install 'ms-dotnettools.csharp' extension because it is not compatible with the current version of Visual Studio Code (version 1.67.2)"
I suggest to downgrade it to version 1.23.16 and restart vscode.
Your Intellisense should start working.
My Environment
dotnet v3.1.417
VSCode v1.67.2
C# Extension v1.25.0 (now downgraded to v1.23.16)
Running in Remote Container on a Mac host.
Yes I am using 3+ year old dotnet version. It's a legacy software, it happens, everyone has skeletons in their systems ;)
Trust me it'll work, tried everything and then came to this
Go into VS code Preferences
Search for omnisharp.path and click on edit in settings.json
Add/edit line "omnisharp.path": "latest" (remember to add a comma at the end of the previous line)
Go back into settings and search omnisharp, scroll down till you find Use Global Mono, change that to Always
After this you will have to download Mono, mac's mono download link is this https://www.mono-project.com/download/stable/#download-mac
After the download finishes, set it up by opening the download file
Go back to settings.json and add mono's /bin path as "omnisharp.monoPath": "/Library/Frameworks/Mono.framework/Versions/6.12.0/bin" which is the default download path for mac, if you wanna confirm this, go into mac's disk space and then follow the above mentioned path)
Finally restart VS Code and it should work (in case it still doesn't, restart it again)
I downgraded the VS Code's C# extension to 1.24.3 from 1.25.0 and it worked.
I had the same Problem after fetching Unity from a git repository.
For me it worked to reset the .Net Version in Unity.
Edit -> Project Settings -> Api Compatibility Level
Switched that back and forth, restarted VSCode. The .csproj-file will file out all the missing dlls.
I solved this by uninstalling all SDK's and installed the older 4.7.1, then everything worked instantly.
I had the same problem. Here's how I fixed it:
I added all projects to the solution file (dotnet sln add <project name>) and opened the project in vs code by passing the path to vscode from terminal
(code <project path>).
The error says that OmniSharp is looking for Version=v4.7.1. You may want to install the latest version of it.
I'm trying to use GeckoDriver in asp.net core (dotnet new webapi). But, It's always throw exceptions:
System.InvalidOperationException: 'Failed to start browser C:\Program Files\Mozilla Firefox\firefox.exe: other os error (SessionNotCreated)'
I tried to use with .net core console (dotnet new console), and It's working fine.
One more thing, I use ChromeDriver in asp.net core still fine.
Why? What difference between asp.net core and .net core console? And why ChromeDriver is working bold?
This is infomation of my project:
Dotnet version: .net core 3.0
Firefox version: 75.0 (64 bit)
Selenium version: 3.141.0
GeckoDriver version: 0.26.0.1
Thank you
Update 1:
Maybe It's answers for my question.
I don't know exactly why.
But, GeckoDriver run fine on Project Profile.
By default, when I F5 my project, It's run with IIS Express. I switched to Profiles of project (It will run in https://localhost:5001 by default).
And It's working!
This might be a longshot, but any updates here? I am running into the same issue. ChromeDriver and EdgeDriver work with ASP.Net Core 5 and 6, but FirefoxDriver throws the above error. I've tried with both the 32 and 64 bit versions of FirefoxDriver.
Also when I switch the profile to use project profile, it works. The project profile uses the commandName: Project option which uses the Kestrel web server as opposed to IISExpress. So it seems like IIS is the culprit? I can get my application to run locally, but when I deploy it to a web server, it errors out and I'm assuming it's because it can run under IIS?
I've searched for solutions on this but found no one getting this error and it is never very descriptive. Wanted to see if someone has a solution or point me to a resource that covers it.
Basically, I have a .Net Standard 2.0 Project that I'm installing Selenium WebDriver and ChromeDriver to. However, when I try to install them from Nuget Manager in VS2017 (either via Nuget.org or locally), I get the error below:
"The local source 'C:\Users\ME\Desktop\dist' doesn't exist."
I've tried placing ChromeDriver on the desktop thinking that was the cause but no change. Also tried command line install of the Nuget package but it fails as well.
Any assistance would be very helpful.
When you bring up the NuGet manager, make sure that your package source is set to nuget.org. It sounds like you've got it pointed to some local path that doesn't exist.
I've seen that some other professionals facing this issue as well, but nowhere the real solution is given. Selenium page factory / when initialize IWebElement through [FindsBy(How = How.Id, Using = "yourID")] driver is unable to interact with these elements. Trying to debug it and receiving "Obtaining the runtime type of transparent proxy is not supported in this context" on the line where interactions with element start. Not really what it is, I did automation in the past only in Java.
System info:
Visual Studio 2015 version 14.0.24720.00 Update 1
.Net Framework version 4.6.01055
Selenium.Support version 3.0.0
Selenium.WebDriver version 3.0.0
NUnit version 3.5.0
Please help if anybody faced and resolved that issue.
I wanted to try WebKit by following this tutorial, but gmcs compiler was't able to find "webkit-sharp-1.0" package. Where can i get it and how to install it?
The original Webkit# no longer seems under development (latest commit is from 2009) and I have never encountered any windows packages for it but you can use open-webkit-sharp which is working on Windows.