Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Not all public classes available in NuGet package

$
0
0

When I use the dotnet pack command to create a NuGet package and reference it in another project, not all my classes are available.

I have the follwing file (name DTOs.cs) which contains a lot of classes.

namespace AAUTOGateway.Models{    public class Unit    {    }    [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")]    public enum ConfigurationAssetType    {        [System.Runtime.Serialization.EnumMember(Value = @"Asset")]        Asset = 0,        [System.Runtime.Serialization.EnumMember(Value = @"ContactPerson")]        ContactPerson = 1,        [System.Runtime.Serialization.EnumMember(Value = @"Credential")]        Credential = 2,    }    [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")]    public class ConfigurationSchemaAttributeModel    {        [System.Text.Json.Serialization.JsonPropertyName("id")]        public int Id { get; set; }        [System.Text.Json.Serialization.JsonPropertyName("processId")]        public int ProcessId { get; set; }        [System.Text.Json.Serialization.JsonPropertyName("key")]        public string Key { get; set; }        [System.Text.Json.Serialization.JsonPropertyName("type")]        [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))]        public ConfigurationAssetType Type { get; set; }    }    [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0))")]    public class ConfigurationScopeAssetModel    {        [System.Text.Json.Serialization.JsonPropertyName("id")]        public int Id { get; set; }        [System.Text.Json.Serialization.JsonPropertyName("configurationScopeId")]        public int ConfigurationScopeId { get; set; }        [System.Text.Json.Serialization.JsonPropertyName("key")]        public string Key { get; set; }        [System.Text.Json.Serialization.JsonPropertyName("type")]        [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))]        public ConfigurationAssetType Type { get; set; }        [System.Text.Json.Serialization.JsonPropertyName("value")]        public string Value { get; set; }    }...}

However in the project, which references the NuGet package, is only able to see the Unit class.enter image description here

Any ideas to why this is the case, or if there is something obvious that I have missed?


Viewing all articles
Browse latest Browse all 3067

Trending Articles