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

Support for /FU flag broken C++/CLI project #12641

Closed
BartJolling opened this issue Aug 27, 2024 · 6 comments
Closed

Support for /FU flag broken C++/CLI project #12641

BartJolling opened this issue Aug 27, 2024 · 6 comments
Assignees
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service regression A bug that didn't exist in a previous release
Milestone

Comments

@BartJolling
Copy link

Environment

  • OS and Version: Windows 11 version 23H2
  • VS Code Version: 1.92.2
  • C/C++ Extension Version: 1.21.6
  • If using SSH remote, specify OS of remote machine:

Bug Summary and Steps to Reproduce

Bug Summary:
I'm working on a c++/cli project. The intellisense does not recognize the "Concurrent" namespace. I get red squiggles below Concurrent

Regression of #5819

using namespace System::Collections::Concurrent;

Steps to reproduce:

  • Create a c++/cli project
  • Add an /FU flag to System.Collections.Concurrent.dll in the c_cpp_properties.json file
  • Try to instantiatie a Systems::Collections::Concurrent::Dictionary

The /FU flag is ignored, but I can make it work by including the "System.Collections.Concurrent.dll" directly in the code file. This works:

#using "System.Collections.Concurrent.dll"

using namespace System;
using namespace System::Collections::Concurrent;

Expected behavior:
Not needing the workaround to get correct intellisense. The FU flag should not be discarded.

Configuration and Logs

"configurations": [
        {
            "name": "Debug x64 c++/cli",
            "includePath": [
                "${workspaceFolder}/include/"
            ],
            "defines": [
                "_DEBUG",
                "_WINDLL",
                "_UNICODE",
                "UNICODE",
                "BUILD_SHARED_LIB",
                "BUILDING_SHARED_LIB",
                "LIBTIDY_VERSION=\"5.8.0\"",
                "RELEASE_DATE=\"2021.07.10\""
            ],
            "windowsSdkVersion": "10.0.22621.0",
            "compilerPath": "cl.exe",
            "compilerArgs": [
                "/clr:netcore",
                "/AI", "C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref/8.0.7/ref/net8.0",
                "/FU", "C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref/8.0.7/ref/net8.0/System.Collections.Concurrent.dll"
            ],
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "windows-msvc-x64",
            "browse": {
                "path": [
                    "${workspaceFolder}"
                ],
                "limitSymbolsToIncludedHeaders": true
            },            
            "customConfigurationVariables": {
                "Configuration": "Debug",
                "Platform": "x64",
                "OutDir": "${workspaceFolder}/build/x64/Debug/"
            }
        }
    ],
    "version": 4
}

[ C:\Users\a98017094\Repos\tidy-html5-dotnet\src\Tidy.cpp ]:
    Process ID: 9764
    Memory Usage: 92 MB
    Compiler Path: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64\cl.exe
    Includes:
        C:\Users\a98017094\Repos\tidy-html5-dotnet\include
    System Includes:
        C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\include
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\cppwinrt
    Defines:
        _DEBUG
        _WINDLL
        _UNICODE
        UNICODE
        BUILD_SHARED_LIB
        BUILDING_SHARED_LIB
        LIBTIDY_VERSION="5.8.0"
        RELEASE_DATE="2021.07.10"
    Standard Version: ms_c++17
    IntelliSense Mode: windows-msvc-x64
    Other Flags:
        --cppcli_netcore
        --no_using_framework_directory
        --cppcli
        --using_directory
        C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Ref/8.0.7/ref/net8.0
Total Memory Usage: 235 MB

------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 6988

Other Extensions

No response

Additional context

No response

@bobbrow
Copy link
Member

bobbrow commented Aug 27, 2024

@Colengms can you take a look at this one?

@bobbrow bobbrow added bug Language Service regression A bug that didn't exist in a previous release labels Aug 27, 2024
@bobbrow bobbrow added this to the On Deck milestone Aug 27, 2024
@sean-mcmanus
Copy link
Contributor

The last related issue we had was #5819 .

@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Aug 27, 2024

@bobbrow I don't think we've confirmed that this is a regression. It's possible it might be a sub-case of the working scenario.

Oh, the user reported it's a regression of #5819, but it's unclear whether it actually worked in 1.0.0 or not.

@Colengms Colengms moved this to Pull Request in cpptools Aug 27, 2024
@Colengms Colengms modified the milestones: On Deck, 1.22 Aug 27, 2024
@sean-mcmanus sean-mcmanus modified the milestones: 1.22, 1.22.1 Aug 27, 2024
@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Aug 27, 2024

It looks like this bug may have started reproing in 1.15.4: May 1, 2023 (regression from that release).

@Colengms Colengms moved this from Pull Request to Done in cpptools Aug 27, 2024
@Colengms Colengms added the fixed Check the Milestone for the release in which the fix is or will be available. label Aug 27, 2024
@sean-mcmanus
Copy link
Contributor

@BartJollingFixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.22.1

@BartJolling
Copy link
Author

BartJolling commented Aug 30, 2024

I tested and can confirm it works, Thanks for your quick action.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service regression A bug that didn't exist in a previous release
Projects
Status: Done
Development

No branches or pull requests

4 participants