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

Problems With VS Code #451

Open
eraban24 opened this issue Nov 26, 2020 · 11 comments
Open

Problems With VS Code #451

eraban24 opened this issue Nov 26, 2020 · 11 comments

Comments

@eraban24
Copy link

Hi! I recently switched to VS Code. I tried opening one of old project(1-2 weeks old) that contained DOtween. I open up some scripts but VS Code gives me errors that there are no dotween Functions. While I still remember it worked well with only VS, the problem is only in VS Code as there are no errors in the unity editor and I can still play the game as before.

The VS Code Window:
26 11 2020_20 52 09_REC

The Unity Editor:
26 11 2020_20 52 23_REC

Anyone Knows Why This is happening?

@Demigiant
Copy link
Owner

This has started happening in the last couple months and only with VS Code (VS Community and other IDEs have no problem). I'm not sure if it's a Unity problem in how it creates the proj files or a VS Code one with Unity, but I think the latter because otherwise Unity would report an error. It seems the issue is with extension methods, which VS Code isn't capable of recognizing appropriately. Hope it gets patched soon because it's a pretty huge bug :|

@eraban24
Copy link
Author

Thanks For replying so Quick!
Yeah I hope too it gets fixed soon.

@eraban24
Copy link
Author

By the way, I recently created a new project with VS Code containing DOTween and it is working fine. There are no errors either in VS Code or in Unity Editor.

@Demigiant
Copy link
Owner

A possible fix is to close Unity, delete the project and solution files (.csproj, .user, .userprefs) in the root of the project, then restart Unity and let it recreate the IDE files. I think it might be a problem with old project files when upgrading to VS Code, so a clean recreation should work.

@eraban24
Copy link
Author

OK!

@Demigiant
Copy link
Owner

Let me know :)

@eraban24
Copy link
Author

Yeah Sure!

@eraban24
Copy link
Author

Alright, so I deleted everything you said me to delete and I reopened the project and it worked until I created a new script or moved anything in the assets folder which resulted in Unity compiling and then when I opened VS Code the errors were back Again.

@joonjoonjoon
Copy link

I am encountering this too. UInity 2020.3.8f1, VScode 1.61.2

@joonjoonjoon
Copy link

joonjoonjoon commented Oct 22, 2021

I manually added

    <Reference Include="DOTween">
        <HintPath>/[PATH_TO_UNITY_PROJECT]/Assets/Plugins/Demigiant/DOTween/DOTween.dll</HintPath>
    </Reference>    

to the auto-generated file
Assembly-CSharp-Editor-firstpass.csproj

and that seems to fix it.
I even regenerated project files from Unity afterwards but it didn't get overwritten. So hopefully it stays fixed now somehow?

@paulkckho
Copy link

How do we solve this nagging problem?

'display: grid' is not supported by Internet Explorer. Add 'display: -ms-grid' to support Internet Explorer 10+.

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

No branches or pull requests

4 participants