locked
Install Package Issue RRS feed

  • Question

  • User-1852975005 posted

    Hi,
    I seem unable to install a package.

    Microsoft.ApplicationInsights.Agent.Intercept

    Thanks,

    Thursday, March 5, 2020 9:34 AM

Answers

  • User753101303 posted

    Move your solution folder to a higher level folder or rename folders above your solution to shorten their names.

    Packages are stored in C:\Users\<name>\<more folders>\<whatever>\<something else>\<MyLongName>\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1.nupkg and you likely end up with a path that is just too long.

    As you see it would have been hard to guess but it's easy to suggest a fix once you know the exact problem.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 5, 2020 11:21 PM

All replies

  • User281315223 posted

    What type of error are you getting? Application Insights is a pretty well established package, so it may just be that you are trying to install the incorrect one (e.g. Web instead of one meant for a Desktop application, etc.)

    Any additional context would be helpful, as you should be able to just install it via NuGet.

    Thursday, March 5, 2020 3:15 PM
  • User753101303 posted

    Hi,

    According to your description it could be anything that could possibly fail ;-) 

    My guess is that you have perhaps something such as https://stackoverflow.com/questions/46797892/net-core-2-0-package-was-restored-using-netframework-4-6-1-instead-of-target

    Please never wait for someone to ask which error message or bad behavior you see so that we don't have first to guess which problem you have before even being able to suggest maybe a solution.

    Thursday, March 5, 2020 5:41 PM
  • User-1852975005 posted

    An error occurred while trying to restore packagers : The specified path, file name, or both are too long. The fully qualified file name must be lass than 260 characters, and the directory name must be less than 248 characters.

    Thursday, March 5, 2020 10:08 PM
  • User753101303 posted

    Move your solution folder to a higher level folder or rename folders above your solution to shorten their names.

    Packages are stored in C:\Users\<name>\<more folders>\<whatever>\<something else>\<MyLongName>\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1.nupkg and you likely end up with a path that is just too long.

    As you see it would have been hard to guess but it's easy to suggest a fix once you know the exact problem.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 5, 2020 11:21 PM