jefffhaynes / XBee

A .NET library for XBee wireless controllers
MIT License
40 stars 17 forks source link

Just checking in on the NuGet Package issue #39

Closed PaulNoto closed 6 years ago

PaulNoto commented 6 years ago

Hi Jeff,

I was just wondering if you have had a chance to look into the issue where NuGet is adding all those extra packages to my project. It takes the disk footprint from ~300KB to ~300MB.

Thanks Paul.

jefffhaynes commented 6 years ago

Hey, from what version of .net are you referencing the nuget package? This appears to be a known issue with pre-4.7.1 versions of .NET.

PaulNoto commented 6 years ago

Was using 4.7 will update to 4.7.1 as soon as I can and let you know where things stand. Every day is a new adventure.

PaulNoto commented 6 years ago

Updated to 4.7.1 and started to rework my project to get rid of all the extra references. I'm having a problem that I haven't been able to figure out. I'm using NuGet and adding XBee.Core is OK However, when I start to add XBee that is when NuGet wants to add all the other references.

I'm wondering if I'm using an old way of doing things.

I need XBee from NuGet, to get this code to work:

controller = new XBeeController(); await controller.OpenAsync( port, 115200 );

without XBee from NuGet; XBeeController does not exist.

I am sort of thinking that XBee.Core should be the only thing I need to bring in from NuGet and there is a newer way to initialize a controller without including XBee from NuGet.

Any enlightenment would be greatly appreciated. Thanks, Paul

PaulNoto commented 6 years ago

Had time this morning to do some testing by creating a new blank WPF App.

Created new WPF App using .Net 4.7.1 Hit F5 and my App runs

Used NuGet to add XBee Got the following Output Messages: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Facades\System.IO.Compression.ZipFile.dll Could not load file or assembly 'file:///C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Facades\System.IO.Compression.ZipFile.dll' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058) C:\Users\work\AppData\Local\Microsoft\VisualStudio\15.0_2df53a5f\Designer\ShadowCache\dn3tkx0t.low\zmmqufyw.4r2\System.IO.Compression.ZipFile.dll Cannot load a reference assembly for execution.

NuGet says 10 Updates, but only XBee.Core is listed

Updated XBee.Core 0 Updates listed

Installed shows XBee XBee.Core

Closed and ReOpend NuGet Installed showes BinarySerializer (Lots of Extra Packages....) XBee Xbee.Core

Updates shows 9 installed 9 Updates Received Message The package at "C:_Test\WpfApp5\packages\BinarySerializer.7.5.5" failed to uninstall. Restart Visual Studio to finish the process. I Clicked the Restart button

Visual Studio Restarts and my App reloads

Checked NuGet No Updates

Hit F5 and the my App runs Packages Installed: ?xml version="1.0" encoding="utf-8"?> packages> package id="BinarySerializer" version="8.0.0" targetFramework="net471" /> package id="Microsoft.NETCore.Platforms" version="2.0.1" targetFramework="net471" /> package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net471" /> package id="NETStandard.Library" version="2.0.1" targetFramework="net471" /> package id="System.AppContext" version="4.3.0" targetFramework="net471" /> package id="System.Collections" version="4.3.0" targetFramework="net471" /> package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net471" /> package id="System.Console" version="4.3.0" targetFramework="net471" /> package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net471" /> package id="System.Diagnostics.DiagnosticSource" version="4.4.1" targetFramework="net471" /> package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net471" /> package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net471" /> package id="System.Globalization" version="4.3.0" targetFramework="net471" /> package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net471" /> package id="System.IO" version="4.3.0" targetFramework="net471" /> package id="System.IO.Compression" version="4.3.0" targetFramework="net471" /> package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net471" /> package id="System.IO.FileSystem" version="4.3.0" targetFramework="net471" /> package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net471" /> package id="System.Linq" version="4.3.0" targetFramework="net471" /> package id="System.Linq.Expressions" version="4.3.0" targetFramework="net471" /> package id="System.Net.Http" version="4.3.3" targetFramework="net471" /> package id="System.Net.Primitives" version="4.3.0" targetFramework="net471" /> package id="System.Net.Sockets" version="4.3.0" targetFramework="net471" /> package id="System.ObjectModel" version="4.3.0" targetFramework="net471" /> package id="System.Reflection" version="4.3.0" targetFramework="net471" /> package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net471" /> package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net471" /> package id="System.Reflection.TypeExtensions" version="4.4.0" targetFramework="net471" /> package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net471" /> package id="System.Runtime" version="4.3.0" targetFramework="net471" /> package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net471" /> package id="System.Runtime.Handles" version="4.3.0" targetFramework="net471" /> package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net471" /> package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net471" /> package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net471" /> package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net471" /> package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net471" /> package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net471" /> package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net471" /> package id="System.Text.Encoding" version="4.3.0" targetFramework="net471" /> package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net471" /> package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net471" /> package id="System.Threading" version="4.3.0" targetFramework="net471" /> package id="System.Threading.Tasks" version="4.3.0" targetFramework="net471" /> package id="System.Threading.Timer" version="4.3.0" targetFramework="net471" /> package id="System.Xml.ReaderWriter" version="4.3.1" targetFramework="net471" /> package id="System.Xml.XDocument" version="4.3.0" targetFramework="net471" /> package id="XBee" version="5.3.3" targetFramework="net471" /> package id="XBee.Core" version="1.6.0" targetFramework="net471" /> packages>

jefffhaynes commented 6 years ago

Is this VS 2017?

— If you want to build a ship, don't drum up people to collect wood and don't assign them tasks and work, but rather teach them to long for the endless immensity of the sea.

Antoine de Saint-Exupery


From: PaulNoto notifications@github.com Sent: Saturday, March 31, 2018 10:21:28 AM To: jefffhaynes/XBee Cc: Jeff Haynes; Comment Subject: Re: [jefffhaynes/XBee] Just checking in on the NuGet Package issue (#39)

Had time this morning to do some testing by creating a new blank WPF App.

Created new WPF App using .Net 4.7.1 Hit F5 and my App runs

Used NuGet to add XBee Got the following Output Messages: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Facades\System.IO.Compression.ZipFile.dll Could not load file or assembly 'file:///C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Facades\System.IO.Compression.ZipFile.dll' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058) C:\Users\work\AppData\Local\Microsoft\VisualStudio\15.0_2df53a5f\Designer\ShadowCache\dn3tkx0t.low\zmmqufyw.4r2\System.IO.Compression.ZipFile.dll Cannot load a reference assembly for execution.

NuGet says 10 Updates, but only XBee.Core is listed

Updated XBee.Core 0 Updates listed

Installed shows XBee XBee.Core

Closed and ReOpend NuGet Installed showes BinarySerializer (Lots of Extra Packages....) XBee Xbee.Core

Updates shows 9 installed 9 Updates Received Message The package at "C:_Test\WpfApp5\packages\BinarySerializer.7.5.5" failed to uninstall. Restart Visual Studio to finish the process. I Clicked the Restart button

Visual Studio Restarts and my App reloads

Checked NuGet No Updates

Hit F5 and the my App runs Packages Installed: ?xml version="1.0" encoding="utf-8"?> packages> package id="BinarySerializer" version="8.0.0" targetFramework="net471" /> package id="Microsoft.NETCore.Platforms" version="2.0.1" targetFramework="net471" /> package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net471" /> package id="NETStandard.Library" version="2.0.1" targetFramework="net471" /> package id="System.AppContext" version="4.3.0" targetFramework="net471" /> package id="System.Collections" version="4.3.0" targetFramework="net471" /> package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net471" /> package id="System.Console" version="4.3.0" targetFramework="net471" /> package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net471" /> package id="System.Diagnostics.DiagnosticSource" version="4.4.1" targetFramework="net471" /> package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net471" /> package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net471" /> package id="System.Globalization" version="4.3.0" targetFramework="net471" /> package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net471" /> package id="System.IO" version="4.3.0" targetFramework="net471" /> package id="System.IO.Compression" version="4.3.0" targetFramework="net471" /> package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net471" /> package id="System.IO.FileSystem" version="4.3.0" targetFramework="net471" /> package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net471" /> package id="System.Linq" version="4.3.0" targetFramework="net471" /> package id="System.Linq.Expressions" version="4.3.0" targetFramework="net471" /> package id="System.Net.Http" version="4.3.3" targetFramework="net471" /> package id="System.Net.Primitives" version="4.3.0" targetFramework="net471" /> package id="System.Net.Sockets" version="4.3.0" targetFramework="net471" /> package id="System.ObjectModel" version="4.3.0" targetFramework="net471" /> package id="System.Reflection" version="4.3.0" targetFramework="net471" /> package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net471" /> package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net471" /> package id="System.Reflection.TypeExtensions" version="4.4.0" targetFramework="net471" /> package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net471" /> package id="System.Runtime" version="4.3.0" targetFramework="net471" /> package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net471" /> package id="System.Runtime.Handles" version="4.3.0" targetFramework="net471" /> package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net471" /> package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net471" /> package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net471" /> package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net471" /> package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net471" /> package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net471" /> package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net471" /> package id="System.Text.Encoding" version="4.3.0" targetFramework="net471" /> package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net471" /> package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net471" /> package id="System.Threading" version="4.3.0" targetFramework="net471" /> package id="System.Threading.Tasks" version="4.3.0" targetFramework="net471" /> package id="System.Threading.Timer" version="4.3.0" targetFramework="net471" /> package id="System.Xml.ReaderWriter" version="4.3.1" targetFramework="net471" /> package id="System.Xml.XDocument" version="4.3.0" targetFramework="net471" /> package id="XBee" version="5.3.3" targetFramework="net471" /> package id="XBee.Core" version="1.6.0" targetFramework="net471" /> packages>

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/jefffhaynes/XBee/issues/39#issuecomment-377696344, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJSKR9TL9lXK1EVZt854SwS5CWg-NYR3ks5tj5DogaJpZM4QfE39.

PaulNoto commented 6 years ago

VS2017 Community latest release

PaulNoto commented 6 years ago

FYI I. Just tried the same thing on a Win7 Ultimate SP1 Latest Release machine, and had the same issues.

The machine from above is a Win10 Pro Latest Release machine.

Both machines have VS2017 Community Latest Release installed.

PaulNoto commented 6 years ago

Just wondering if you have had a chance to look into this.

jefffhaynes commented 6 years ago

Sorry, I've been out of town quite a bit and just doing work when I have time. I'll try to get back to it as soon as possible.

On Sun, Apr 8, 2018 at 9:27 PM, PaulNoto notifications@github.com wrote:

Just wondering if you have had a chance to look into this.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jefffhaynes/XBee/issues/39#issuecomment-379601658, or mute the thread https://github.com/notifications/unsubscribe-auth/AJSKRxBRhtEPWdnoRmGIR4Q0jagKcuULks5tmrj1gaJpZM4QfE39 .

-- If you want to build a ship, don't drum up people together to collect wood and don't assign them tasks and work, but rather teach them to long for the endless immensity of the sea.

Antoine de Saint-Exupery

PaulNoto commented 6 years ago

Spent a few more hours today on this issue and discovered that using NuGet to add BinarySerializer to a fresh WPF App is where all the extra assemblies are getting added. I even tried as the Administrator and had the same result, I usually run under a Limited Account. I had the same result on a Win7 machine.

Do you get this message from the NuGet installer when you try, or does everything work fine for you?

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Facades\System.IO.Compression.ZipFile.dll Could not load file or assembly 'file:///C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Facades\System.IO.Compression.ZipFile.dll' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058) C:\Users\admin\AppData\Local\Microsoft\VisualStudio\15.0_cf1fe7ce\Designer\ShadowCache\lrbegu5m.s2r\1fdwxonw.cqt\System.IO.Compression.ZipFile.dll Cannot load a reference assembly for execution.

PaulNoto commented 6 years ago

Hi Jeff,

Have you had a chance to look at what I wrote in my last comment?

jefffhaynes commented 6 years ago

No, sorry I missed it. I’ll try to take a look today.


From: PaulNoto notifications@github.com Sent: Saturday, May 12, 2018 4:41:24 AM To: jefffhaynes/XBee Cc: Jeff Haynes; Comment Subject: Re: [jefffhaynes/XBee] Just checking in on the NuGet Package issue (#39)

Hi Jeff,

Have you had a chance to look at what I wrote in my last comment?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/jefffhaynes/XBee/issues/39#issuecomment-388549292, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJSKRzo3K5oDyPOscR_sbd8rCPj5LQptks5txspkgaJpZM4QfE39.

PaulNoto commented 6 years ago

Just wondering if you have had the time to look into my issue.

jefffhaynes commented 6 years ago

This worked for me. Did you do anything beyond adding the package?

PaulNoto commented 6 years ago

No. If it works for you, I'm thinking that there is something that it is depending on, that is not installed on my win7 and win10 machines.

the first dependency for BinarySerializer is .NETStandard,Version=v1.3

Could this be the issue?