Skip to content

Cannot add NuGet packages #584

Closed
Closed
@AndiRudi

Description

@AndiRudi

I am trying to use a NuGet package with dotnet-script. I have initialized a new script project as explained and added this into the main.csx file and restarted omnisharp. The using directive is always underlined with "Type or namespace could not be found". I even do not see that any NuGet packages were downloaded.

#!/usr/bin/env dotnet-script
#r "nuget:GraphQlClientGenerator,0.7.3"
using GraphQLClientGenerator;

Here is the log

Starting OmniSharp server at 10/14/2020, 2:23:52 PM
    Target: /Users/x/repos/integration-service/Source/Clients/x/Generate

OmniSharp server started.
    Path: /Users/x/.vscode/extensions/ms-dotnettools.csharp-1.23.3/.omnisharp/1.37.2/run
    PID: 50143

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on MacOS 10.15.6 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 16.8.0 - "/Users/x/.vscode/extensions/ms-dotnettools.csharp-1.23.3/.omnisharp/1.37.2/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to '/Users/x/.vscode/extensions/ms-dotnettools.csharp-1.23.3/.omnisharp/1.37.2/omnisharp/.msbuild/Current/Bin/MSBuild.exe'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 16.8.0 - "/Users/x/.vscode/extensions/ms-dotnettools.csharp-1.23.3/.omnisharp/1.37.2/omnisharp/.msbuild/Current/Bin"
            CscToolExe = csc.exe
            MSBuildToolsPath = /Users/x/.vscode/extensions/ms-dotnettools.csharp-1.23.3/.omnisharp/1.37.2/omnisharp/.msbuild/Current/Bin
            CscToolPath = /Users/x/.vscode/extensions/ms-dotnettools.csharp-1.23.3/.omnisharp/1.37.2/omnisharp/.msbuild/Current/Bin/Roslyn
            BypassFrameworkInstallChecks = true
            MSBuildExtensionsPath = /Users/x/.vscode/extensions/ms-dotnettools.csharp-1.23.3/.omnisharp/1.37.2/omnisharp/.msbuild
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/Users/x/repos/integration-service/Source/Clients/x/Generate'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
        No solution files found in '/Users/x/repos/integration-service/Source/Clients/x/Generate'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/x/repos/integration-service/Source/Clients/x/Generate'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Found 1 CSX files.
[info]: OmniSharp.Script.ScriptContextProvider
        Searching for compilation dependencies with the fallback framework of 'netcoreapp3.1'.
[fail]: OmniSharp.Script.ScriptContextProvider
        Failed to resolve compilation dependencies
[info]: OmniSharp.Script.ScriptContextProvider
        Unable to find dependency context for CSX files. Will default to non-context usage (Desktop CLR scripts).
[info]: OmniSharp.Script.ScriptProjectSystem
        Added CSX project '/Users/x/repos/integration-service/Source/Clients/x/Generate/main.csx' to the workspace.
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/Users/x/repos/integration-service/Source/Clients/x/Generate' on host 49973.
[info]: OmniSharp.Roslyn.CSharp.Services.Diagnostics.CSharpDiagnosticWorkerWithAnalyzers
        Solution initialized -> queue all documents for code analysis. Initial document count: 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy