I am wondering if anyone can help me, I did a fresh install of MonoDevelop on a fresh install of Ubuntu 18.04.2 LTS with .NET Core 2.2 installed (everything updated), then followed the instructions layed out at Mono Download Offical. I have no errors or warnings during installation.
When I create any type of project or open one, all the system namespaces are missing?
I have checked here:
And
When I build / Clean any project I get:
/home/ant/.cache/MonoDevelop/7.0/MSBuild/27259_1/Microsoft.CSharp.CurrentVersion.targets(5,5):
Error MSB4019: The imported project
"/home/ant/.cache/MonoDevelop/7.0/MSBuild/27259_1//Microsoft.CSharp.Core.targets"
was not found. Confirm that the path in the declaration is
correct, and that the file exists on disk. (MSB4019) (sadsad)
Error
I solved it temporarily:
I went to the Namespace/Class options and under Run - Default - Advanced I selected Execute in .NET runtime -> Mono 5.20.1.34
It fixes the problem until i restart Monodevelop.
I'm having this problem since this morning, even after a fresh reinstall.
I am using Ubuntu MATE 18.04
This was a problem with mono its self, mono updated and was using a different version of MsBuild which the IDE could not use/understand. So I pulled the preview repository, as they added a fix there.
To fix:
purge monodevelop and mono-devel (with others) and install from here Preview - Stable until they patch the normal repository
I had the same problem with Monodevelop under Raspian (Rasberry3)
I believe I can now offer a viable solution:
It's just a setting that has to be done in Monodevelop before you start a new project:
Search under the settings, create and disable the line "create with MSBuild instead of xbuild".
After that all new projects will be recognized without errors.
For old projects the procedure is similar:
but there you should delete the folder ".vs" in the project folder first (better make a backup copy first! ;) ).
Start Monodevelop. Check that the settings are as described above.
Then open the project in Monodelop.
When you open the project, it will be reinitialized and can then be edited and compiled without any problems.
Related
I use VSCode for Unity development. Unfortunately, I'm not getting any IntelliSense within VSCode for my C# code. The root cause appears to be OmniSharp failing to find Mono, as the OmniSharp Logs within VSCode read:
"[ERROR] Error: Cannot start OmniSharp because Mono version >=6.4.0 is required."
This is an issue I've run into multiple times. On 3/4/2021 and for months prior everything was working just fine and IntelliSense was working perfectly for multiple Unity projects and multiple Unity versions. Then the next day it broke for some unknown reason and didn't work for any project, until late at night after trying a bunch of things I was able to get it working. And now this morning I'm once again getting this error. Each time between it working and it breaking I didn't make any changes besides restarting my computer.
MacOS Mojave 10.14.6
Unity 2020.2.0f1 + Visual Studio Code Editor 1.2.3 package for Unity
VSCode 1.54.1 + C# 1.23.0 plugin for VSCode
Mono 6.12.0.122 installed at /usr/local/bin/mono via brew
Mono 6.12.0 also installed manually at /Library/Frameworks/Mono.framework/Versions/Current/Commands/
which mono in my terminal and VSCode's terminal outputs /usr/local/bin/mono
mono --version in both terminals outputs Mono JIT compiler version 6.12.0.122
echo $PATH contains paths to both versions of Mono, /usr/local/bin/mono appearing first
msbuild outputs Microsoft (R) Build Engine version 16.6.0 for Mono and which msbuild outputs /usr/local/bin/msbuild
dotnet --info outputs .NET Core SDK Version: 3.1.201
In my VSCode's settings I've set the following:
"omnisharp.loggingLevel": "debug",
"omnisharp.monoPath": "/usr/local/bin/mono",
"omnisharp.useGlobalMono": "always"
Things I've tried:
Downgrading/upgrading VSCode's C# plugin (including to the latest version of 1.23.9)
Downgrading Unity's Visual Studio Code Editor package
Switching VSCode to use the version of Mono 6.12.0 I manually installed at /Library/Frameworks/Mono.framework/Versions/Current/Commands/ (and uninstalling the brew-installed version)
Unsetting the omnisharp settings in VSCode (it leads to a different error about .NET SDKs)
Deleting Unity's .csproj and .sln files so that it can regenerate them
Manually telling Unity to regenerate all the .csproj files
Restarting
Looking at many forums posts and Stack Overflow questions on the topic for solutions
So does anyone have any suggestions for getting IntelliSense working in VSCode? Any tips for debugging why OmniSharp can't find Mono? I feel like I've done everything in my power to point OmniSharp to the correct place, I wish it logged a bit more about what it was trying.
I was able to resolve the issue by downgrading Visual Studio Code to 1.52.1 at https://code.visualstudio.com/updates/v1_52 and turning off automatic updates in VS Code. OmniSharp is now working without any exceptions. Seems likely that the root cause lies with VS Code 1.54 (or possibly 1.53)
I had this same problem (no Intellisense). Tried many of the things listed here and elsewhere. Turned "ominsharp.useGlobalMono" to "never" as suggested most places, and restarted omnisharp when prompted, and it changed nothing. However, I got an error that I didn't get before (didn't save it, but it's the message stating that older versions of mono(?) aren't supported).
I therefore put it back (to "always") and restarted omnisharp when prompted...and autocomplete works. Didn't even exit VS code. Scripts were still open. No clue why it works now, but it does. So....set to never and back to always?
Using VS Code v 1.55.2.
Using dotnet 5.0.202
Set "omnisharp.useGlobalMono" to "never", and make sure you have a .NET .sln file for your project in the root of your workspace. If the solution is not in the root of your workspace, press Ctrl+Shift+P, and run "OmniSharp: Select Project" to select your .sln file.
So I recently installed visual studio code and added the C# available extensions. I also installed the Unity Debugger but it won't work because "it depends on an unknown 'ms-vscode.csharp' extension", I tried searching for this 'ms-vscode.csharp'in the extensions bar but found nothing. whenever i open a C# file from Unity or from any folder it recommends me to install that uknown C# extensions. what can i do please? here is a picture of the message:
To manually install the correct c# extension, do the following:
Uninstall existing vscode C# plugin
Close vscode
Download the vsix 1.21.12 from here
Open a command line in the folder where the vsix is.
Type: code --install-extension .\csharp-1.21.12.vsix
You should see:
Installing extensions...
Extension 'csharp-1.21.12.vsix' was successfully installed.
Open VSCode and in the C# output window, you will see:
Installing C# dependencies...
Platform: win32, x86_64
Downloading package 'OmniSharp for Windows (.NET 4.6 / x64)' (32544 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package 'OmniSharp for Windows (.NET 4.6 / x64)'
Errors should now have gone away.
That was a mistake by Microsoft. I just spent hours to solve the problem and noticed that actually the name of the plugin was recently changed, leading to the error. We can fix it by manually downloading a previous version of the plugin.
Link:https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp&ssr=false#review-details
I don't do Unity development, but this may help: https://code.visualstudio.com/docs/other/unity
Keep in mind that VSCode is only going to be an editor for your project files.
(Can't comment, apologies for the brief answer)
I delete [.vscode\extensions], swith to 1.21.1/February 2018 and then update to 1.42.1. It finally works fine!
Maybe System setup doesn't have the problem. It only occurs on User setup.
That error happens because microsoft changed marketplace publisher from ms-vscode to ms-dotnettools. Mentioned here on github. You can just install the version v1.21.18 and that should solve it.
I have created a new Azure Function app with an Http Trigger in Visual Studio 2017 (which I have just updated to v15.8.4).
Using the generated function, when I try to run it I just get a message box with the error
The debug executable "C:\Users\Paul\AppData\Local\AzureFunctionTools\Releases\2.5.2\cli\func.exe" specified in the 'FunctionApp1' debug profile does not exist.
Sure enough there is no func.exe at that location, just a func.dll.
The file C:\Users\Paul\AppData\Local\AzureFunctionTools\Releases\1.3.0\cli\func.exe does exist.
I have successfully run an Azure function locally before but I assume updating Visual Studio a few times has broken something.
How can I get this working?
I Deleted AzureFunctionsTools and azure-functions-core-tools from C:\Users\ {YourUser} \AppData\Local. And ran the solution again it downloaded the same tools and then executed without errors.
I eventually got this to work by changing the settings in the Debug screen.
I changed Launch from Project to Executable
I set Executable to C:\Users\xxxx\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\func.exe
I changed Application arguments to start
I changed Working Directory to Sourcedirectory\FunctionApp1\FunctionApp1\bin\Debug\netstandard2.0
I would still love to know where the Project settings were getting their values from though...
In my similar case after installing Visual studio 2019 16.11.2 in a new Win 10 S.
I had already AzureFunctionsTools version 3.23.5 installed with func.exe inside the cli folder (without_x64 suffix)
But my newly installed VS 2019 was looking for func.exe in a similar path with only one difference that was (_x64 suffix after cli).
C:\Users\[username]\AppData\Local\AzureFunctionsTools\Releases\3.23.5\cli_x64
After getting no result trying a other solutions mentioned here I finally renamed the existing cli folder to cli_X64 and it worked
How can I get this working?
In your case, it seems that there is no azure function tools v2 , please have a try to install it.
npm i -g azure-functions-core-tools#core --unsafe-perm true
Please also try to update the [Azure functions and Web Jobs tools] to latest version
tool->Extensions and updates
And then try to run the azure function, if there is no corrosponding version it will download it automatically.
Test Result
Update
Check the function tools from the path
C:\Users\{userName}\AppData\Local\AzureFunctionsTools\Releases
I am able to get this working just by targeting .Net Standard 2.0.
Just change to netstandard2.0 in the project file.
Application Settings
Debug Settings
There is no need of providing a path to the func.dll.
I was just having on a fresh install of Visual Studio 2019 (had to uninstall 2017), and it was irritating me to no end.
I have found a solution to the problem, but no reason as to why this problem happened nor why Visual Studio deemed it necessary to make it so hard to fix things (they have no option of installing or reinstalling Azure Functions Tools in VS 2019 or even outside of it).
Solution:
Find a way to download the release. I used npm: npm install -g azure-functions-core-tools#3
(-g is global but you can install it locally, #3 will install the latest 3.x.x)
Replace the entire contents of C:\Users\<username>\AppData\Local\AzureFunctionsTools\Releases\3.4.1\cli_x64 with the version you installed.
For me, it was all the files in \node_modules\azure-functions-core-tools\bin.
What worked for me is combination of above two answers .
Same error I also faced due to anti-virus but can't modify anti-virus since it can be changed by IT Security/networking team and process is time-taking & long process. Another workaround is :
Install azure-functions-core-tools via npm
npm install -g azure-functions-core-tools#3
Change Executable & Working Directory in Debug settings for azure Project settings
Working Directory : C:\<Project path>\bin\Debug\netcoreapp3.1
Executable : C:\Users\<username>\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\func.exe
I have the same problem...pls help me...
I just installed the Xamarin and want to use vs2015 . When I create a new Blank App (Android) and I’m getting the following errors. How can I fix this? I reinstalled vs2015 and reinstalled Xamarin but I’m still getting the errors.
The referenced component ‘Mono.Android’ could not be found.
The referenced component ‘mscorlib’ could not be found.
The referenced component ‘System’ could not be found.
The referenced component ‘System.Core’ could not be found.
The referenced component ‘System.Xml’ could not be found.
The referenced component ‘System.Xml.Linq’ could not be found.
For me, I just ran into this trying to build a project pulled from TFS on a new VS 2015 Update 2 install. Not sure what exactly fixed it but this is what I did:
Download Android API 23 and 22 SDK from the SDK Manager and also updated all other items in SDK Manager (had to close and open it twice to get it totally up-to-date).
Nuget Restore packages (this did not fully fix it).
Followed these instructions where you go into all .csproj file in the solution and remove all mentions of nuget. Also do this in the solution file, but mine had nothing.
Use Package Console and run Update-Package -Reinstall (of if you know these package were building just fine before, I ran ``Update-Package -Reinstall -IgnoreDependencies`) and choose the project if you want.
Still had a couple errors from the Android Resource Designer file so did a build and everything was right in the world again.
For me it was a Mono.Android.dll version issue.
I removed the reference, and added a reference to the right version.
These errors most likely point to an installation with missing pieces (or a corrupt install). Try reinstalling Xamarin (again, yes) with admin privileges if you haven't done so already.
If you check your version information via "Help -> About Microsoft Visual Studio -> Copy Info [button]" and Xamarin isn't listed in the bottom, then your install didn't go through correctly.
Additionally, can you double check you have the Android SDK installed? Open up the start menu and type Android SDK Manager. Run it and make sure you've downloaded the build tools and one of the recent API levels.
For me i had to remove the pcl(portable class library) from the solution then added it back then the issue was resolved.
I have built a tiny wpf app that manages a website I am working on. The key feature of this app is that it allows me to checkout different branches of a theme repository. This works perfectly in visual studio, but when I publish, install and run the app on my windows 8 machine it comes back with:
{"Unable to load DLL 'git2': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"}
I have searched through the internet and stackoverflow. There are similar questions, such as Unable to load DLL 'git2.dll' The specified module could not be found but the answers provided (as well as the answers shown in the github issue described in the answer) bring up another error:
Unable to find an entry point git_reference_oid in git2.dll
I have tried installing the latest through nuget, including a compiled dll and adding the git2.dll, including the libgit2sharp project in my solution. Once again, it works perfectly when I run it all through visual studio, but fails when I publish, install and run it.
I was unsure what information needed to be included so please feel free to comment and let me know so I can update the question.
Thank you!
The computer you're running the installed executable on may lack MSVCR100.DLL or MSVCR110.DLL (depending if git2.dll has been compiled using Visual Studio 2010 or 2012).
A fix has been recently merged in libgit2 which removes the need for this dependency.
Indeed, running dumpbin /IMPORTS git2.dll against those binaries doesn't show any dependency against MSVCR1x0.dll any longer.
The latest tip of the vNext branch of the LibGit2Sharp project embeds those updated git2.dlls. It's recommended to compile the project (using the build.libgit2sharp.cmd tool and use this version (manged assembly + native binaries) instead).