Code Monkey home page Code Monkey logo

Comments (21)

Yortw avatar Yortw commented on August 20, 2024

It looks like your reference to the Yort.NTP dll is incorrect (wrong DLL referenced).
That error occurs when you've referenced the PCL dll from your app. The PCL dll should only ever be referenced from other PCL projects, your main app/website etc should reference the DLL for the nearest non portable DLL (i.e the full .Net 4 version for example).

The Nuget package should add the correct references for you.

Are you using the Nuget package?
What type of project do you have/which framework are you targeting/

from yort.ntp.

federinik avatar federinik commented on August 20, 2024

I'm using Yort in 3 different project, SL 8.1, WinRT 8.1 and UWP apps. I'm using the NuGet package, but the only package I'm able to find on NuGet it's Yort.Ntp.Portable.

At this moment, I've downloaded the source code and imported it in my project but I would like to integrate Yort through the NuGet package

from yort.ntp.

Yortw avatar Yortw commented on August 20, 2024

Does this occur for all three projects, or just one or two?
Can you check the references?
The SL8.1 project should reference Yort.Ntp.WPSL.dll
The WinRT and UWP should both reference Yort.Ntp.dll but in the lib\netcore451 folder under wherever the nuget package contents are stored on your machine.

Nothing should reference anything in lib\portable-net45+win+wpa81+wp80

from yort.ntp.

Yortw avatar Yortw commented on August 20, 2024

Hi,

Did you manage to check the references?

from yort.ntp.

federinik avatar federinik commented on August 20, 2024

Hi,
I'm sorry but I've been kinda busy at work, while I'm using Yort for a personal project. I'll keep you updated asap I have checked the references

from yort.ntp.

Yortw avatar Yortw commented on August 20, 2024

No problem, I know how that is :)

from yort.ntp.

federinik avatar federinik commented on August 20, 2024

Ok, here are the references:

  • RT project references Yort.Ntp, path ...\packages\Yort.Ntp.Portable.1.0.6\lib\portable-net45+win+wpa81+wp80\Yort.Ntp.dll
  • SL project references Yort.Ntp.Portable, path ...\Yort.Ntp.Portable.1.0.6\lib\wp81\Yort.Ntp.WPSL.dll
  • UWP project references Yort.Ntp.Portable, path (I think, properties from Visual Studio are empty, so that's from project.lock.json) lib/netcore451/Yort.Ntp.dll

Maybe the NuGet packages directives for RT are wrong?

from yort.ntp.

Yortw avatar Yortw commented on August 20, 2024

Hmmm odd. I just tried a brand new UWP project and a brand new WinRT 8.1 project.
The UWP and Windows WinRT 8.1 projects reference the assembly in the netcore451 folder, which should be correct, they don't reference the portable one like you have - I'm not sure why you're getting those references.

Also tried it with an SL8.1 phone app, and it references; lib\wp81\Yort.Ntp.WPSL.dll - so also not the portable one.

The WP WinRT 8.1 project did reference the portable assembly, so I'll need to figure out how to update nuget package to do the right thing there.

If you remove and re-add the package does that help?
What version of nuget do you have installed?

from yort.ntp.

federinik avatar federinik commented on August 20, 2024

I've removed-added the package many times and nothing has changed. NuGet is v. 3.4.3. Visual Studio is 2015 v. 14.0.25123 Update 2

A brand new WinRT8.1 project of mine references ...\portable-net45+win+wpa81+wp80\Yort.Ntp.dll

Edit: closed by mistake, reopened

from yort.ntp.

Yortw avatar Yortw commented on August 20, 2024

Weird. I have the same versions but seem to get different behaviour. I'll try to do more testing when I get some time.
You should be able to fix the problem temporarily by manually changing the references.

Thanks for assisting by providing detail.

from yort.ntp.

federinik avatar federinik commented on August 20, 2024

No problem, I wish to help you so I can use the NuGet package instead of the source

from yort.ntp.

Yortw avatar Yortw commented on August 20, 2024

Hi,

Does your RT project target 8.1 or 8.0?

from yort.ntp.

Yortw avatar Yortw commented on August 20, 2024

Also is your RT project a 'phone RT' project?

from yort.ntp.

Yortw avatar Yortw commented on August 20, 2024

I've pushed a new copy to nuget that might fix it, but I can still only reproduce the issue on a WPA8.1 project, the others appear to be fine. Let me know if the updated version helps.

from yort.ntp.

federinik avatar federinik commented on August 20, 2024

My project targets 8.1 and it's a phone project, not Universal. I'll try the new package asap

from yort.ntp.

Yortw avatar Yortw commented on August 20, 2024

Hi, any luck with using the new package?

from yort.ntp.

federinik avatar federinik commented on August 20, 2024

Hi, sorry for taking so long to answer you. First of all, after the update of NuGet package to v 1.0.7 my SL project won't compile anymore. All the classes from the Yort.Ntp namespace are ambiguously located in Yort.Ntp and Yort.Ntp.WPSL dll's, both of them figure in the references section of my SL project.

In addition, my WInRT project compiles, but when try to use the class NtpClient, this exception is thrown:

Could not load file or assembly 'Yort.Ntp, Version=1.0.0.7, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Just Yort.Ntp dll is referenced in my RT project. I've cleaned/rebuilt my project and reinstalled from 0 my apps difefrent times.

from yort.ntp.

Yortw avatar Yortw commented on August 20, 2024

Thanks for getting back to me. I'm at work now so unfortunately it will be later tonight my time (NZ) before I can look further. It definitely still sounds like you're getting bad references though. I'll get back to you when I know more.

from yort.ntp.

Yortw avatar Yortw commented on August 20, 2024

Hi,

I found a problem with the Nuget package with regards to WPSL and .Net 4.5 projects.

I've pushed a new package to fix that. I wasn't able to reproduce the RT problem, but possibly the package changes will help anyway. I created a new solution with a WPSL8.1, WinRT8.1 and WinRTPhone8.1 project and applied the updated package - all of them compiled and actually retrieved times from the internet.

Please give the new package a try when you have time and let me know if it works.

from yort.ntp.

federinik avatar federinik commented on August 20, 2024

Hi, sorry again for taking all this time to answer you.

NuGet package 1.0.9 solved all the problems mentioned above. Closing the issue, thank you.

from yort.ntp.

Yortw avatar Yortw commented on August 20, 2024

Excellent, thanks for reporting the issue and letting me know the last update fixed it.

from yort.ntp.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.