Git Product home page Git Product logo

samples's Introduction

Samples

This repo contains NuGet sample packages and sample code.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

  1. ExtensionSDKasNuGetPackage is a sample solution that walks you through several scenarios for shipping an extension SDK as nuget package

  2. VsCredentialProvider is a sample for creating a NuGet credential provider for Visual Studio

  3. Satellite-Packages is a sample class library and console app that demonstrates how to localize your NuGet packege using the Sattelite Package feature.

  4. PackageReferenceProjects demonstrates how you can manually migrate to the new PackageReference format.

  5. ContentFilesExample is a sample package and project that demonstrates how to use the contentFiles feature in NuGet 3.3+

  6. Preinstalled-Packages demonstrates how template authors can instruct NuGet to install the necessary packages, rather than individual libraries. Read more about Packages in Visual Studio templates

  7. CatalogReaderExample is a sample showing how to read the NuGet API's catalog resource.

  8. NuGetProtocolSamples shows how to use the NuGet.Protocol package.

  9. PackageDownloadsExample shows how to get a package's download counts.

  10. PackageSourceMappingExample is a sample solution that shows how to configure Package Source Mapping for a couple projects and packages. The README contains many smaller example scenarios and results.

Documentation and Further Learning

The NuGet Docs cover creating NuGet packages in more detail:

Feedback

If you're having trouble with the NuGet.org website or HTTP API, file a bug on the NuGet Gallery Issue Tracker.

If you're having trouble with the NuGet client tools (the Visual Studio extension, NuGet.exe command line tool, etc.), file a bug on NuGet Home.

Check out the contributing page to see the best places to log issues and start discussions. The NuGet Home repo provides an overview of the different NuGet projects available.

samples's People

Contributors

analogrelay avatar anangaur avatar chrisraygill avatar csharpfritz avatar drewgillies avatar jainaashish avatar jeffhandley avatar jeffkl avatar joelverhagen avatar jstoker avatar karann-msft avatar kartheekp-ms avatar loic-sharma avatar maartenba avatar mirle avatar nkolev92 avatar phraemer avatar ryuyu avatar xavierdecoster avatar zivkan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

samples's Issues

Copyrights?

The AssemblyInfo files for this project all says Microsoft (various years), but as this is a .NET Foundation project, should they be updated?

Also, a LICENSE file would probably be helpful in the root of the project.

Icon still not showing up

I have followed your sample but the icon is not showing up in azure artifacts.

Project File:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <PackageIcon>nugetIcon.png</PackageIcon>
    <Version>1.0.0.1</Version>
  </PropertyGroup>

  <ItemGroup>
    <None Include="Resources\nugetIcon.png" Pack="true" PackagePath="" />
  </ItemGroup>
  
  <ItemGroup>
    <Compile Update="Properties\Resources.Designer.cs">
      <DesignTime>True</DesignTime>
      <AutoGen>True</AutoGen>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
  </ItemGroup>

  <ItemGroup>
    <EmbeddedResource Update="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    </EmbeddedResource>
  </ItemGroup>

</Project>

Project in Solution Explorer
image

Image Properties
image

What am I doing wrong?

Thanks for help.

P.S.: Azure Artifacts
image

Does nuget support enabling CPM for a subset of folders?

Hi, I wonder if CPM can only be applied to a subset of folders?
Say we have the below directory structure, the CPM applies to all projects in solution1 for sure, is solution2 also affected? If so, is there a way to disable CPM for solution2?

Repository

  • Solution1
    -- Directory.Packages.props
    -- Project1
  • Solution2
    -- Project2

WinRT information: Class not registered

Hi ,

I try to build a nuget package with ExtensionSDKasNuGetPackage, and install the package in a c++ project. But i got the error:

thrown at 0x73E508B2 in BlendNative.exe: Microsoft C++ exception: Platform::ClassNotRegisteredException ^ at memory location 0x0678D02C. HRESULT:0x80040154 Class not registered
WinRT information: Class not registered

I try to reference the c# runtime component directly, it works well.

In addition, i also want to know, if i add reference to Newtonsoft.Json in c# runtime component, how to package the component as a Nuget package.

Can't correctly embed interop types for packagereference

While the suggestion here helps:

https://github.com/NuGet/Samples/blob/main/NuGet.Samples.Interop/README.md

and almost works, ie. it will fix it such that VS will build and won't include the interop assembly in the manifest, however, the interface types are not 'dynamic' as they were when you included a 'reference' to an interop assembly. This causes all the method calls/property sets/gets to show 'like' errors, flagged with red squigglies, in the editor even though the build succeeds.

Also, seems the suggestion in:

https://github.com/NuGet/Samples/blob/main/NuGet.Samples.Interop/README.md

is not quite correct. I needed to remove this part:

AND '%(ReferencePath.NuGetPackageId)' == '$(MSBuildThisFileName)'

How do you run CatalogReaderExample.dll from a command prompt, outside Visual Studio?

I cloned the NuGet Samples repository, built the debug configuration, and ran it successfully inside Visual Studio. Following is the console log.

No cursor found. Defaulting to 2019/12/15 19:57:16.
Fetched catalog index https://api.nuget.org/v3/catalog0/index.json.
Fetched catalog page https://api.nuget.org/v3/catalog0/page9344.json.
Processing 107 catalog leaves.
2019/12/15 19:58:31: Tedd.BitUtils 1.0.5 (type is nuget:PackageDetails)
2019/12/15 20:03:23: aemarcoCore 2.1.2 (type is nuget:PackageDetails)
2019/12/15 20:06:11: Twino.Client.Connectors 2.0.13-beta (type is nuget:PackageDetails)
2019/12/15 20:06:11: Twino.Client.TMQ 2.0.13-beta (type is nuget:PackageDetails)
2019/12/15 20:06:22: Twino.Core 2.0.13-beta (type is nuget:PackageDetails)
2019/12/15 20:06:22: Twino.Client.WebSocket 2.0.13-beta (type is nuget:PackageDetails)
2019/12/15 20:06:33: Twino.Extensions.Data 2.0.13-beta (type is nuget:PackageDetails)
2019/12/15 20:06:33: Twino.Mvc 2.0.13-beta (type is nuget:PackageDetails)
2019/12/15 20:06:33: Standart.Hash.xxHash 1.0.7 (type is nuget:PackageDetails)
2019/12/15 20:06:44: Twino.Extensions.Http 2.0.13-beta (type is nuget:PackageDetails)
2019/12/15 20:06:44: Twino.Protocols.Http 2.0.13-beta (type is nuget:PackageDetails)
2019/12/15 20:06:56: Twino.Ioc 2.0.13-beta (type is nuget:PackageDetails)
2019/12/15 20:06:56: Twino.MQ 2.0.13-beta (type is nuget:PackageDetails)
2019/12/15 20:06:56: Twino.Protocols.WebSocket 2.0.13-beta (type is nuget:PackageDetails)
2019/12/15 20:07:08: Twino.Mvc.Auth.Jwt 2.0.13-beta (type is nuget:PackageDetails)
2019/12/15 20:07:20: Twino.Protocols.TMQ 2.0.13-beta (type is nuget:PackageDetails)
2019/12/15 20:07:32: Twino.SerializableModel 2.0.13-beta (type is nuget:PackageDetails)
2019/12/15 20:07:44: Twino.Server 2.0.13-beta (type is nuget:PackageDetails)
2019/12/15 20:10:00: RESTSchemaRetry 1.0.2 (type is nuget:PackageDetails)
2019/12/15 20:11:45: Twino.Client.TMQ 2.0.14-beta (type is nuget:PackageDetails)
2019/12/15 20:11:56: Twino.Client.WebSocket 2.0.14-beta (type is nuget:PackageDetails)
2019/12/15 20:11:56: Twino.Client.Connectors 2.0.14-beta (type is nuget:PackageDetails)
2019/12/15 20:11:56: GrpcExtensions.AspNetCore.Validation 2.25.1 (type is nuget:PackageDetails)
2019/12/15 20:12:08: Twino.MQ 2.0.14-beta (type is nuget:PackageDetails)
2019/12/15 20:12:08: Twino.Ioc 2.0.14-beta (type is nuget:PackageDetails)
2019/12/15 20:12:19: Twino.Mvc 2.0.14-beta (type is nuget:PackageDetails)
2019/12/15 20:12:19: Twino.Core 2.0.14-beta (type is nuget:PackageDetails)
2019/12/15 20:12:19: Twino.Extensions.Data 2.0.14-beta (type is nuget:PackageDetails)
2019/12/15 20:12:31: Twino.Mvc.Auth.Jwt 2.0.14-beta (type is nuget:PackageDetails)
2019/12/15 20:12:31: Twino.Extensions.Http 2.0.14-beta (type is nuget:PackageDetails)
2019/12/15 20:12:42: Twino.Protocols.WebSocket 2.0.14-beta (type is nuget:PackageDetails)
2019/12/15 20:13:24: Twino.Protocols.TMQ 2.0.14-beta (type is nuget:PackageDetails)
2019/12/15 20:13:24: Twino.SerializableModel 2.0.14-beta (type is nuget:PackageDetails)
2019/12/15 20:13:24: Twino.Protocols.Http 2.0.14-beta (type is nuget:PackageDetails)
2019/12/15 20:14:38: Twino.Server 2.0.14-beta (type is nuget:PackageDetails)
2019/12/15 20:17:57: PeriaIT.DataModeler.DataModel 1.0.1.5 (type is nuget:PackageDetails)
2019/12/15 20:18:08: PeriaIT.DataModeler.DataContext 1.0.1.40 (type is nuget:PackageDetails)
2019/12/15 20:18:51: PeriaIT.DataModeler.DataService 1.0.0.36 (type is nuget:PackageDetails)
2019/12/15 20:18:51: Be.Vlaanderen.Basisregisters.DataDog.Tracing.AspNetCore 4.1.0 (type is nuget:PackageDetails)
2019/12/15 20:18:51: Be.Vlaanderen.Basisregisters.DataDog.Tracing 4.1.0 (type is nuget:PackageDetails)
2019/12/15 20:18:51: Be.Vlaanderen.Basisregisters.DataDog.Tracing.Autofac 4.1.0 (type is nuget:PackageDetails)
2019/12/15 20:18:51: Be.Vlaanderen.Basisregisters.DataDog.Tracing.SqlStreamStore 4.1.0 (type is nuget:PackageDetails)
2019/12/15 20:18:51: Be.Vlaanderen.Basisregisters.DataDog.Tracing.Sql 4.1.0 (type is nuget:PackageDetails)
2019/12/15 20:19:34: FunctionMonkey.Abstractions 4.0.25-beta.1 (type is nuget:PackageDetails)
2019/12/15 20:19:34: NWrath.Synergy 1.0.4 (type is nuget:PackageDetails)
2019/12/15 20:19:34: FunctionMonkey.Commanding.Abstractions 4.0.25-beta.1 (type is nuget:PackageDetails)
2019/12/15 20:19:34: FunctionMonkey 4.0.25-beta.1 (type is nuget:PackageDetails)
2019/12/15 20:19:47: FunctionMonkey.Commanding.Cosmos.Abstractions 4.0.25-beta.1 (type is nuget:PackageDetails)
2019/12/15 20:20:29: FunctionMonkey.FluentValidation 4.0.25-beta.1 (type is nuget:PackageDetails)
2019/12/15 20:20:41: FunctionMonkey.Testing 4.0.25-beta.1 (type is nuget:PackageDetails)
2019/12/15 20:20:41: FunctionMonkey.Compiler 4.0.25-beta.1 (type is nuget:PackageDetails)
2019/12/15 20:20:41: FunctionMonkey.SignalR 4.0.25-beta.1 (type is nuget:PackageDetails)
2019/12/15 20:20:41: FunctionMonkey.FSharp 4.0.25-beta.1 (type is nuget:PackageDetails)
2019/12/15 20:20:52: FunctionMonkey.TokenValidator 4.0.25-beta.1 (type is nuget:PackageDetails)
2019/12/15 20:23:40: AutoUpdateViaGitHubRelease 0.1.30 (type is nuget:PackageDetails)
2019/12/15 20:30:37: Plugin.LocalNotification 4.1.1 (type is nuget:PackageDetails)
2019/12/15 20:30:37: Plugin.LocalNotification 4.1.0 (type is nuget:PackageDetails)
2019/12/15 20:31:51: Be.Vlaanderen.Basisregisters.EventHandling.Autofac 2.1.0 (type is nuget:PackageDetails)
2019/12/15 20:31:51: Be.Vlaanderen.Basisregisters.EventHandling 2.1.0 (type is nuget:PackageDetails)
2019/12/15 20:32:34: DevDH.Magic.Abstractions 1.0.4 (type is nuget:PackageDetails)
2019/12/15 20:34:19: Plugin.LocalNotification 4.1.0 (type is nuget:PackageDetails)
2019/12/15 20:36:35: DataFunc.Authentication.Extensions 1.0.0.94 (type is nuget:PackageDetails)
2019/12/15 20:36:35: DataFunc.Extensions.Logging 1.0.0.21 (type is nuget:PackageDetails)
2019/12/15 20:36:35: DataFunc.Sqs.Extensions 1.0.0.93 (type is nuget:PackageDetails)
2019/12/15 20:36:35: DataFunc.Exceptions 1.0.0.75 (type is nuget:PackageDetails)
2019/12/15 20:36:35: DataFunc.IMemoryCache.Redis 1.0.0.23 (type is nuget:PackageDetails)
2019/12/15 20:36:35: Headway.WorkflowEngine 1.1.0 (type is nuget:PackageDetails)
2019/12/15 20:36:35: DataFunc.Extensions.MediatR 1.0.0.91 (type is nuget:PackageDetails)
2019/12/15 20:36:35: DataFunc.Extensions 1.0.0.92 (type is nuget:PackageDetails)
2019/12/15 20:36:35: DataFunc.S3.Extensions 1.0.0.94 (type is nuget:PackageDetails)
2019/12/15 20:36:35: DataFunc.Extensions.Web 1.0.0.93 (type is nuget:PackageDetails)
2019/12/15 20:36:35: DataFunc.Services.Background 1.0.0.92 (type is nuget:PackageDetails)
2019/12/15 20:36:46: Cake.NScan 0.50.0 (type is nuget:PackageDetails)
2019/12/15 20:36:46: NScan 0.50.0 (type is nuget:PackageDetails)
2019/12/15 20:36:58: NScan.Adapter.ReadingCSharpSolution 0.50.0 (type is nuget:PackageDetails)
2019/12/15 20:37:09: NScan.DependencyPathBasedRules 0.50.0 (type is nuget:PackageDetails)
2019/12/15 20:37:09: NScan.Adapter.ReportingOfResults 0.50.0 (type is nuget:PackageDetails)
2019/12/15 20:37:22: NScan.SharedKernel 0.50.0 (type is nuget:PackageDetails)
2019/12/15 20:37:22: NScan.ProjectScopedRules 0.50.0 (type is nuget:PackageDetails)
2019/12/15 20:37:34: NScan.Adapter.ReadingRules 0.50.0 (type is nuget:PackageDetails)
2019/12/15 20:37:46: NScan.Console 0.50.0 (type is nuget:PackageDetails)
2019/12/15 20:37:46: NScan.NamespaceBasedRules 0.50.0 (type is nuget:PackageDetails)
2019/12/15 20:37:46: NScan.Adapter.NotifyingSupport 0.50.0 (type is nuget:PackageDetails)
2019/12/15 20:37:46: NScan.Lib 0.50.0 (type is nuget:PackageDetails)
2019/12/15 20:37:46: NScan.Domain 0.50.0 (type is nuget:PackageDetails)
2019/12/15 20:40:02: Cake.NScan 0.50.1 (type is nuget:PackageDetails)
2019/12/15 20:40:02: NScan.Console 0.50.1 (type is nuget:PackageDetails)
2019/12/15 20:40:13: NScan.Adapter.ReportingOfResults 0.50.1 (type is nuget:PackageDetails)
2019/12/15 20:40:13: NScan 0.50.1 (type is nuget:PackageDetails)
2019/12/15 20:40:13: NScan.Adapter.NotifyingSupport 0.50.1 (type is nuget:PackageDetails)
2019/12/15 20:40:13: NScan.Adapter.ReadingCSharpSolution 0.50.1 (type is nuget:PackageDetails)
2019/12/15 20:40:25: NScan.Adapter.ReadingRules 0.50.1 (type is nuget:PackageDetails)
2019/12/15 20:40:37: NScan.Lib 0.50.1 (type is nuget:PackageDetails)
2019/12/15 20:40:37: NScan.DependencyPathBasedRules 0.50.1 (type is nuget:PackageDetails)
2019/12/15 20:40:37: NScan.Domain 0.50.1 (type is nuget:PackageDetails)
2019/12/15 20:40:49: NScan.NamespaceBasedRules 0.50.1 (type is nuget:PackageDetails)
2019/12/15 20:40:49: NScan.ProjectScopedRules 0.50.1 (type is nuget:PackageDetails)
2019/12/15 20:40:49: NScan.SharedKernel 0.50.1 (type is nuget:PackageDetails)
2019/12/15 20:41:31: M3gur0.Library.Infrastructure.Data.Redis 0.1.0 (type is nuget:PackageDetails)
2019/12/15 20:44:49: Acamti.Be.Fluent 3.0.0-beta.3 (type is nuget:PackageDetails)
2019/12/15 20:49:41: Hsp.PsLibrary 1.0.0+b7ecb13bdbcb6ff945fa298ba08006de44de80c0 (type is nuget:PackageDetails)
2019/12/15 20:49:53: CLI 0.5.2 (type is nuget:PackageDetails)
2019/12/15 20:51:38: CLI 0.5.2 (type is nuget:PackageDetails)
2019/12/15 20:53:54: M3gur0.Library.Domain 1.1.0 (type is nuget:PackageDetails)
2019/12/15 20:55:07: Wikiled.WebSockets.Server 1.0.18 (type is nuget:PackageDetails)
2019/12/15 20:55:19: Wikiled.WebSockets.Client 1.0.18 (type is nuget:PackageDetails)
2019/12/15 20:57:35: SqliteHelper 1.1.0 (type is nuget:PackageDetails)
Writing cursor value: 2019/12/15 20:57:35.

C:\Program Files\dotnet\dotnet.exe (process 22604) exited with code 0.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .

The debugger output window listing follows.

'dotnet.exe' (CoreCLR: DefaultDomain): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Private.CoreLib.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'F:\Source_Code\Visual_Studio\Projects\NuGet\NuGet_Samples\CatalogReaderExample\CatalogReaderExample\bin\Debug\netcoreapp2.0\CatalogReaderExample.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Runtime.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Threading.Tasks.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Collections.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Private.Uri.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Net.Http.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Console.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\DAG\.nuget\packages\newtonsoft.json\9.0.1\lib\netstandard1.0\Newtonsoft.Json.dll'. 
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Linq.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.IO.FileSystem.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Runtime.Extensions.dll'. Symbols loaded.
Exception thrown: 'System.IO.FileNotFoundException' in System.Private.CoreLib.dll
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Threading.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\DAG\.nuget\packages\nuget.protocol\4.4.0\lib\netstandard1.3\NuGet.Protocol.dll'. 
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\DAG\.nuget\packages\nuget.configuration\4.4.0\lib\netstandard1.3\NuGet.Configuration.dll'. 
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Collections.Concurrent.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\DAG\.nuget\packages\nuget.common\4.4.0\lib\netstandard1.3\NuGet.Common.dll'. 
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.IO.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Globalization.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Runtime.InteropServices.RuntimeInformation.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Security.Cryptography.Algorithms.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Security.Cryptography.Primitives.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Text.Encoding.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.IO.FileSystem.Primitives.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Net.Primitives.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Resources.ResourceManager.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Reflection.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Dynamic.Runtime.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Linq.Expressions.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.ObjectModel.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\DAG\.nuget\packages\nuget.versioning\4.4.0\lib\netstandard1.0\NuGet.Versioning.dll'. 
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Runtime.Serialization.Primitives.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Users\DAG\.nuget\packages\nuget.packaging\4.4.0\lib\netstandard1.3\NuGet.Packaging.dll'. 
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Reflection.Extensions.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Diagnostics.Tracing.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Runtime.InteropServices.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Diagnostics.DiagnosticSource.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Security.Cryptography.X509Certificates.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Collections.NonGeneric.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.IO.Compression.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Buffers.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Xml.XDocument.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Private.Xml.Linq.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Private.Xml.dll'. Symbols loaded.
The thread 0x56f8 has exited with code 0 (0x0).
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Text.RegularExpressions.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Reflection.Emit.ILGeneration.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Reflection.Primitives.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Reflection.Emit.Lightweight.dll'. Symbols loaded.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'Anonymously Hosted DynamicMethods Assembly'. 
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.9\System.Diagnostics.Debug.dll'. Symbols loaded.
The program '[22604] dotnet.exe' has exited with code 0 (0x0).

The foregoing suggests to me that this is a .Net Core package. I have no prior experience with executing such assemblies.
Next, I built the Release configuration, and tried to run it from a command prompt (cmd.exe) with the following outcome.

F:\Source_Code\Visual_Studio\Projects\NuGet\NuGet_Samples 2019/12/15 15:30:03.29>F:\Source_Code\Visual_Studio\Projects\NuGet\NuGet_Samples\CatalogReaderExample\CatalogReaderExample\bin\Release\netcoreapp2.0\CatalogReaderExample.dll

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

F:\Source_Code\Visual_Studio\Projects\NuGet\NuGet_Samples 2019/12/15 15:30:27.91>

Examining the source code led me to believe that the assembly was a standard console program.

What fine point did I miss?

ContentFilesExample problems

I am trying to understand the new ContentFiles feature, so I created a test solution with .NET Framework 4.7.1, 4.7.2, .NET Standard 2 and .NET Core 2.0 projects. All are set up to use PackageReference rather than packages.config. https://github.com/conficient/ContentFileTest

I added the ContentFilesSample Nuget package to all four projects in the solution.

This appeared to work in the .NET Standard and Core projects: the data.txt, ExampleInternals.cs files and the tools folders were created. However the images folder was not.

The Framework projects were unchanged, and had nothing added. I upgraded the net471/net472 projects to use the new format, and tried again.

This time I got errors:

CSC : error CS2001: Source file 'C:\Users\Howard\.nuget\packages\contentfilesexample\1.0.2\contentFiles\cs\portable-net45+wpa81+wp8+win8\ExampleInternals.cs' could not be found.

I checked this folder and found this:
image

Bugs:

  • The images folder/files were not created in either NETStandard/Core projects
  • Package content not working with .NET Framework apps
  • package folder encoding not working?

Fails to Copy Satellite Assemblies

Hi,

I can't get the satellite assemblies to work, neither this sample nor in a project of my own.

I've added the cs and ru-ru references to the ConsoleApp packages.config. Running build.cmd doesn't show any issues.

Still the satellite assemblies simply won't be copied to the runtime assembly. I have absolutely no idea what I might be missing.

Any help highly appreciated. Thanks!

Cheers,
Markus

No (non-framework) satelitte references added to Project for Nuget 2.8.3

https://github.com/NuGet/Samples
Says
"ConsoleApp has a NuGet package reference to ClassLibrary"

https://github.com/NuGet/Samples/blob/master/build.cmd
refers to 'SatellitePackageSample' folder but
https://github.com/NuGet/Samples
has only 2 projects: 'Preinstalled-Packages' and 'Satellite-Packages'.

I renamed the 'Satellite-Packages' folder to 'SatellitePackageSample' and ran build.cmd

It fails.

Build started 7/11/2014 10:53:31 AM.
Project "D:\Donwloads\dev\nuget\Samples-master\SatellitePackageSample\ConsoleApp\ConsoleApp.csproj" on node 1 (default targets).
RestorePackages:
"...nuget\nuget.exe" install "D:\Donwloads\dev\nuget\Samples-master\SatellitePackageSample\ConsoleApp\packages.config" -source "" -o "..\packages"
All packages listed in packages.config are already installed.
ResolveAssemblyReferences:
A TargetFramework profile exclusion list will be generated.
Could not read state file "obj\x86\Debug\ConsoleApp.csprojResolveAssemblyReference.cache". The format of this state file is not valid.
Primary reference "ClassLibrary, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL".
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembl
y "ClassLibrary, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required b
y your code, you may get compilation errors. [D:\Donwloads\dev\nuget\Samples-master\SatellitePackageSample\ConsoleApp\ConsoleApp.csproj]

I used PackageManager console to add the Class Library package to ConsoleApp.

HERE IS THE ISSUE: there are no references to ClassLibrary.dll added to the ConsoleApp Solution.

Querying most downloaded packages from nuget.org

Hi, I'm trying to modify the Nuget.Protocol.Catalog.Sample to download all nugets in nuget.org that have more than a configurable amount of downloads with their dependencies.
I'm a bit confused of how best to approach this. Should I get the number of downloads from the PackageDetailsCatalogLeaf? If so - how?
Is there a better way to query the API for a list of the most downloaded nugets?

Sample depends on wrong version of https://www.nuget.org/packages/ClassLibrary/1.0.0/

https://github.com/NuGet/Samples/blob/master/Satellite-Packages/ConsoleApp/ConsoleApp.csproj#L13
shows a dependency on a nuget package that was built without 'Strings' or referencing net40. (see https://github.com/NuGet/Samples/blob/master/Satellite-Packages/ConsoleApp/ConsoleApp.csproj#L13
only targets netFramework 4.0 client profile.)

https://www.nuget.org/packages/ClassLibrary/1.0.0/ is built with and only has reference to net45 assemblies.

Only @karann-msft can upload a new version of ClassLibrary to nuget!

A pull request that has documentation for referencing a local 'nuget' repository, and references net45- can be created if you wish...

Is there a content-file sample that base on .netstandard project

Is there a content-file sample that base on .netstandard project?
I wanna include log4net.config within my package so that when I install my package it will also install log4net.config.But I can not make it for .netcore project,what I do in the package project file is as follows:

<ItemGroup>
    <Content Include="log4net.config" Pack="true" PackagePath="content\log4net.config" />
</ItemGroup>

Hope anyone would reply.Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.