I see in the documentation I must download a Template to use the bot Framework https://learn.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-quickstart
There is a way to install this tempalte with nuget ? I find the package for nuget https://www.nuget.org/packages/Microsoft.Bot.Builder/
But I must create a project to use the cmd Install-Package
How install the bot framewokr only with nuget ?
The documentation article, which you are referring to, does not say you have to install any framework. What it recommends is to install the project template. Project templates are not frameworks, they just have some pre-included files.
The same documentation article clearly says that the framework itself is a nuget package. They say:
By using the Bot Application template, you're creating a project that already contains all of the components that are required to build a simple bot, including a reference to the Bot Builder SDK for .NET, Microsoft.Bot.Builder. Verify that your project references the latest version of the SDK:
Right-click on the project and select Manage NuGet Packages.
In the Browse tab, type "Microsoft.Bot.Builder".
Locate the Microsoft.Bot.Builder package in the list of search
results, and click the Update button for that package.
Follow the prompts to accept the changes and update the package.
Thanks to the Bot Application template, your project contains all of the code that's necessary to create the bot in this tutorial. You won't actually need to write any additional code. However, before we move on to testing your bot, take a quick look at some of the code that the Bot Application template provided.
This basically means that there is no requirement to have this project template. What you can do is actually install the template, create a project and look at the project structure and packages. Then, you are free to reproduce the same project structure and add necessary references yourself, without using project template.
Again, the template is just a bootstrap code.
Related
I know I'm being thick but I am having trouble implementing a new 'using' directory for my .NET Core project.
I have downloaded the necessary files for CoreCompact.System.Drawing (https://github.com/CoreCompat/CoreCompat)
I simply have no idea how to implement the folders so that I can start using this directory and subsequently use the system.drawing objects that are not supported in Core projects.
I am new to ASP.Net but have been studying C# for long enough that I don't need too detailed a guide.
There's no need to use CoreCompat.System.Drawing anymore. In fact, the author says you shouldn't. The reason? Microsoft provides an official System.Drawing.Common NuGet package now.
To install:
Select the Tools menu
NuGet package manager
Manage NuGet packages for solution
Click Browse tab
Search for System.Drawing.Common
Select the Microsoft package
Tick/check your project on the right-hand panel.
Click Install
Agree to the licence agreement.
You may need to add it as a reference to your project first. Do this by right clicking on the "References" file in your solution, and click add reference. Then press the "Browse..." Button in the bottom right of the pop up window and navigate to the desired DLL.
I am new in WPF application development and I came across the Material Design package, I am using Visual Studio 2015 Enterprise.
Every time I want to create a new WPF application I always go to
Project -> Manage NuGet Packages and install the MaterialDesignThemes package for that specific project and when I am working on another project I need to do the same process again.
Is possible to only install this package once and somehow use it (or reference it) on all projects that I am creating as opposed to installing it with each and every new project I create?
I hope my question makes sense and I am asking this for the sake of being able to develop new material design WPF applications offline.
They ask to use nugget to keep the package updated that way you can check versions and so on. But you can download the source code from GitHub and keep it on your machine or server you use it for. That way you can refer it from your machine and don’t need to download for every project you work.
Project source: https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/releases
In my opinion, I highly recommend download from nugget repository because it is easy to maintain and anyone else that code and the same project will find the package over there.
Create a Project Template.
VS2015: https://msdn.microsoft.com/en-us/library/xkh1wxd8.aspx
VS2017: https://learn.microsoft.com/en-us/visualstudio/ide/how-to-create-project-templates
Another way of quickly installing nuget packages is using the Package Manager Console and use the install-package command. e.g. install-package materialdesignthemes
I am building a new project in ASP.NET 5.
In my solution I have added a new Class Library (Package) project.
I right click on this project and choose for Manage Nuget packages to install PetaPoco.Core.
When I install everything seems fine except that the PetaPoco.cs file is not in my project.
In my references I se the PetaPoco version 5.1.171 installed.
Is this something different then a normal class library and do I need to use something else in order to use the installed PetaPoco class or is it a problem during the installation?
I have removed and reinstalled this but still the same.
Someone that can help me out?
/Michael
It looks like the PetaPoco.Core package isn't setup to be used in portable class libraries (PCLs).
Including content files in PCLs like the Models folder that PetaPoco.Core creates requires a different NuGet setup than a regular project. Documentation on this can be found on NuGet. I downloaded their package directly and can confirm that it is not setup in the way the linked resource describes.
It may be that the project requires features that are not available yet cross-platform, or they simply haven't had time to make changes to support PCLs, or some other reason that I am not aware of.
NuGet packages are usually installed as DLLs in the bin folder of your project, with the needed references also added automatically to the project. They usually don't include source files. You may find sources - if available - on the package/project website.
Visual Studio IntelliSense will pick up the DLLs and show what it can about the classes and methods inside, including comments and method signatures.
See here for a tutorial, including how to build your own NuGet packages.
EDIT: PetaPoco is the exception that does add a .cs file... see comment below.
I have created the library Staty that I want to publish via nuget for other developers to use.
I explicitly created it as Portable Class Library and restricted myself to very basic programming constructs. Now I want to publish it in a way, that others can easily use my library. I've set up my library as PCL with the following targets, which seemed to me as the most permissive platform-combination:
After completing the first version, I wanted to publish it, using Nuget GUI with the following nuget profile. I included the release-build files into the package under the portable-net4-sl4-wp7-win8 folder (I've tried portable-net45-sl5-wp8-win8 too, without any effect)
To verify, that my library is truly portable, I wanted to include it into another PCL-project, but unfortunately I'm only getting the following error: Could not install package 'Staty 1.0.0'. You are trying to install this package into a project that targets '.NETPortable, Version=v4.5, Profile=Profile259', but the package does not contain any assembly references or content files that are compatible with that framework.
When adding it to a regular console-application, everything works fine. It also works fine, when directly including the dll into that very same PCL-project via References -> Add Reference ... -> Browse.
So what is wrong with the way I published the package?
Additionally I tried adding folder dotnet and net45 to the nuget package with the same dlls - without any success.
In the Change Targets dialog, you are specifying .NET Framework 4.5, whereas in your NuGet setup you are targeting net4. Moreover, in the NuGet setup you are also targeting sl4 and wp7. All in all, this means that when the NuGet Manager tries to match the library path in your NuGet package with the profile of your other PCL project, it is bound to fail due to incompatibilities.
Please take a look at this list to determine in which lib sub-folder you should place your Staty.dll PCL. (The list does not explicitly specify ASP.NET Core and Xamarin targets, they are normally implicitly accounted for.) From the list you can see that the target platforms you selected in the Change Targets dialog matches Profile 259, and the NuGet target for this profile should preferably be portable-net45+netcore45+wpa81+wp8.
(If you open the Staty.csproj project file in a text editor, you can confirm that the <targetFrameworkProfile> is indeed Profile259.)
Please change the lib sub-folder name in your NuGet file to portable-net45+netcore45+wpa81+wp8, and you should then be able to reference the Staty NuGet package from your other PCL project as long this other project targets the same or a sub-set of the platforms that the Staty NuGet package is targeting.
I'm trying to automate adding NuGet packages to project on a remote server that doesn't have Visual Studio (nor any build servers) installed. I do know how to use NuGet.exe from my C# code, but this executable only downloads packages and doesn't do any other required work (adding references, executing ps scripts etc). What do I do in order to fully install a package?
Note: I don't need to update a package for my own app, I need to add a package to an arbitrary .csproj file on the server. I'm building a Web-based .Net IDE, and need my users to be able to add packages to their projects.
I see two possibilities: one is using some kind of functionality not present in NuGet.exe, but ratherin some other library (maybe a VS addin), but I don't know where to look for it. The other is to simulate some kind of NuGet Powershell console and send commands to it, but again, I don't know how to do that.
You might want to consider SharpDevelop.
Installing NuGet Packages outside of Visual Studio an article about the functionality you are trying to achieve (written by Matt Ward, one of the project contributors) says:
Since NuGet uses PowerShell the simplest approach was to extend the
existing PowerShell cmdlets included with SharpDevelop. Now you can
write a few lines of PowerShell script to install a NuGet package into
a project that has never had a NuGet package before, have the project
itself updated and any package PowerShell scripts run. All this from
the command line without Visual Studio open.
Just to add an additional answer in-line with Alex's post about SharpDevelop, you have a couple different options.
Use Nuget.exe (Related Blog post)
NuGet Addin for MonoDevelop and Xamarin Studio (see GitHub)
ASP.NET Pages using WebMatrix (see this video)
All of this info is from the Nuget FAQ.