{"action":"created","issue":{"url":"https://api.github.com/repos/OmniSharp/omnisharp-vscode/issues/2136","repository_url":"https://api.github.com/repos/OmniSharp/omnisharp-vscode","labels_url":"https://api.github.com/repos/OmniSharp/omnisharp-vscode/issues/2136/labels{/name}","comments_url":"https://api.github.com/repos/OmniSharp/omnisharp-vscode/issues/2136/comments","events_url":"https://api.github.com/repos/OmniSharp/omnisharp-vscode/issues/2136/events","html_url":"https://github.com/OmniSharp/omnisharp-vscode/issues/2136","id":308350230,"node_id":"MDU6SXNzdWUzMDgzNTAyMzA=","number":2136,"title":"New files showing type or namespace not found but it is their","user":{"login":"ryanzec","id":444206,"node_id":"MDQ6VXNlcjQ0NDIwNg==","avatar_url":"https://avatars2.githubusercontent.com/u/444206?v=4","gravatar_id":"","url":"https://api.github.com/users/ryanzec","html_url":"https://github.com/ryanzec","followers_url":"https://api.github.com/users/ryanzec/followers","following_url":"https://api.github.com/users/ryanzec/following{/other_user}","gists_url":"https://api.github.com/users/ryanzec/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanzec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanzec/subscriptions","organizations_url":"https://api.github.com/users/ryanzec/orgs","repos_url":"https://api.github.com/users/ryanzec/repos","events_url":"https://api.github.com/users/ryanzec/events{/privacy}","received_events_url":"https://api.github.com/users/ryanzec/received_events","type":"User","site_admin":false},"labels":[{"id":362150521,"node_id":"MDU6TGFiZWwzNjIxNTA1MjE=","url":"https://api.github.com/repos/OmniSharp/omnisharp-vscode/labels/Resolved-External","name":"Resolved-External","color":"cccccc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-03-25T13:35:10Z","updated_at":"2018-09-15T03:43:18Z","closed_at":"2018-04-04T14:41:18Z","author_association":"NONE","body":"## Environment data\r\n`dotnet --info` output:\r\nNET Command Line Tools (2.1.4)\r\n\r\nProduct Information:\r\n Version:            2.1.4\r\n Commit SHA-1 hash:  5e8add2190\r\n\r\nRuntime Environment:\r\n OS Name:     Mac OS X\r\n OS Version:  10.12\r\n OS Platform: Darwin\r\n RID:         osx.10.12-x64\r\n Base Path:   /usr/local/share/dotnet/sdk/2.1.4/\r\n\r\nMicrosoft .NET Core Shared Framework Host\r\n\r\n  Version  : 2.0.5\r\n  Build    : 17373eb129b3b05aa18ece963f8795d65ef8ea54\r\n\r\nVS Code version: 1.21.1\r\nC# Extension version: 1.14.0\r\n\r\n## Steps to reproduce\r\nCreate a new file after loading a Unity Project\r\n\r\n## Expected  behavior\r\nNo Error\r\n\r\n## Actual behavior\r\nThe editor is showing red line with `type or namespace could not be found` when it is actually their. I can `go to definition` and it loads the right file, the code compiles and executes properly in Unity.\r\n\r\n![screen shot 2018-03-25 at 9 11 31 am](https://user-images.githubusercontent.com/444206/37875603-e1271e6e-300f-11e8-8e7d-7fec26fbe693.png)\r\n\r\nNot sure what could cause this. I know if I do:\r\n\r\n`dotnet build Assembly-CSharp.csproj`\r\n\r\nI get the following error (same error when I do a build on any of the Unity csproj files):\r\n\r\n```\r\nMicrosoft (R) Build Engine version 15.5.180.51428 for .NET Core\r\nCopyright (C) Microsoft Corporation. All rights reserved.\r\n\r\n  Nothing to do. None of the projects specified contain packages to restore.\r\n/usr/local/share/dotnet/sdk/2.1.4/Microsoft.Common.CurrentVersion.targets(1124,5): error \r\nMSB3644: The reference assemblies for framework \".NETFramework,Version=v3.5\" were \r\nnot found. To resolve this, install the SDK or Targeting Pack for this framework version or \r\nretarget your application to a version of the framework for which you have the SDK or \r\nTargeting Pack installed. Note that assemblies will be resolved from the Global Assembly \r\nCache (GAC) and will be used in place of reference assemblies. Therefore your assembly \r\nmay not be correctly targeted for the framework you intend. \r\n[/repositories/arpg-project/Assembly-CSharp.csproj]\r\n\r\nBuild FAILED.\r\n\r\n/usr/local/share/dotnet/sdk/2.1.4/Microsoft.Common.CurrentVersion.targets(1124,5): error \r\nMSB3644: The reference assemblies for framework \".NETFramework,Version=v3.5\" were \r\nnot found. To resolve this, install the SDK or Targeting Pack for this framework version or \r\nretarget your application to a version of the framework for which you have the SDK or \r\nTargeting Pack installed. Note that assemblies will be resolved from the Global Assembly \r\nCache (GAC) and will be used in place of reference assemblies. Therefore your assembly \r\nmay not be correctly targeted for the framework you intend. \r\n[/repositories/arpg-project/Assembly-CSharp.csproj]\r\n    0 Warning(s)\r\n    1 Error(s)\r\n\r\nTime Elapsed 00:00:00.60\r\n```\r\n\r\nHowever I don't seem to see that error in the vscode output logs (I only get this when I run `dotnet` manually). I have tried this with both 5.8.0 and 5.10.0 of Mono installed and can't figure it out.\r\n\r\nThis same code / project load fine and shows no errors in Rider.\r\n\r\nAny help in trying to debug this would be awesome."},"comment":{"url":"https://api.github.com/repos/OmniSharp/omnisharp-vscode/issues/comments/421527907","html_url":"https://github.com/OmniSharp/omnisharp-vscode/issues/2136#issuecomment-421527907","issue_url":"https://api.github.com/repos/OmniSharp/omnisharp-vscode/issues/2136","id":421527907,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTUyNzkwNw==","user":{"login":"Hivemind9000","id":4607635,"node_id":"MDQ6VXNlcjQ2MDc2MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/4607635?v=4","gravatar_id":"","url":"https://api.github.com/users/Hivemind9000","html_url":"https://github.com/Hivemind9000","followers_url":"https://api.github.com/users/Hivemind9000/followers","following_url":"https://api.github.com/users/Hivemind9000/following{/other_user}","gists_url":"https://api.github.com/users/Hivemind9000/gists{/gist_id}","starred_url":"https://api.github.com/users/Hivemind9000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hivemind9000/subscriptions","organizations_url":"https://api.github.com/users/Hivemind9000/orgs","repos_url":"https://api.github.com/users/Hivemind9000/repos","events_url":"https://api.github.com/users/Hivemind9000/events{/privacy}","received_events_url":"https://api.github.com/users/Hivemind9000/received_events","type":"User","site_admin":false},"created_at":"2018-09-15T03:43:18Z","updated_at":"2018-09-15T03:43:18Z","author_association":"NONE","body":"I'm having the exact same issue on Windows 10. Happens when I create a new script/class from within Unity then edit it in VS Code - OmniSharp doesn't seem to dynamically update the namespace references. Unity has no problem - compiles/runs. If I create the script/class from within VS Code it produces a type mismatch warning rather than an error.\r\n\r\nWorkaround is to close and reopen VS Code. Thankfully VS Code starts up nice and quick.\r\n\r\nRunning:\r\nVisual Studio Code 1.27.2\r\nC# for Visual Studio Code 1.16.1\r\nUnity 2018.2\r\n\r\ndotnet --info\r\n\r\n.NET Core SDK (reflecting any global.json):\r\n Version:   2.1.402\r\n Commit:    3599f217f4\r\n\r\nRuntime Environment:\r\n OS Name:     Windows\r\n OS Version:  10.0.17134\r\n OS Platform: Windows\r\n RID:         win10-x64\r\n Base Path:   C:\\Program Files\\dotnet\\sdk\\2.1.402\\\r\n\r\nHost (useful for support):\r\n  Version: 2.1.4\r\n  Commit:  85255dde3e\r\n\r\n.NET Core SDKs installed:\r\n  2.1.402 [C:\\Program Files\\dotnet\\sdk]\r\n\r\n.NET Core runtimes installed:\r\n  Microsoft.AspNetCore.All 2.1.4 [C:\\Program Files\\dotnet\\shared\\Microsoft.AspNetCore.All]\r\n  Microsoft.AspNetCore.App 2.1.4 [C:\\Program Files\\dotnet\\shared\\Microsoft.AspNetCore.App]\r\n  Microsoft.NETCore.App 2.1.4 [C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App]\r\n\r\nTo install additional .NET Core runtimes or SDKs:\r\n  https://aka.ms/dotnet-download"}}
{"actor":{"display_login":"Hivemind9000"}}