-
Notifications
You must be signed in to change notification settings - Fork 675
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
How can I add an COM reference into a c# proj in vscode #2338
Comments
It sounds like this is really a .NET project question rather than C# for VS Code. Assuming that your project targets .NET Framework, I would expect a legal cc @livarcocc, @dsplaisted, and @nguerrera from the .NET Core SDK team. |
A lot of time has passed since this was posted, but the issue basically boils down to this msbuild issue. The dotnet CLI doesn't support it. I'm currently investigating a workaround using MSBuild for VS 2019 without the IDE. I finally got it to work with the following in my tasks.json file, using msbuild instead of dotnet "tasks": [
{
"label": "build",
"type": "shell",
"command": "msbuild",
"args": [
"/property:GenerateFullPaths=true",
"/t:build",
"/consoleloggerparameters:NoSummary"
],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
}
] And in the csproj file, in my case, I needed to force the platform target to x86 <PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup> |
Closing as answered. |
Yes, we can add a nuget package using the dotnet comand line, but I don't know how to add a COM reference in vscode, just as in vs community and is it supported in omnisharp-vscode?
I have searched the stackoverflow, but no right answer for c# proj in vscode.
-VSCode Version: 1.23.0
-OS Version: Windows 10 1803
The text was updated successfully, but these errors were encountered: