Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 1.25.0. I can't use F12,and check reference in Unity C# project. #5231

Open
Liweitalent opened this issue May 26, 2022 · 6 comments

Comments

@Liweitalent
Copy link

Environment data

dotnet --info output:
VS Code version: 1.67.2
C# Extension version:1.25.0

OmniSharp log

Steps to reproduce

  1. Open Unity C# project
  2. Use F12 can't go to defence.
  3. can't check reference property
  4. back to C#1.24.4 ,That errors is disappear

Expected behavior

A clear and concise description of what you expected to happen.

Actual behavior

Additional context

I worked normal yesterday.
But Today , It is working error ,and i check edior update c# extension in 2022/5/25.
So I back up to 1.24.4 .It can work

@Mister-Nebbers
Copy link

Had the same problem, this posted helped.
#5120 (comment)

After you change the setting, you'll probably have to restart VS Code and then the dependency will install for you, then it should work normally again.

@AlejandroHuerta
Copy link

Had the same problem, this posted helped. #5120 (comment)

After you change the setting, you'll probably have to restart VS Code and then the dependency will install for you, then it should work normally again.

I tried that and it didn't fix the issue for me. Looks like OmniSharp is looking for DOT_NET_ROOT. Downgrading back to 1.24.4 works for me. I'm not going to expect this extension to fix the issue considering Unity has fallen so far behind the C# eco system.

Starting OmniSharp on Windows 6.2.9200.0 (x64)
info: OmniSharp.Services.DotNetCliService
Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK
info: OmniSharp.Services.DotNetCliService
Using the 'dotnet' on the PATH.
info: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 0 MSBuild instance(s)

@JoeRobich
Copy link
Member

@AlejandroHuerta If you are doing Full Framework development on Windows (omnisharp.useModernNet: false) then you will need to install the Visual Studio MSBuild Tools.

@Mubeyd
Copy link

Mubeyd commented Jun 1, 2022

Quick Solution for every platform (Windows, Linux, Mac)

  • Set VS Code update mode to 'manual'
  • Disable Windows Background Updates
  • Downgrade the VS Code version to February 2022 (version 1.65)
  • Downgrade the C# extension version to v1.24.4

everything will be fine 💯

@Mubeyd
Copy link

Mubeyd commented Jun 10, 2022

Quick Solution for every platform (Windows, Linux, Mac)

  • Set VS Code update mode to 'manual'
  • Disable Windows Background Updates
  • Downgrade the VS Code version to February 2022 (version 1.65)
  • Downgrade the C# extension version to v1.24.4

everything will be fine 💯
Closed / resolved /updated / .NET 5 / .NET 6
#5253 (comment)

@AlejandroHuerta
Copy link

@AlejandroHuerta If you are doing Full Framework development on Windows (omnisharp.useModernNet: false) then you will need to install the Visual Studio MSBuild Tools.

That fixed it for me. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants