Open NakOh opened 6 years ago
Occurs after updating to the latest VS Code.
@NakOh If you dotnet build
your project, are there any errors?
This looks like a Unity project rather than a .NET Core project, so I'd expect dotnet build
to fail.
@NakOh: Have you tried building your Unity project?
@DustinCampbell building the unity project will not help.
@aohajin : Why would it not help? Based on the error, my assumption is that the project is expecting to find a binary on disk that isn't present.
How to build dotnet Build?
.NET Core용 Microsoft (R) Build Engine 버전 15.5.179.9764 Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1011: 사용할 프로젝트 또는 솔루션 파일을 지정하십시오. 이 폴더에 프로젝트 또는 솔루션 파일이 두 개 이상 있습니다.
It's korean.
It means. One More Project or Solution in Folder
And
.NET Core용 Microsoft (R) Build Engine 버전 15.5.179.9764 Copyright (C) Microsoft Corporation. All rights reserved.
/Users/minsookim/GitHub/PlayHoldemClient/PlayHoldemClient.sln : 솔루션 파일 error MSB5004: 솔루션 파일에 이름이 "PlayHoldemClient"인 프로젝트가 두 개 있습니다.
빌드하지 못했습니다.
/Users/minsookim/GitHub/PlayHoldemClient/PlayHoldemClient.sln : 솔루션 파일 error MSB5004: 솔루션 파일에 이름이 "PlayHoldemClient"인 프로젝트가 두 개 있습니다. 경고 0개 오류 1개 It means Two Project in same file...
@NakOh: @rchande's suggestion won't work. Building a Unity project with dotnet build
will not work. Have you tried building it with xbuild
from your Mono installation?
If i xbuild -> msbuild .
@DustinCampbell because the dll required was not at the place where omnisharp thought it should be..
for my case
but Unity(5.6.5f1) actually put the dll here: C:\xiimoon\Ngame\Library\ScriptAssemblies\Assembly-CSharp.dll
@NakOh did you tried to install mono package from homebrew? If not - try it, unity projects works on my side with dotnet + mono. Looks like this extension will never work as should, better to use old good checked solutions like mono.
FWIW, to work with Unity, I recommend installing mono from brew like so:
brew cask install mono-mdk
rather than
brew cask mono
The latter does not include large swaths of Mono, including Mono's msbuild (which OmniSharp will use if present).
@DustinCampbell standard mono
package was broken half year ago, now it works, I use it instead of cask mono-mdk
:
brew install mono
it works now? Cool! I haven't looked at it in quite awhile.
> brew info mono
mono: stable 5.4.1.6 (bottled)
and 2 packages:
brew cask install dotnet
brew cask install dotnet-sdk
I just tried brew install mono
and it still doesn't include Mono's MSBuild. So, installing the MDK is still needed to allow more project types to work with C# for VS Code. However, if it works for you -- great!
Well, it works for unity projects on osx, I dont care about vscode as standalone C# development editor, only as IDE-companion for unity.
@DustinCampbell btw, I checked omnisharp log, it filled with warnings too, but no errors and intellisense works correctly.
OK. I installed
brew install mono brew cask instasll dotnet brew cask install dotnet-sdk brew cask install mono-mdk
There was no problem with the original operation, but I was constantly concerned about this warning.
I will give up and just use vsCode..
@NakOh I have only 3 packages installed through homebrew:
mono
cask dotnet
cask dotnet-sdk
With unity 2017.3 i have similar warnings at log: https://gist.github.com/Leopotam/316ccbb113ae191e73618ec432ef3492 But no errors that stops normal execution of this extension.
@Leopotam Yeah. No Error Yes Warning. I might ignore this problem. but I do not want to see the warning. Why should I look at the warning text that there are no problems?
i want to fix this problem..
@NakOh I dont remember (I dont see any settings at my prefs about it), but there is "gear" button at notification window, maybe you can tweak this behaviour through some settings there?
@Leopotam It is only a temporary solution, and I want a fundamental solution. I hope that OmniSharp's Development Team will be able to solve this problem.
@NakOh ahaha, you have the sense of humor :D You can check last year of development in commits list - they fixed only unit-tests support, nothing more. All critical fixes were did by community PRs. So, if you want to see how MS-team works - you will die for age first. If you want to see solution - you should doing it by yourself and make PR.
@Leopotam I am grateful for the good points and will try to solve the problem. Thank you~
Hi @NakOh @Leopotam The warning about project load issues may or may not reflect a problem. OmniSharp raises this warning if there are actual issues loading the project, or if there are MSBuild warnings when building/restoring the project. We plan to fix this via https://github.com/OmniSharp/omnisharp-vscode/issues/2110.
You can verify that these warnings are ignorable by building/restoring your project and seeing if there are any warnings or errors. If there are, this is what OmniSharp is prompting for. I agree that this behavior is annoying and that's why we plan to fix it.
I've been trying to setup vscode for use with an existing project and am having the same issue as @aohajin above.
My system, Darwin x86_64
mono: 5.10.1.47
dotnet: 2.1.4
VS Code C#: 1.15.2
I've been trying to setup vscode for use with an existing project and am having the same issue as @aohajin above.
My system,
Darwin x86_64
mono:5.10.1.47
dotnet:2.1.4
VS Code C#:1.15.2
I was just in the same boat, @iambumblehead. I believe if you change your OutputPath in your .csproj files that should fix your problems, though!
I'm getting the wrong directory issue too. dlls and such are expected to be in temp/bin, are actually in library/ScriptAssemblies instead.
... I believe if you change your OutputPath in your .csproj files that should fix your problems, though!
@TheWanderingBen I tried this and it worked for a while, until those lines got switched back again in my .csproj files later on the same day :/ Is there a way to make the change permanently?
@NakOh It's so long time ago but for the others, just using 'Debugger for Unity' extension, since than everything is good.
I use Debugger for Unity and still have this issue.
warning still here after reinstall vscode and mono :-(
I'm suppose a reference find fail problem affect by this one.
The problem occurred when create a new .cs file and it code reference some existing class.
For detail message:
@LoranceChen its because omnisharp-vscode
dev-team dont want to support updating *.csproj
files in old format (before .net std) if you will add new *.cs
-file right inside vscode
. You can fix this behaviour with switching to unity
(it should start compilation + *.csproj
-files will be regenerated with links to new *.cs
-files), then switch back to vscode
and run command reload window
from command palette. vscode
will restart plugins and omnisharp-vscode
will get new list of project *.cs
-files.
Same behaviour for any new *.cs
-files, even created inside unity - you should restart omnisharp-vscode
plugin each time on each change on project files list.
@Leopotam, Thanks. reload window
fix the problem. But it's not a normal develop workflow.It seems VS Code not ready for Unity develop yet :-(
@LoranceChen shit happens, its my standard workflow on osx last 3 years. Custom codestyle formatting - same thing, no any progress from omnisharp-vscode
team last 3 years :)
But vs for mac
still worse than vscode + omnisharp
- slower, consumes more resources, etc.
JetBrains Rider
much better with code analytics, but worst IDE for performance reasons. But it will be my next choice if they will release community edition.
I'm getting the wrong directory issue too. dlls and such are expected to be in temp/bin, are actually in library/ScriptAssemblies instead.
... I believe if you change your OutputPath in your .csproj files that should fix your problems, though!
@TheWanderingBen I tried this and it worked for a while, until those lines got switched back again in my .csproj files later on the same day :/ Is there a way to make the change permanently?
I got it working by dropping a symbolic link of Library/ScriptAssemblies into Temp/bin named Debug. It's possible via cmd or with this neat shell extension: http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html It's a dirty hack and I wish someone could point me to the real solution to this issue ❤️
I'm getting the wrong directory issue too. dlls and such are expected to be in temp/bin, are actually in library/ScriptAssemblies instead.
... I believe if you change your OutputPath in your .csproj files that should fix your problems, though!
@TheWanderingBen I tried this and it worked for a while, until those lines got switched back again in my .csproj files later on the same day :/ Is there a way to make the change permanently?
I got it working by dropping a symbolic link of Library/ScriptAssemblies into Temp/bin named Debug. It's possible via cmd or with this neat shell extension: http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html It's a dirty hack and I wish someone could point me to the real solution to this issue ❤️
Nice solution.
Did you get it to last any decent amount of time? My symlink keeps getting deleted.
@schplorg, for me symbolic links didn't help. They just removed "Unable to resolve assembly" warnings =(
I tried these commands: mklink /J "c:\<project>\Temp\bin\Debug" "C:\<project>\Library\ScriptAssemblies"
, mklink /D "c:\<project>\Temp\bin\Debug" "C:\<project>\Library\ScriptAssemblies"
What's interesting, I have the same project at home and at work, and definitions started not working only at work. =(
Yeah, and this feature works fine in Visual Studio.
Well, now that's really strange, even changing OutputPath in CSPROJ files doesn't help: <OutputPath>Library\ScriptAssemblies\</OutputPath>
. Again it just removes warnings
Could someone help here?
BTW, it's interesting, that VS code knows about methods and documentation in these DLLs, but can't Go to Definition =D
same issue for me, can not found the assembles in Temp/bin/Debug so, the intellisense could not work.
Could someone help here? BTW, it's interesting, that VS code knows about methods and documentation in these DLLs, but can't Go to Definition =D
This is a regression in extension 1.21.4. See here for a workaround https://github.com/OmniSharp/omnisharp-vscode/issues/3326#issuecomment-539322963
you could also install 1.21.5 VSIX from https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.21.5 (it's not yet available on the marketplace)
Thanks, @filipw, adding "omnisharp.path": "latest"
to global (user) settings.json fixed the issue.
yep - I would just advise to remove it after 1.21.5 is shipped to the marketplace, since with "omnisharp.path": "latest"
you opt into pulling the latest OmniSharp server build from master each time it's out there - which means it can be:
a) potentially unstable b) slow c) possibly incompatible with the C# extension
v1.21.5 is out in the Marketplace 🎉
yes correct it was published yesterday 👍
Environment data
dotnet --info
output:VS Code version:
Version 1.20.1(1.20.1)
C# Extension version:
1.14.0
Steps to reproduce
Open Project ->
Expected behavior
Don't Error
Actual behavior
Log :