Where can i find NuGet.Clients documentation? - c#

I'm trying to add Nuget package management to my newly developed IDE.
The github repository seems to have UI components here
but i can't find any resources for how to use it.
the only documentation i can find doesn't say anything about UI components

As devNull pointed out, there is a page in the docs saying that certain packages on nuget.org are provided and usable in your project. But this roughly corresponds to the projects under src\NuGet.Core.
The projects under src\NuGet.Clients are tools that we distribute as a product, but are not intended to be a library or reusable. The UI components are extremely tied to Visual Studio, depending on several other components in Visual Studio, so you would have to implement all the dependencies to be able to use the UI. In my opinion you'd be better off using the core packages and build your own UI on top of them.

The Nuget-Client-SDK doc states:
The API is evolving and not yet documented, but examples are available
on Dave Glick's blog.
So it appears that the blog post that you mentioned is the extent of documentation currently available for that library.

Related

Integration of Telerik UI components to GitHub repository

I started working at a new place, where developers have not implemented any version control system, so I decided to start using Github here. The thing is, several projects here depends on Telerik UI components, and in order to use them, the project seems to need several DLL files, which as far as I know, it is not recommended to have them in a repository.
So how would be a good way to keep good practices, and this project inside a repository?
I am using Visual Studio ASP .Net by the way
Thank you
If you are using the asp.net gitignore, it will ignore nuget packages.
https://gist.github.com/indyfromoz/4109296
Your team will need to log in to the telerik package source during build to get the dll back
Its a very good idea to use a private repo; otherwise don't include your sensitive web.config settings on the public repo.

How can I track down the source of a transitive dependency?

In a project/solution with lots of <PackageReference> dependencies, it can be difficult to find the source of a transitive dependency that's being pulled in. For example, no projects in my solution directly reference the package System.Data.SqlClient, but something is pulling it in transitively. Tracking that down "by hand" is virtually impossible in a large solution or project with lots of direct package references.
Is there any ready-made way (eg, a combination of .Net CLI commands) that, given a particular package, will find and reveal the source of the transitive reference? I use Rider, which has some awesome code navigation and "discovery"-type tools, but I can't find anything that helps with my goal.
Note: I also have VisualStudio if it has this capability built-in somewhere, I'd just need a pointer to where/how.
The capability is built into the latest Visual Studio 2019.
With Visual Studio 2019, Update 6, I can see something like the following:
Note that you can also discover packages by searching in the solution explorer.
Unfortunately it's not available in the NuGet Package Manager installed view yet.
Searching in VS did not work for me, at least not for a BCL package like System.Net.Http. What did work is looking in obj\project.assets.json, which lists all dependencies.
It's still a somewhat manual process of searching for each package up the tree. https://www.jerriepelser.com/blog/analyze-dotnet-project-dependencies-part-2/ describes the process well and provides code to automate it, but I have not tried the code.
Since I had the same problem and didn't find anything working (on SO, google and my installed VS2022 Ultimate), I've create a powershell and python script.
The script uses the nuget-deps-tree - npm package to get a dependency tree and then traverses this tree to find the nuget.
See: https://github.com/Kraego/NailDownNuget
Not an ideal solution in many cases but just to mention it. Switching to paket dependency manager could help as well, especially for bigger projects.
It has a command called paket why that quickly tells you for each package whether it's a top level, a direct or a transient dependency and additionally shows the dependency chain. See this blog post for some examples.

Rebuilding iText7 nuget with Debug configuration

I am in the process of porting a complex set of reports from iText5 to iText7 and need to rebuild the .Net community edition with Debug symbols to complete the port from 5 to 7. I am able to run the "possibly" correct CLI command this way:
dotnet pack iTextCore.netstandard.sln /p:Configuration=Debug
but that doesn't get me the same package structure you build for the official nuget package.
We will of course pay for the commercial license when we know our code runs, but in the meantime I'm trying to convert old code.
What is the official guidance from iText Software on how developers should accomplish the port from 5 to 7 with your existing resources? Is there a way to get a Debug build with symbols.
Best regards and congrats on building an excellent library.
TL; DR: use this repository and run
dotnet build iTextCore.netstandard.with.svg.sln /p:Configuration=Debug
nuget pack itext7.nuspec
There is no official guidance on how to migrate from iText5 from iText7. This is a major update of the library and almost all of the user-facing code was developed from scratch. Coming up with such a guide is absolutely infeasible because there is too much to cover. One source of information would be to compare samples from iText in Action book which covered a lot of use cases for iText5 library to their versions ported to iText7. The latter ones can be found here. But if you have specific questions feel free to post them on StackOverflow and you will probably get your answers (if those questions haven't been answered yet; many have been already).
The way the official NuGet package is assembled is more difficult than the one you guessed, but only a tiny bit.
If you look at the repository layout, you will find itext7.nuspec file which is a complete descriptor of the final package. To pack everything you need to call
nuget pack itext7.nuspec
However, you need to build the binaries to pack first. You are interested in iTextCore.netstandard.with.svg.sln solution file which integrates all the Core modules at the moment. The command would be similar to what you described:
dotnet build iTextCore.netstandard.with.svg.sln /p:Configuration=Debug
Please note, however, that an easier approach in order to enable debugging might be for you to download the source code and reference the projects directly, thus you would be easily able to walk through the source code, possibly do the modifications etc.

Do I need to use Syncfusion Essential Studio or can I just use NuGet packages?

I'm very confused about Syncfusion Essential Studio. I want to use the XlsIo package in my app to extract some data from an Excel file and I don't understand how I should reference it.
The preferred way would be to use NuGet packages, for I which I suppose I could use the WPF nuget URL? Apparently no license key must be provided anymore to use it, which makes me wonder when I have to provide it – and why I installed a whopping 3GB tool if I could have just used this public NuGet package URL instead?
I did not install assemblies to the GAC as I plan to work on multiple devices with multiple projects and don't want to rely on assemblies being in the GAC, if possible.
I guess I can also just reference the assemblies in the essential studio install directory, but I'm not sure whether that's intended and how I'll deal with updates (cross-device issue aside).
So what I'm asking is basically: can I just use the NuGet packages, as that would be the easiest and most maintainable option in my opinion, and do I have to provide any license information at some point (e.g. deployment)?
Bonus question: what purpose exactly serves the essential studio, if I end up using NuGet packages? A mere sample viewer + number of optional tools?
Please find the response for your queries.
Query 1: Can I just use the NuGet packages, as that would be the easiest and most maintainable option in my opinion, and do I have to provide any license information at some point (e.g. deployment)?
Answer: Syncfusion is providing license on customer basis only. You no need to worry, if you have license for each developer. You can use any installation option such as Essential Studio installer, Platform installer, Link Installer or NuGet packages.
Query 2: What purpose exactly serves the essential studio, if I end up using NuGet packages? A mere sample viewer + number of optional tools?
Answer: Essential Studio build comprises of all platforms, samples & additional tools/utilities for configuration purpose. This will be helpful for evaluation purpose for the customer who doesn’t know about Syncfusion products.
Online samples are there to showcase our Syncfusion products. But sometimes user want to refer the code snippets and for window client platforms. So, Essential Studio build is necessary for these cases. Syncfusion have separate platform builds also if the customer needs to evaluate the products with specific platforms. To know more about Essential Studio setup features, click the below link.
https://help.syncfusion.com/common/essential-studio/overview
Thanks,
Mathi.

.NET classes and their source code

When I'm writing a C# (or any .NET programme) I use methods and classes. Most of the code I use is calling methods from the .NET classes. Is it possible (purely out of curiosity) to see the actual source code for these classes?
I know MSDN has full listings of the classes, their properties and their methods. But I would like to see the code.
Yes, it is:
Browse the .NET Framework source code online, with search and navigation powered by Roslyn.
See details at the .NET Framework blog...
Yes it is possible. See here for more info:
http://weblogs.asp.net/scottgu/archive/2008/01/16/net-framework-library-source-code-now-available.aspx
You can also run a disassembler (such as the one in Reflector) over the base class libraries and view code that way, if you don't want to configure your dev environment. You won't get real variable names or comments, but for isolated viewing this can be easier.
Yes, Microsoft has released the source .NET.
This article should help get you started.
The link mentioned in the accepted answer (https://referencesource.microsoft.com/) only contains .NET source up to version 4.8. Development is now done on Github, where you can find (literally) up-to-the-minute versions of the source files.
The dotnet Github organization (the .NET Foundation) has many of the repos relating to .NET, including core, the CLR runtime, aspnetcore, and a bunch of others. Most of the source code is organized into Visual Studio projects and solutions, so you can import them easily.

Categories