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

Nuget packing not including dependncies in right way

$
0
0

I have a C# library, let say "Utilities" that uses Log4net as dependency, I am using .net framwork 4.6.1, I finished developeing this library and do a nuget pack Utilities.projcs and then push this package.

While I'm try to use this Utilities in another project that which is an asp.net core "2.1" project, I got this exception

**Method not found: 'log4net.ILog log4net.LogManager.GetLogger(System.String)'.**System.MissingMethodException      HResult=0x80131513      Message=Method not found: 'log4net.ILog log4net.LogManager.GetLogger(System.String)'.      Source=Utilities      StackTrace:       at Utilities.Logging.MyLogManager.GetLogger(String loggerKey)

My Utilities nuget spec file

<?xml version="1.0"?><package ><metadata><id>Utilities</id><version>1.2.0</version><title>Internal Utilities</title><authors>My Team</authors><owners>My Team</owners><requireLicenseAcceptance>false</requireLicenseAcceptance><description>This dll contains parsers,loggers and other functionalities that is commonly used.</description><releaseNotes>Rlease notes</releaseNotes><copyright>Copyright 2020</copyright><tags>Utilities</tags><dependencies><dependency id="log4net" version="2.0.8" include="all"/></dependencies></metadata><files><file src="bin\Debug\log4net.dll" target="" /><file src="bin\Debug\log4net.xml" target="" /><file src="bin\Debug\Utilities.dll" target="" /></files></package>

Any ideas to solve this, I spent the last couple of days to solve it but no luck

NOTE: When I add Reference manually by location in my pc (My library + Log4net) it works fine!!


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>