disroop / vs-code-conan

Conan integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=disroop.conan
MIT License
18 stars 10 forks source link

stderr: ERROR: Conanfile not found at /d:/reps/myproject/conanfile.py #137

Closed philsuess closed 2 years ago

philsuess commented 2 years ago

Hi, I'm using 0.8.2 and use the settings files that worked before but I get the error

stderr: ERROR: Conanfile not found at /d:/reps/myproject/conanfile.py

That first / irritates me and may be the cause of the error?

Here is the content of my .vscode/conan-settings.json but I already tried variations of the "conanFile" field. The profiles are fine and everything works manually.

{
    "profiles": [
        {
            "name": "win_debug",
            "conanFile": "${workspaceFolder}/conanfile.py",
            "profile": "vs2019_debug",
            "installArg": "-pr:h vs2019_debug -pr:b vs2019_debug",
            "createUser": "conan_user",
            "createChannel": "testing",
            "createArg": "--build=missing"
        },
        {
            "name": "win_release",
            "conanFile": "${workspaceFolder}/conanfile.py",
            "profile": "vs2019",
            "installArg": "-pr:h vs2019 -pr:b vs2019",
            "createUser": "conan_user",
            "createChannel": "testing",
            "createArg": "--build=missing"
        }
    ]
}
mymichu commented 2 years ago

I will have a look. Must be something minor, I will keep you updated.

mymichu commented 2 years ago

It is related to vscode plugin api. I will try to fix it in the upcoming week.

https://github.com/microsoft/vscode/issues/99938#issuecomment-648647585https://github.com/microsoft/vscode/issues/99938#issuecomment-648647585

mymichu commented 2 years ago

ignore those changes :) i had some issues with the Github UI ;)

mymichu commented 2 years ago

a workaround for the moment could be to replace ${workspaceFolder}/conanfile.py with ./conanfile.py. But I am still working on it.

philsuess commented 2 years ago

Thanks for your efforts. I really appreciate the extension.

a workaround for the moment could be to replace ${workspaceFolder}/conanfile.py with ./conanfile.py. But I am still working on it.

That doesn't help unfortunately:

command: conan install --profile:build vs2019_debug --profile:host vs2019_debug  --install-folder /d:/reps/myproject/build/win_debug ./conanfile.py
stderr: ERROR: Conanfile not found at C:\Users\philsuess\AppData\Local\Programs\Microsoft VS Code\conanfile.py
mymichu commented 2 years ago

Hi @philsuess your issue is fixed. I uploaded the version 0.8.4 on the vscode marketplace. Feel free to add a rating