faker-cs
faker-cs copied to clipboard
System.IO.FileNotFoundException : Could not load file or assembly 'Faker.Net.Standard.2.0, Version=1.5.136.0
Unable to use faker references from .net standard 2.0 which is referenced to a .net framework V4.8 test project , the compile time assembly of faker included in a .net standard project is changed to .net framework.
Yes, this sucks. Would you like to submit a fix?
@ManikandanMani I can't replicate it can you upload your project somewhere please?
@ManikandanMani I can't replicate it can you upload your project somewhere please?
@Siliconrob https://github.com/ManikandanMani/FakerIssueRepro
@Siliconrob , @oriches I assume its similar to this (https://github.com/dotnet/runtime/issues/25770) the issue is caused seems theyhave mentioned that it were fixed it in net472 (https://github.com/Microsoft/dotnet/blob/master/releases/net471/KnownIssues/514195-Targeting%20.NET%20Framework%204.7.1%20copies%20extra%20files%20to%20your%20bin%20directory.md) but i tried targetting net 472 & 48 but didn't resolve , one work around is adding the faker dll under reference include didn't throw any exception instead of adding under package reference include .
Give me a day or so to look over it. Thanks for the upload
@ManikandanMani I was able to reproduce your issue and I tracked it down to the embedded resource. I made some slight changes to the project linking for the resources and it was fine. Here is the fix I think will get this working #17
@oriches can you review?
@oriches Would you publish the change in #17 to nuget please
Pushed, but i think we still have the issue after testing.
Let me know what you see...
------ Original Message ------ From: "Siliconrob" @.> To: "oriches/faker-cs" @.> Cc: "Ollie Riches" @.>; "Mention" @.> Sent: Tuesday, 18 May, 21 At 18:50 Subject: Re: [oriches/faker-cs] System.IO.FileNotFoundException : Could not load file or assembly 'Faker.Net.Standard.2.0, Version=1.5.136.0 (#16)
@oriches https://github.com/oriches Would you publish the change in #17 https://github.com/oriches/faker-cs/pull/17 to nuget please — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/oriches/faker-cs/issues/16#issuecomment-843400691 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI6FZ32VEL5IDI5ZC3INKTTOKSF3ANCNFSM442ZCMLQ .
😦😖😞 I will check it tonight, but if it doesn't work I will do further investigation.
I think the nuGet spec is wrong for 4.6 - 4.8 versions, I think they need to be the .net standard versions 2.0 - 2.1, so when they are referenced they will be the correct assemblies when referencing a .net standard project in a .net 4.8 project where Faker is unused from nuGet.On 18 May 2021 19:19, Siliconrob @.***> wrote:
😦😖😞 I will check it tonight, but if it doesn't work I will do further investigation.
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
Yes, you are right it doesn't work. I have an idea about multi-targeting the framework for the library, but it's not working so far. Does this even sound like a good idea?
Multi target did not solve issue. Open to suggestions, but not sure why you want to use NUnit 4.8 framework for tests. Switch to .NET Core or use Xunit is what I would say to do @ManikandanMani
I have an idea of around hacking the nuGet package once installed for the project, if it works it measn changing the nuSpec only, I'll try and find sometime later this week.
Thanks Ollie
------ Original Message ------ From: "Siliconrob" @.> To: "oriches/faker-cs" @.> Cc: "Ollie Riches" @.>; "Mention" @.> Sent: Sunday, 23 May, 21 At 22:04 Subject: Re: [oriches/faker-cs] System.IO.FileNotFoundException : Could not load file or assembly 'Faker.Net.Standard.2.0, Version=1.5.136.0 (#16)
Multi target did not solve issue. Open to suggestions, but not sure why you want to use NUnit 4.8 framework for tests. Switch to .NET Core or use Xunit is what I would say to do @ManikandanMani https://github.com/ManikandanMani — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/oriches/faker-cs/issues/16#issuecomment-846624257 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI6FZZ3NQIWOXLUSHREU63TPFUXDANCNFSM442ZCMLQ .
Multi target did not solve issue. Open to suggestions, but not sure why you want to use NUnit 4.8 framework for tests. Switch to .NET Core or use Xunit is what I would say to do @ManikandanMani
@Siliconrob Since our project need xrm.sdk dll which supports only net frameworks , when referencing it other projects types doesn't support xrm.sdk dlls. so net framework was the only option.
Multi target did not solve issue. Open to suggestions, but not sure why you want to use NUnit 4.8 framework for tests. Switch to .NET Core or use Xunit is what I would say to do @ManikandanMani
@Siliconrob Since our project need xrm.sdk dll which supports only net frameworks , when referencing it other projects types doesn't support xrm.sdk dlls. so net framework was the only option.
🙁😿
Waiting for what @oriches can turn up