DecaTec / Portable-WebDAV-Library

Moved to codeberg.org - https://codeberg.org/DecaTec/Portable-WebDAV-Library - The Portable WebDAV Library is a strongly typed, async WebDAV client library which is fully compliant to RFC 4918, RFC 4331 and "Additional WebDAV Collection Properties". It is implemented as .NETStandard 1.1 library in oder to be used on any platform supporting .NETStandard 1.1.
https://decatec.de
Microsoft Public License
46 stars 11 forks source link

Nuget Install Failing #37

Closed Tronald closed 7 years ago

Tronald commented 7 years ago

.NET Standard 1.1 includes .NET Framework 4.5. When trying to install via Nuget for a .NET 4.5 project in VS the following error occurs.

Could not install package 'PortableWebDavLibrary 0.8.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

DecaTec commented 7 years ago

Which version of VS are you using?

Tronald commented 7 years ago

2012 Professional.

DecaTec commented 7 years ago

I've only tested adding a reference to the lib in VS 2015 and 2018. Here it works well for .NET 4.5 projects. I can only guess that VS 2012 is too old to "know" about .NET Core.

Maybe this is of any help.

Tronald commented 7 years ago

I believe you are correct. This is most likely the issue. Will try in a more recent copy of VS when able.

DecaTec commented 7 years ago

For now, you could use v0.6.3.0 of the lib. It does not contain the latest features, but is separated into UWP/NetFx. The NetFx part is "pure .NET 4.5", so you could use that.

I'll close this issue, because it seems to be VS 2012 related.

Tronald commented 7 years ago

Last follow up in case anyone working in a "pre .NET Core" environment needs this library.

I downloaded the .zip containing the most recent release directly to see if I could get it to work in a "pure .NET 4.5" project. It is working great. With that said I have only used the features available in the WebDavSession class which may not be targeting newer .NET Core features.

I would recommend trying this method first as the v0.6.3.0 NetFx library is pretty limited in it's WebDavSession properties. This will allow you to work around the Nuget "target" verification. With that said, rigorously test the features you need, as errors will occur if you start targeting things you don't have a framework for.