vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

Not identifying internal class

Open ftathiago opened this issue 2 years ago • 1 comments
trafficstars

Issue Description

IDE can not identify internal classes.

Steps to Reproduce

1 - Create two projects: one for tests e other with actual source code. 2 - Configure a Directory.Build.props, allowing the tests project access internal class

<Project>
  <PropertyGroup>
    <LangVersion>latest</LangVersion>
  </PropertyGroup>
  <ItemGroup>
    <InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
    <InternalsVisibleTo Include="PocCache.Cache.Tests" />
  </ItemGroup>
</Project>

3 - Try to add a reference to internal class

4 - Watch it fail.

Expected Behavior

When add a internal reference, in cross projects, the C# should identify this as a ordinary reference and add the using namespace correctly

Actual Behavior

Non using is add and the vscode identifys a class as inascessible.

C# log

Post the output from Output-->C# here

C# LSP Trace Logs

Post the output from Output-->C# LSP Trace Logs here. Requires `dotnet.server.trace` to be set to `Trace`

Environment information

VSCode version: 1.80.2 C# Extension: 2.0.312 Using OmniSharp: false

Dotnet Information

Host: Version: 7.0.9 Architecture: x64 Commit: 8e9a17b221

.NET SDKs installed: No SDKs were found.

.NET runtimes installed: Microsoft.NETCore.App 7.0.9 [/home/ftathiago/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.9/shared/Microsoft.NETCore.App]

Other architectures found: None

Environment variables: Not set

global.json file: Not found

Learn more: https://aka.ms/dotnet/info

Download .NET: https://aka.ms/dotnet/download

Visual Studio Code Extensions
Extension Author Version Folder Name
asyncapi-preview asyncapi 0.5.1 asyncapi.asyncapi-preview-0.5.1
azure-account ms-vscode 0.11.5 ms-vscode.azure-account-0.11.5
c4-dsl-extension systemticks 3.4.2 systemticks.c4-dsl-extension-3.4.2
code-spell-checker streetsidesoftware 2.20.5 streetsidesoftware.code-spell-checker-2.20.5
code-spell-checker-portuguese-brazilian streetsidesoftware 2.1.0 streetsidesoftware.code-spell-checker-portuguese-brazilian-2.1.0
codesnap adpyke 1.3.4 adpyke.codesnap-1.3.4
color-highlight naumovs 2.5.0 naumovs.color-highlight-2.5.0
csdevkit ms-dotnettools 0.2.100 ms-dotnettools.csdevkit-0.2.100-linux-x64
csharp ms-dotnettools 2.0.312 ms-dotnettools.csharp-2.0.312-linux-x64
csharp-format-usings gaoshan0621 0.0.4 gaoshan0621.csharp-format-usings-0.0.4
csharpextensions kreativ-software 1.7.3 kreativ-software.csharpextensions-1.7.3
database-modeling-markdown stevennyang 2.0.2 stevennyang.database-modeling-markdown-2.0.2
EditorConfig EditorConfig 0.16.4 editorconfig.editorconfig-0.16.4
git-graph mhutchie 1.30.0 mhutchie.git-graph-1.30.0
gitblame waderyan 10.4.0 waderyan.gitblame-10.4.0
gitlens eamodio 14.1.1 eamodio.gitlens-14.1.1
isort ms-python 2023.10.1 ms-python.isort-2023.10.1
jupyter ms-toolsai 2023.6.1101941928 ms-toolsai.jupyter-2023.6.1101941928-linux-x64
jupyter-renderers ms-toolsai 1.0.17 ms-toolsai.jupyter-renderers-1.0.17
kubernator-vscode smpio 1.0.0 smpio.kubernator-vscode-1.0.0
live-server ms-vscode 0.4.9 ms-vscode.live-server-0.4.9
markdown-all-in-one yzhang 3.5.1 yzhang.markdown-all-in-one-3.5.1
markdown-mermaid bierner 1.19.0 bierner.markdown-mermaid-1.19.0
mongodb-vscode mongodb 1.1.0 mongodb.mongodb-vscode-1.1.0
netcore-editorconfiggenerator doggy8088 0.1.1 doggy8088.netcore-editorconfiggenerator-0.1.1
nugetpackagemanagergui aliasadidev 2.0.6 aliasadidev.nugetpackagemanagergui-2.0.6
plantuml jebbs 2.17.5 jebbs.plantuml-2.17.5
powershell ms-vscode 2023.6.0 ms-vscode.powershell-2023.6.0
previewseqdiag-vscode arichika 0.4.3 arichika.previewseqdiag-vscode-0.4.3
python ms-python 2023.12.0 ms-python.python-2023.12.0
sarif-viewer MS-SarifVSCode 3.3.9 ms-sarifvscode.sarif-viewer-3.3.9
sonarlint-vscode SonarSource 3.19.2 sonarsource.sonarlint-vscode-3.19.2-linux-x64
svg-gallery developer2006 2.1.0 developer2006.svg-gallery-2.1.0
todo-tree Gruntfuggly 0.0.226 gruntfuggly.todo-tree-0.0.226
uuid-generator netcorext 0.0.5 netcorext.uuid-generator-0.0.5
vs-code-bpmn-io bpmn-io 0.15.4 bpmn-io.vs-code-bpmn-io-0.15.4
vscode-azureappservice ms-azuretools 0.25.0 ms-azuretools.vscode-azureappservice-0.25.0
vscode-azurefunctions ms-azuretools 1.12.1 ms-azuretools.vscode-azurefunctions-1.12.1
vscode-azureresourcegroups ms-azuretools 0.7.5 ms-azuretools.vscode-azureresourcegroups-0.7.5
vscode-combine-scripts BateleurIO 2.0.5 bateleurio.vscode-combine-scripts-2.0.5
vscode-commons redhat 0.0.6 redhat.vscode-commons-0.0.6
vscode-coverage-gutters ryanluker 2.11.0 ryanluker.vscode-coverage-gutters-2.11.0
vscode-docker ms-azuretools 1.26.0 ms-azuretools.vscode-docker-1.26.0
vscode-dotnet-runtime ms-dotnettools 1.6.0 ms-dotnettools.vscode-dotnet-runtime-1.6.0
vscode-edit-csv janisdd 0.7.6 janisdd.vscode-edit-csv-0.7.6
vscode-graphviz joaompinto 0.0.6 joaompinto.vscode-graphviz-0.0.6
vscode-jupyter-cell-tags ms-toolsai 0.1.8 ms-toolsai.vscode-jupyter-cell-tags-0.1.8
vscode-jupyter-slideshow ms-toolsai 0.1.5 ms-toolsai.vscode-jupyter-slideshow-0.1.5
vscode-k3d inercia 0.0.10 inercia.vscode-k3d-0.0.10
vscode-kubernetes-tools ms-kubernetes-tools 1.3.13 ms-kubernetes-tools.vscode-kubernetes-tools-1.3.13
vscode-markdownlint DavidAnson 0.51.0 davidanson.vscode-markdownlint-0.51.0
vscode-openapi 42Crunch 4.18.5 42crunch.vscode-openapi-4.18.5
vscode-pull-request-github GitHub 0.68.1 github.vscode-pull-request-github-0.68.1
vscode-resx-editor DominicVonk 0.0.5 dominicvonk.vscode-resx-editor-0.0.5
vscode-sqlite alexcvzz 0.14.1 alexcvzz.vscode-sqlite-0.14.1
vscode-svgviewer cssho 2.0.0 cssho.vscode-svgviewer-2.0.0
vscode-yaml redhat 1.14.0 redhat.vscode-yaml-1.14.0
vscodeintellicode-csharp ms-dotnettools 0.1.26 ms-dotnettools.vscodeintellicode-csharp-0.1.26-linux-x64
vsliveshare ms-vsliveshare 1.0.5877 ms-vsliveshare.vsliveshare-1.0.5877
xml DotJoshJohnson 2.5.1 dotjoshjohnson.xml-2.5.1

ftathiago avatar Jul 30 '23 15:07 ftathiago

After nine months later and no one even looked at this issue? I'm seeing this issue now with vs code. However, using vs for mac, the issue goes away.

gcadmes-extron avatar Apr 23 '24 17:04 gcadmes-extron