Multiple level nuget dependency c#

We’re facing dificulties trying to make nuget install dependencies of dependencies. We publish custom nugets to an Azure Artifacts with more than one level of dependencies and nuget only installs the first level of these depencencies. As an example:

  • Nuget A has a dependency on Nuget B.
  • Nuget B has a dependency on Nuget C.

A, B and C are all nugets published in our azure artifacts.

Under this scenario, when we install nuget A in a solution it also installs nuget B (listed as a dependency), but nuget C is not installed (although it is necessary for B to work). Is there a way to accomplish this dependency hierarchy when installing a nuget?

All these nugets were published throughout a pipeline like this one:

parameters:
  vmImage: 'windows-latest'
  nugetFeed: '(Our_GUID_Feed)'
  solution: ''
  project: ''
  BuildConfiguration: ''


jobs:
  - job: Job
    pool:
      vmImage: '${{ parameters.vmImage }}'
    steps:
    - task: DotNetCoreCLI@2
      displayName: 'Restore packages'
      inputs:
        command: 'restore'
        projects: '${{ parameters.solution }}'
        vstsFeed: '${{ parameters.nugetFeed }}'
      env:
          System_AccessToken: $(System.AccessToken)

        
    - task: DotNetCoreCLI@2
      displayName: 'Dotnet Build Project'
      inputs:
        arguments: '--configuration ${{ parameters.BuildConfiguration }} /p:Version=$(Build.BuildNumber) /p:Optimize=false --no-restore' 
        projects: '${{ parameters.project }}'
        versioningScheme: byBuildNumber

    - task: DotNetCoreCLI@2
      displayName: 'Dotnet Package Project' 
      inputs: 
        command: pack
        packagesToPack: '${{ parameters.project }}'
        buildProperties: Version=$(Build.BuildNumber)

    - task: DotNetCoreCLI@2 
      displayName: 'Dotnet Push Project' 
      inputs: 
        command: push 
        nuGetFeedType: 'internal'
        publishVstsFeed: '${{ parameters.nugetFeed }}'

c# – Bin DLL’s version different from dll in Nuget package

There is a library build with .net framework 4.5, it serves as a NuGet package for other projects to reference.

In the testing phase, using the project reference method, it can work normally. However, after publishing it as NuGet, the project referenced using NuGet cannot work properly.

I tried to check the version of this library in the Bin directory, but found that it was the last version. I made sure to use the correct version in the NuGet package.

When I use the correct version of the dll to overwrite the class library copied from NuGet to the Bin directory, it still fails to work correctly.

What could be the reason for this?

Generated using Google Translate.

c# – Different behaviour for getting environemnt variable after moving to nuget package

I have a behaviour that I cannot explain in my application.

I have a common library which I;ve used across multiple projects. In this library I’m using System.Environment class to access environment variables, like so.

 string value = System.Environment.GetEnvironmentVariable("MY_ENV_VARIABLE");

I’ve decided to create a nuget package for this shared library, and after moving my reference to the nuget, the value is not set anymore, as if the searched env_variable does not exist.

In an asp.net core project, I’m setting the environment variable

launch.json =>

 "environmentVariables": {
    "MY_ENV_VARIABLE": "my value"
  },

Why this behaviour ? switching back to direct referencing the project, everythign works.

anyway i can stop getting .net core 5.0 packages in nuget package update for my .net core 3.1 applications

is there anyway i can stop getting .net core 5.0 packages in nuget package update for my .net core 3.1 application.
I have some .net core console application (which runs as windows service in windows while systemd service in linux) and some web api application of runtime 3.1
In package manager update i am keep getting
following is sample update for my console application

enter image description here

Which CSOM nuget package should I use for SharePoint 2019

I want to upgrade from SharePoint 2013 to SharePoint 2019 (on prem). We have C# code which uses the CSOM libraries from the GAC which are installed with the SP 2013 client SDK msi package.

I see that msi SDK exist for SP2013 and SP2016 but not for SP2019. I read that SDK msi package will not be developed for SP2019, because the correct way is to use nuget package instead of referencing GAC dlls, because the GAC dlls override the dlls from the package. source

With this in mind on Nuget there are 3 packages:

I was going to use the package for SP2019, but the strange thing is that it is uploaded 2018, and the packages for 2013 and 2016 are updated more recently (2019). And the same source I quoted above says the the SP2016 CSOM libraries are actually compatible with SP2019.

And I am kind of confused. Which nuget package should I use for SP2019?

Windows 2016 powershell and nuget errors

I am trying to install the Windows 2016 RDWeb HTML5 client on a Windows 2016 RDGW server using these instructions from Microsoft. CLICK HERE

I was able to do this successfully on one of our regional server farms last week.

This week I get exactly the same steps and get this error in the screenshot. CLICK HERE

I then test the command on my original server build and it now generates this error too.

Has anyone noticed this error because I can't find the cause. I also know that it means checking my internet connection. However, my RDWeb portal works, but it needs the HTML5 version to support Chromebooks better.

C # – First NuGet package created: Dapper.SimpleRepository

I have just created my first NuGet package and I need critical feedback.

https://www.nuget.org/packages/Dapper.SimpleRepository/1.0.2

and

https://github.com/ccrookston/Dapper.SimpleRepository

The only code is in this file:

https://github.com/ccrookston/Dapper.SimpleRepository/blob/master/Repository.cs

I would appreciate your honest feedback. I'm not looking for attaboys. Some things I'm curious about:

  • Any blatant code problems? Safety? Connection leaks? Etc?
  • Are there any other ways to improve?
  • The general benefit of the package? It's something I use a lot, but I'm amazed at your general thoughts.

Here is the entire Repository.cs file:

using Microsoft.Data.SqlClient;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Threading.Tasks;

// Dapper.SimpleRepository was creatd by Casey Crookston. You are free to use it however you would like.
// I hope it makes your developent faster and easier.

namespace Dapper.SimpleRepository
{
    public class Repository
    {
        private readonly string _connectionString;

        public Repository(string connectionString)
        {
            _connectionString = connectionString;
        }

        private SqlConnection OpenConnection(string connectionString)
        {
            SqlConnection con = new SqlConnection(connectionString);
            con.Open();
            return con;
        }

        // ----------- GET Single Item Methods ----------- //

        /// 
        /// Get a specific record from any table by the primary key
        /// 
        /// 
        /// 
        public T Get(int id)
        {
            T entity;
            using (var connection = OpenConnection(_connectionString))
            {
                entity = connection.Get(id);
            }
            return entity;
        }

        /// 
        /// Get a specific record from any table by the primary key
        /// 
        /// 
        /// 
        public async Task GetAsync(int id)
        {
            T entity;
            using (var connection = OpenConnection(_connectionString))
            {
                entity = await connection.GetAsync(id);
            }
            return entity;
        }

        /// 
        /// Get a specific record from any table that matches the specified filter
        /// 
        /// 
        /// 
        /// 
        /// 
        public T Get(string where, Dictionary parms = null)
        {
            IEnumerable entities;
            using (var connection = OpenConnection(_connectionString))
            {
                if (parms != null)
                    entities = connection.GetList(where, new DynamicParameters(parms));
                else
                    entities = connection.GetList(where);
            }
            if (entities != null && entities.Any())
                return entities.FirstOrDefault();
            else
                return default;
        }

        /// 
        /// Get a specific record from any table that matches the specified filter
        /// 
        /// 
        /// 
        /// 
        /// 
        public async Task GetAsync(string where, Dictionary parms = null)
        {
            IEnumerable entities;
            using (var connection = OpenConnection(_connectionString))
            {
                if (parms != null)
                    entities = await connection.GetListAsync(where, new DynamicParameters(parms));
                else
                    entities = await connection.GetListAsync(where);
            }
            if (entities != null && entities.Any())
                return entities.FirstOrDefault();
            else
                return default;
        }

        /// 
        /// Get a specific type from any query.  This type could be a database model (list), or it could be a single string, or it could be an INT if the query is a SELECT COUNT().
        /// 
        /// 
        /// 
        /// 
        public T GetFromQuery(string query, Dictionary parms = null)
        {
            T entity;
            using (var connection = OpenConnection(_connectionString))
            {
                if (parms != null)
                    entity = connection.Query(query, new DynamicParameters(parms)).FirstOrDefault();
                else
                    entity = connection.Query(query).FirstOrDefault();
            }
            return entity;
        }

        /// 
        /// Get a specific type from any query.  This type could be a database model (list), or it could be a single string, or it could be an INT if the query is a SELECT COUNT().
        /// 
        /// 
        /// 
        /// 
        public async Task GetFromQueryAsync(string query, Dictionary parms = null)
        {
            IEnumerable entity;
            using (var connection = OpenConnection(_connectionString))
            {
                if (parms != null)
                {
                    entity = await connection.QueryAsync(query, new DynamicParameters(parms));
                }
                else
                {
                    entity = await connection.QueryAsync(query);
                }
            }
            return entity.FirstOrDefault();
        }

        // ----------- GET List Methods ----------- //

        /// 
        /// Get an IEnumerable of all records of any database table
        /// 
        /// 
        public IEnumerable GetAll()
        {
            IEnumerable entities;
            using (var connection = OpenConnection(_connectionString))
            {
                entities = connection.GetList();
            }
            return entities;
        }

        /// 
        /// Get an IEnumerable of all records of any database table
        /// 
        /// 
        public async Task> GetAllAsync()
        {
            IEnumerable entities;
            using (var connection = OpenConnection(_connectionString))
            {
                entities = await connection.GetListAsync();
            }
            return entities;
        }

        /// 
        /// Get an IEnumerable from any table that matches the specified filter
        /// 
        /// 
        /// 
        /// 
        public IEnumerable GetList(string where, Dictionary parms = null)
        {
            IEnumerable entities;
            using (var connection = OpenConnection(_connectionString))
            {
                if (parms != null)
                    entities = connection.GetList(where, new DynamicParameters(parms));
                else
                    entities = connection.GetList(where);
            }
            return entities;
        }

        /// 
        /// Get an IEnumerable from any table that matches the specified filter
        /// 
        /// 
        /// 
        /// 
        public async Task> GetListAsync(string where, Dictionary parms = null)
        {
            IEnumerable entities;
            using (var connection = OpenConnection(_connectionString))
            {
                if (parms != null)
                    entities = await connection.GetListAsync(where, new DynamicParameters(parms));
                else
                    entities = await connection.GetListAsync(where);
            }
            return entities;
        }

        /// 
        /// Get an IEnumerable from any table based on a custom query and any (optional) parms
        /// 
        /// 
        /// 
        /// 
        public IEnumerable GetListFromQuery(string query, Dictionary parms = null)
        {
            IEnumerable entities;
            using (var connection = OpenConnection(_connectionString))
            {
                if (parms != null)
                    entities = connection.Query(query, new DynamicParameters(parms));
                else
                    entities = connection.Query(query);
            }
            return entities;
        }

        /// 
        /// Get an IEnumerable from any table based on a custom query and any (optional) parms
        /// 
        /// 
        /// 
        /// 
        public async Task> GetListFromQueryAsync(string query, Dictionary parms = null)
        {
            IEnumerable entities;
            using (var connection = OpenConnection(_connectionString))
            {
                if (parms != null)
                    entities = await connection.QueryAsync(query, new DynamicParameters(parms));
                else
                    entities = await connection.QueryAsync(query);
            }
            return entities;
        }

        /// 
        /// Get a paged IEnumerable of all records of any database table
        /// 
        /// 
        /// 
        /// 
        /// 
        /// 
        /// 
        public IEnumerable GetListPaged(int pageNumber, int rowsPerPage, string conditions, string orderBy, Dictionary parms = null)
        {
            IEnumerable entities;
            using (var connection = OpenConnection(_connectionString))
            {
                entities = connection.GetListPaged(pageNumber, rowsPerPage, conditions, orderBy, parms);
            }
            return entities;
        }

        /// 
        /// Get a paged IEnumerable of all records of any database table
        /// 
        /// 
        /// 
        /// 
        /// 
        /// 
        /// 
        public async Task> GetListPagedAsync(int pageNumber, int rowsPerPage, string conditions, string orderBy, Dictionary parms = null)
        {
            IEnumerable entities;
            using (var connection = OpenConnection(_connectionString))
            {
                entities = await connection.GetListPagedAsync(pageNumber, rowsPerPage, conditions, orderBy, parms);
            }
            return entities;
        }

        // ----------- UPDATE Methods ----------- //

        /// 
        /// Update as existing record in any database table, matching by Id of the record
        /// 
        /// 
        /// 
        public int Update(T entity)
        {
            using (var connection = OpenConnection(_connectionString))
            {
                return connection.Update(entity);
            }
        }

        /// 
        /// Update any existing record in any database table. Returns number of rows affected.
        /// 
        /// 
        /// 
        public async Task UpdateAsync(T entity)
        {
            int records;
            using (var connection = OpenConnection(_connectionString))
            {
                records = await connection.UpdateAsync(entity);
            }
            return records;
        }

        // ----------- INSERT Methods ----------- //

        /// 
        /// Insert a new record into any database table. Retuns the Id of the newly created record.
        /// 
        /// 
        /// 
        public int? Insert(T entity)
        {
            int? newId;
            using (var connection = OpenConnection(_connectionString))
            {
                newId = connection.Insert(entity);
            }
            return newId;
        }

        /// 
        /// Insert a new record into any database table. Retuns the Id of the newly created record.
        /// 
        /// 
        /// 
        public async Task InsertAsync(T entity)
        {
            int? newId;
            using (var connection = OpenConnection(_connectionString))
            {
                newId = await connection.InsertAsync(entity);
            }
            return newId;
        }

        // ----------- DELETE Methods ----------- //

        /// 
        /// Delete a record by primary key from any database table
        /// 
        /// 
        public int Delete(int id)
        {
            using (var connection = OpenConnection(_connectionString))
            {
                return connection.Delete(id);
            }
        }

        /// 
        /// Delete a record by primary key from any database table
        /// 
        /// 
        public async Task DeleteAsync(int id)
        {
            using (var connection = OpenConnection(_connectionString))
            {
                return await connection.DeleteAsync(id);
            }
        }

        /// 
        /// Delete all records from any table that match the specified filter
        /// 
        /// 
        /// 
        public int Delete(string where, Dictionary parms = null)
        {
            using (var connection = OpenConnection(_connectionString))
            {
                return connection.DeleteList(where, new DynamicParameters(parms));
            }
        }

        /// 
        /// Delete all records from any table that match the specified filter
        /// 
        /// 
        /// 
        public async Task DeleteAsync(string where, Dictionary parms = null)
        {
            using (var connection = OpenConnection(_connectionString))
            {
                return await connection.DeleteListAsync(where, new DynamicParameters(parms));
            }
        }

        // ----------- EXECUTE QUERY Method ----------- //

        /// 
        /// Execute any custom query where a return data set it not expected.
        /// 
        /// 
        /// 
        public void ExecuteQuery(string query, Dictionary parms = null)
        {
            using (var connection = OpenConnection(_connectionString))
            {
                connection.Query(query, param: parms);
            }
        }

        /// 
        /// Execute any custom query where a return data set it not expected.
        /// 
        /// 
        /// 
        public async Task ExecuteQueryAsync(string query, Dictionary parms = null)
        {
            using (var connection = OpenConnection(_connectionString))
            {
                await connection.ExecuteAsync(query, param: parms);
            }
        }

        /// 
        /// Execute any custom query where a single return item is expected. This type could be a database model (list), or it could be a single string, or it could be an INT if the query is a SELECT COUNT().
        /// 
        /// 
        /// 
        /// 
        public T ExecuteScalar(string query, Dictionary parms = null)
        {
            using (var connection = OpenConnection(_connectionString))
            {
                return connection.ExecuteScalar(query, param: parms);
            }
        }

        /// 
        /// Execute any custom query where a single return item is expected. This type could be a database model (list), or it could be a single string, or it could be an INT if the query is a SELECT COUNT().
        /// 
        /// 
        /// 
        /// 
        public async Task ExecuteScalarAsync(string query, Dictionary parms = null)
        {
            using (var connection = OpenConnection(_connectionString))
            {
                return await connection.ExecuteScalarAsync(query, param: parms);
            }
        }

        // ----------- STORED PROCEDURE Methods ----------- //

        /// 
        /// Execute any Stored Procedure where a return data set it not expected.
        /// 
        /// 
        /// 
        public void ExecuteSP(string storedProcedureName, Dictionary parms = null)
        {
            using (var connection = OpenConnection(_connectionString))
            {
                connection.Execute(storedProcedureName, parms, commandType: CommandType.StoredProcedure);
            }
        }

        /// 
        /// Execute any Stored Procedure where a return data set it not expected.
        /// 
        /// 
        /// 
        public async Task ExecuteSPAsync(string storedProcedureName, Dictionary parms = null)
        {
            using (var connection = OpenConnection(_connectionString))
            {
                await connection.ExecuteAsync(storedProcedureName, parms, commandType: CommandType.StoredProcedure);
            }
        }

        /// 
        /// Execute any Stored Procedure where a single item is expected as a return.
        /// 
        /// 
        /// 
        /// 
        /// 
        public T ExecuteSPSingle(string storedProcedureName, Dictionary parms = null)
        {
            IEnumerable entities;
            using (var connection = OpenConnection(_connectionString))
            {
                entities = connection.Query(storedProcedureName, parms, commandType: CommandType.StoredProcedure);
            }
            if (entities != null && entities.Any())
                return entities.FirstOrDefault();
            else
                return default;
        }

        /// 
        /// Execute any Stored Procedure where a single item is expected as a return.
        /// 
        /// 
        /// 
        /// 
        /// 
        public async Task ExecuteSPSingleAsync(string storedProcedureName, Dictionary parms = null)
        {
            IEnumerable entities;
            using (var connection = OpenConnection(_connectionString))
            {
                entities = await connection.QueryAsync(storedProcedureName, parms, commandType: CommandType.StoredProcedure);
            }
            if (entities != null && entities.Any())
                return entities.FirstOrDefault();
            else
                return default;
        }

        /// 
        /// Execute a Store Procedure when a List of T is expected in return.
        /// 
        /// 
        /// 
        /// 
        /// Returns a List of T
        public IEnumerable ExecuteSPList(string storedProcedureName, Dictionary parms = null)
        {
            using (var connection = OpenConnection(_connectionString))
            {
                IEnumerable output = connection.Query(storedProcedureName, param: parms, commandTimeout: 0, commandType: CommandType.StoredProcedure);
                return output;
            }
        }

        /// 
        /// Execute a Store Procedure when a List of T is expected in return.
        /// 
        /// 
        /// 
        /// 
        /// Returns a List of T
        public async Task> ExecuteSPListAsync(string storedProcedureName, Dictionary parms = null)
        {
            using (var connection = OpenConnection(_connectionString))
            {
                var output = await connection.QueryAsync(storedProcedureName, param: parms, commandTimeout: 0, commandType: CommandType.StoredProcedure);
                return output;
            }
        }
    }

    public class Repository
    {
        private readonly Repository _base;

        public Repository(string connectionString)
        {
            _base = new Repository(connectionString);
        }

        // ----------- GET Single Item Methods ----------- //

        /// 
        /// Get a specific record from any table by the primary key
        /// 
        /// 
        /// 
        public T Get(int id) => _base.Get(id);

        /// 
        /// Get a specific record from any table by the primary key
        /// 
        /// 
        /// 
        public async Task GetAsync(int id) => await _base.GetAsync(id);

        /// 
        /// Get a specific record from any table that matches the specified filter
        /// 
        /// 
        /// 
        /// 
        public T Get(string where, Dictionary parms = null) => _base.Get(where, parms);

        /// 
        /// Get a specific record from any table that matches the specified filter
        /// 
        /// 
        /// 
        /// 
        public async Task GetAsync(string where, Dictionary parms = null) => await _base.GetAsync(where, parms);

        /// 
        /// Get a specific type from any query.  This type could be a database model (list), or it could be a single string, or it could be an INT if the query is a SELECT COUNT().
        /// 
        /// 
        /// 
        /// 
        public T GetFromQuery(string query, Dictionary parms = null) => _base.GetFromQuery(query, parms);

        /// 
        /// Get a specific type from any query.  This type could be a database model (list), or it could be a single string, or it could be an INT if the query is a SELECT COUNT().
        /// 
        /// 
        /// 
        /// 
        public async Task GetFromQueryAsync(string query, Dictionary parms = null) => await _base.GetFromQueryAsync(query, parms);

        // ----------- GET List Methods ----------- //

        /// 
        /// Get an IEnumerable of all records of any database table
        /// 
        /// 
        public IEnumerable GetAll() => _base.GetAll();

        /// 
        /// Get an IEnumerable of all records of any database table
        /// 
        /// 
        public async Task> GetAllAsync() => await _base.GetAllAsync();

        /// 
        /// Get an IEnumerable from any table that matches the specified filter
        /// 
        /// 
        /// 
        /// 
        public IEnumerable GetList(string where, Dictionary parms = null) => _base.GetList(where, parms);

        /// 
        /// Get an IEnumerable from any table that matches the specified filter
        /// 
        /// 
        /// 
        /// 
        public async Task> GetListAsync(string where, Dictionary parms = null) => await _base.GetListAsync(where, parms);

        /// 
        /// Get an IEnumerable from any table based on a custom query and any (optional) parms
        /// 
        /// 
        /// 
        /// 
        public IEnumerable GetListFromQuery(string query, Dictionary parms = null) => _base.GetListFromQuery(query, parms);

        /// 
        /// Get an IEnumerable from any table based on a custom query and any (optional) parms
        /// 
        /// 
        /// 
        /// 
        public async Task> GetListFromQueryAsync(string query, Dictionary parms = null) => await _base.GetListFromQueryAsync(query, parms);

        /// 
        /// Get a paged IEnumerable of all records of any database table
        /// 
        /// 
        /// 
        /// 
        /// 
        /// 
        /// 
        public IEnumerable GetListPaged(int pageNumber, int rowsPerPage, string conditions, string orderBy, Dictionary parms = null) => _base.GetListPaged(pageNumber, rowsPerPage, conditions, orderBy, parms);

        /// 
        /// Get a paged IEnumerable of all records of any database table
        /// 
        /// 
        /// 
        /// 
        /// 
        /// 
        /// 
        public async Task> GetListPagedAsync(int pageNumber, int rowsPerPage, string conditions, string orderBy, Dictionary parms = null) => await _base.GetListPagedAsync(pageNumber, rowsPerPage, conditions, orderBy, parms);

        // ----------- UPDATE Methods ----------- //

        /// 
        /// Update as existing record in any database table, matching by Id of the record
        /// 
        /// 
        /// 
        public int Update(T entity) => _base.Update(entity);

        /// 
        /// Update as existing record in any database table, matching by Id of the record
        /// 
        /// 
        /// 
        public async Task UpdateAsync(T entity) => await _base.UpdateAsync(entity);

        // ----------- INSERT Methods ----------- //

        /// 
        /// Insert a new record into any database table. Retuns the Id of the newly created record.
        /// 
        /// 
        /// 
        public int? Insert(T entity) => _base.Insert(entity);

        /// 
        /// Insert a new record into any database table. Retuns the Id of the newly created record.
        /// 
        /// 
        /// 
        public async Task InsertAsync(T entity) => await _base.InsertAsync(entity);

        // ----------- DELETE Methods ----------- //

        /// 
        /// Delete a record by primary key from any database table
        /// 
        /// 
        /// 
        public int Delete(int id) => _base.Delete(id);

        /// 
        /// Delete a record by primary key from any database table
        /// 
        /// 
        /// 
        public async Task DeleteAsync(int id) => await _base.DeleteAsync(id);

        /// 
        /// Delete all records from any table that match the specified filter
        /// 
        /// 
        /// 
        /// 
        public int Delete(string where, Dictionary parms = null) => _base.Delete(where, parms);

        /// 
        /// Delete all records from any table that match the specified filter
        /// 
        /// 
        /// 
        /// 
        public async Task DeleteAsync(string where, Dictionary parms = null) => await _base.DeleteAsync(where, parms);

        // ----------- EXECUTE QUERY Methods ----------- //

        /// 
        /// Execute any custom query where a return data set it not expected.
        /// 
        /// 
        /// 
        public void ExecuteQuery(string query, Dictionary parms = null) => _base.ExecuteQuery(query, parms);

        /// 
        /// Execute any custom query where a return data set it not expected.
        /// 
        /// 
        /// 
        /// 
        public async Task ExecuteQueryAsync(string query, Dictionary parms = null) => await _base.ExecuteQueryAsync(query, parms);

        /// 
        /// Execute any custom query where a single return item is expected. This type could be a database model (list), or it could be a single string, or it could be an INT if the query is a SELECT COUNT().
        /// 
        /// 
        /// 
        /// 
        public T ExecuteScalar(string query, Dictionary parms = null) => _base.ExecuteScalar(query, parms);

        /// 
        /// Execute any custom query where a single return item is expected. This type could be a database model (list), or it could be a single string, or it could be an INT if the query is a SELECT COUNT().
        /// 
        /// 
        /// 
        /// 
        public async Task ExecuteScalarAsync(string query, Dictionary parms = null) => await _base.ExecuteScalarAsync(query, parms);

        // ----------- STORED PROCEDURE Methods ----------- //

        /// 
        /// Execute any Stored Procedure where a return data set it not expected.
        /// 
        /// 
        /// 
        public void ExecuteSP(string storedProcedureName, Dictionary parms = null) => _base.ExecuteSP(storedProcedureName, parms);

        /// 
        /// Execute any Stored Procedure where a return data set it not expected.
        /// 
        /// 
        /// 
        /// 
        public async Task ExecuteSPAsync(string storedProcedureName, Dictionary parms = null) => await _base.ExecuteSPAsync(storedProcedureName, parms);

        /// 
        /// Execute any Stored Procedure where a single item is expected as a return.
        /// 
        /// 
        /// 
        /// 
        public T ExecuteSPSingle(string storedProcedureName, Dictionary parms = null) => _base.ExecuteSPSingle(storedProcedureName, parms);

        /// 
        /// Execute any Stored Procedure where a single item is expected as a return.
        /// 
        /// 
        /// 
        /// 
        public async Task ExecuteSPSingleAsync(string storedProcedureName, Dictionary parms = null) => await _base.ExecuteSPSingleAsync(storedProcedureName, parms);

        /// 
        /// Execute a Store Procedure when a List of T is expected in return.
        /// 
        /// 
        /// 
        /// 
        public IEnumerable ExecuteSPList(string storedProcedureName, Dictionary parms = null) => _base.ExecuteSPList(storedProcedureName, parms);

        /// 
        /// Execute a Store Procedure when a List of T is expected in return.
        /// 
        /// 
        /// 
        /// 
        public async Task> ExecuteSPListAsync(string storedProcedureName, Dictionary parms = null) => await _base.ExecuteSPListAsync(storedProcedureName, parms);
    }
}

````

File or assembly & # 39; System.IdentityModel.Tokens.Jwt, version = 5.6.0.0 could not be loaded after upgrading the Nuget packages from Azure Function to 3.0.4 or 3.0.5

We had an Azure function V3 that refers to another C # project in a VS 2019 solution. In the other C # project there are some extension methods that use the System.IdentityModel.Tokens.Jwt Version = 5.6.0.0 assembly to perform the token validation. The Azure feature worked fine using these extension methods to verify the token. The following code fragment shows the Nuget packages:






We updated the Nuget bundles in the Azure feature according to the list below and received the exception that reflects the title of this ticket. What is the solution or workaround to solve this problem?

    





We also tried Microsoft.NET.Sdk.Functions version 3.0.5, but it has the same problem. What is the solution to this problem? Is this an issue that needs to be fixed in the updated Nuget package?

Dependencies – Risk of NuGet package adding a new reference DLL

Had an interesting conversation with our architect. It was a matter of replacing a simple DLL reference with a NuGet package. His concern was: "If it is possible for a single NuGet package to add multiple DLL references, NuGet package authors can choose to add a new DLL to the package. So when we update the NuGet package, a new DLL is added, but our installer won. You don't know anything about it, so you won't include it in the installation. This problem is only revealed if testers can test the installed build of the software. " And that would be a reason not to use NuGet, as using simple binary references would be obvious when adding a new DLL.

My point of view on this problem is that the chance that this will happen is too small to deal with. The NuGet package authors would consider this a fundamental change and would only make this change in a major release. In order to reduce this risk, NuGet should not be used, but a test automation should be created, which loads our installed software.

The question is: what is the risk that the above will happen? From a NuGet package that adds a new DLL as a project reference in a no larger version?