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

can't add package through package manager console #54

Closed
Shadowblitz16 opened this issue Jun 6, 2020 · 7 comments
Closed

can't add package through package manager console #54

Shadowblitz16 opened this issue Jun 6, 2020 · 7 comments
Labels
duplicate This issue or pull request already exists

Comments

@Shadowblitz16
Copy link

Shadowblitz16 commented Jun 6, 2020

package manager doesn't work with this

PM> dotnet add Rouge package Raylib-cs
  Writing C:\Users\Shadowblitz16\AppData\Local\Temp\tmp4C7E.tmp
info : Adding PackageReference for package 'Raylib-cs' into project 'C:\Users\Shadowblitz16\Documents\Visual Studio 2019\Projects\Cs\Rouge\Rouge\Rouge.csproj'.
error: Error while adding package 'Raylib-cs' to project 'C:\Users\Shadowblitz16\Documents\Visual Studio 2019\Projects\Cs\Rouge\Rouge\Rouge.csproj'. The project does not support adding package references through the add package command.

Usage: NuGet.CommandLine.XPlat.dll package add [options]

Options:
  -h|--help               Show help information
  --force-english-output  Forces the application to run using an invariant, English-based culture.
  --package               Id of the package to be added.
  --version               Version of the package to be added.
  -d|--dg-file            Path to the dependency graph file to be used to restore preview and compatibility check.
  -p|--project            Path to the project file.
  -f|--framework          Frameworks for which the package reference should be added.
  -n|--no-restore         Do not perform restore preview and compatibility check. The added package reference will be unconditional.
  -s|--source             Specifies NuGet package sources to use during the restore.
  --package-directory     Directory to restore packages in.
  --interactive           Allow the command to block and require manual action for operations like authentication.

installing it through the gui doesn't work either since after I do it there is no raylib namespace
image

@Shadowblitz16
Copy link
Author

Shadowblitz16 commented Jun 6, 2020

I wasn't using .net framework 4.7.2
if anyone else has this issue you need to switch to it and reinstall the package

@Shadowblitz16
Copy link
Author

Shadowblitz16 commented Jun 6, 2020

so uhh this still can't be done through the packager manager console.
or at least not for me

I am using visual studio 2019 and nether
dotnet add package Raylib-cs
or
dotnet add <projectname> package Raylib-cs

work for me

Each package is licensed to you by its owner. NuGet is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.

Package Manager Console Host Version 5.5.0.6473

Type 'get-help NuGet' to see all available NuGet commands.

PM> dotnet add package Raylib-cs
dotnet : Could not find any project in `C:\Users\Shadowblitz16\Documents\Visual Studio 2019\Projects\Cs\Rouge\`.
At line:1 char:1
+ dotnet add package Raylib-cs
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Could not find ...cts\Cs\Rouge\`.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
Usage: dotnet add <PROJECT> package [options] <PACKAGE_NAME>

Arguments:
  <PROJECT>        The project file to operate on. If a file is not specified, the command will search the current directory for one.
  <PACKAGE_NAME>   The package reference to add.

Options:
  -h, --help                          Show command line help.
  -v, --version <VERSION>             The version of the package to add.
  -f, --framework <FRAMEWORK>         Add the reference only when targeting a specific framework.
  -n, --no-restore                    Add the reference without performing restore preview and compatibility check.
  -s, --source <SOURCE>               The NuGet package source to use during the restore.
  --package-directory <PACKAGE_DIR>   The directory to restore packages to.
  --interactive                       Allows the command to stop and wait for user input or action (for example to complete authentication).
PM> dotnet add Rouge package Raylib-cs
  Writing C:\Users\Shadowblitz16\AppData\Local\Temp\tmpE3CE.tmp
info : Adding PackageReference for package 'Raylib-cs' into project 'C:\Users\Shadowblitz16\Documents\Visual Studio 2019\Projects\Cs\Rouge\Rouge\Rouge.csproj'.
error: Error while adding package 'Raylib-cs' to project 'C:\Users\Shadowblitz16\Documents\Visual Studio 2019\Projects\Cs\Rouge\Rouge\Rouge.csproj'. The project does not support adding package references through the add package command.


Usage: NuGet.CommandLine.XPlat.dll package add [options]

Options:
  -h|--help               Show help information
  --force-english-output  Forces the application to run using an invariant, English-based culture.
  --package               Id of the package to be added.
  --version               Version of the package to be added.
  -d|--dg-file            Path to the dependency graph file to be used to restore preview and compatibility check.
  -p|--project            Path to the project file.
  -f|--framework          Frameworks for which the package reference should be added.
  -n|--no-restore         Do not perform restore preview and compatibility check. The added package reference will be unconditional.
  -s|--source             Specifies NuGet package sources to use during the restore.
  --package-directory     Directory to restore packages in.
  --interactive           Allow the command to block and require manual action for operations like authentication.
PM> 

@chrisdill
Copy link
Owner

Hmm. Can you share your .csproj file that you are adding to. It seems to be a issue with your project preventing it from using package references.

Also try building and running Raylib-cs-Examples to see if the same error occurs.

@Shadowblitz16
Copy link
Author

Rouge.zip

@Shadowblitz16
Copy link
Author

@chrisdill I can build and run the examples..
image

@Shadowblitz16
Copy link
Author

stripping the examples to a basic app doesn't work tho

@9ParsonsB
Copy link
Collaborator

#43 Covers this issue.

@9ParsonsB 9ParsonsB added the duplicate This issue or pull request already exists label Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants