Does anyone know how to install Autofac.Extensions.Hosting from a NuGet package within Visual Studio (2019)? I see the project here GitHub Autofac.Extensions.Hosting. Within the project instructions, it states that you can "reference the from NuGet". However, I can't find it within Visual Studio's NuGet Package Manager. Is it not available yet, or am I doing something wrong.
Thanks.
It was never published because it's basically just one extension method. The readme needs to be corrected. If you need the extension method, just copy paste it.
Related
I recently switched to VSCode from Visual Studio 2022 and needed to manage custom NuGet packages made by my company. I want it to be somewhat similar to Visual Studio 2022's NuGet Package manager.
This is what I've tried so far with no success:
NuGet Gallery VSCode extension
I downloaded the extension and installed CredentialProvider to be able to authenticate the package source
I added an environment variable with the suggested json format:
{"endpointCredentials": [{"endpoint":"http://example.index.json", "username":"optional", "password":"accesstoken"}]}
I then added the name and url as a source from the VSCode extension settings:
enter image description here
NuGet.config file in the project directory
The problem here is that it does not help me manage packages easily (browsing, updating, downgrading, etc.)
NuGet Package Manager VSCode extension
Problem here is that it has no way of configurating package registries
For information, I am using .NET 3 to 7, and the package registry is on GitLab.
Can somebody please help me fix this issue because I've looked everywhere and ran out of options?
I try to add a nuget package reference automatically to a visual studio project if needed, with the help of a roslyn code fixer.
Since the "CodeFixProvider" is not a "Microsoft.VisualStudio.Shell.Package" there is no GetGlobalService Method to retreive a "IComponentModel" in order to get the "IVsPackageInstaller2" service.
Is there another or an even better way to add a nuget reference to a project?
I am a bit lost here after days of googling.
Thanks in advance!
I've been using visual studio code as a second display (with visual studio as the first) to view/edit code mostly JavaScript since you can right click/format the code with easy.
But I recently took to time to study how it's c#/asp.net core debug functionality has evolved and it seems it has become even more easier to start whipping debug in no time.
But there is one thing I haven't figured out and whether it's even possible. That's it managing nuget packages. Visual studio offers a nice package manager ui to view installed packages and which packages might need a version bump.
It's there an alternative for visual studio code other than browsing the nuget site and checking which of your referenced packages have updated and editing the .csproj manually or running dotnet add <project> package ...?
This is probably not relevant anymore, but for anyone else also searching for something like this, there is a pretty handy extension for VSCode called Package Manager GUI here.
I have a project where I need Microsoft.TeamFoundation.DistributedTask.Common.Contracts. According to nuget.org there is a 15.114.0-preview package. But, Visual Studio says that there is no package like this.
I clean all local cache and doesn't help.
How can I solve it? Generally, how much time is needed for a package to go through the spreading process if there is any?
You seem to be looking at the wrong package in Visual Studio Package manager window.
Microsoft.TeamFoundation.DistributedTask.Common.Contracts has latest version as 15.114.0-preview
while Microsoft.TeamFoundation.DistributedTask.Common has latest version as 15.112.1
Hope this helps.
-AG.
My aim is to have package restore working on a build server so that I don't have to check in binaries. At the moment, I'm simply trying to get it to work on my own machine using Visual Studio.
Here's what I've done so far:
Followed the instructions here http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages, including both setting the Tools-Options flag and the environment variable (belt and braces)
Installed the NuGetEnablePackageRestore package as suggested here NuGet package restore consent without NuGet
Checked everything in (the .nuget solution folder and its contents), but not the binaries I want to reference, because that's the whole point of the exercise
Here's what I'm doing:
Check out solution
Verify that nunit.framework.dll and moq.dll are not present in the checked out solution
Build the solution
Visual Studio complains that Moq is missing. I search for the dlls in the solution directory and find that:
nunit.framework.dll is present in the appropriate bin folders
Moq.dll is nowhere to be found
But there's more. This is truly mysterious, but if I do a fresh checkout, disconnect from the internet and build, I get precisely the same results - nunit.framework.dll is there, but moq.dll is not. The build process has conjured nunit.framework.dll literally from nowhere.
So it's something of an understatement to say that I am completely baffled. Can anyone suggest answers to the following questions:
Why is package restore not downloading Moq?
Where on earth is the build process getting nunit.framework.dll, if not the internet?
In vs, Options, Package Manager... there's a section "Package Cache", if you click on the "Browse" button it will take you to the location of the nuget cache in your machine.
Okay, I noticed in the documentation that enabling package restore was supposed to modify project files in order to add a new target. My project files did not have this change. Right-clicking the solution title in VS and selecting 'Manage NuGet packages...' then added the required changes and everything built as it should.
I checked, and package restore still appears to work when I have no internet access, so I'm still mystified about that. Does NuGet maintain some kind of cache of binaries outside the solution?