Skip to content

Is it possible to reference System packages without using nuget? #499

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

Closed
Metrowerks opened this issue Oct 24, 2019 · 1 comment
Closed

Comments

@Metrowerks
Copy link

  • If I use nuget reference, I wouldn't be able to run my script with csi:
    #r "nuget: System.DirectoryServices"
    It will give me error
    "error CS0006: Metadata file 'nuget: System.DirectoryServices' could not be found"

  • If I don't use nuget reference, my csx file will work with csi but it won't work with dotnet-script:
    #r "System.DirectoryServices"
    It will give me error
    error CS0006: Metadata file 'System.DirectoryServices.AccountManagement' could not be found

Would it be possible to make my references consistent and work for both csi and dotnet-script? For example, not using nuget with #r for System packages like System.DirectoryServices

@Lazuplis-Mei
Copy link

It actually suppost reference system libraries.

#r "C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\3.0.0-preview8-28405-07\System.Windows.Forms.dll"
#r "C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\3.0.0-preview8-28405-07\System.Drawing.Common.dll"
#r "C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\3.0.0-preview8-28405-07\Accessibility.dll"
#r "C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\3.0.0-preview8-28405-07\Microsoft.Win32.SystemEvents.dll"
using System.Windows.Forms;
Form form = new Form();
form.ShowDialog();

But you need to enter the full path of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants