Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.IO.FileNotFoundException : Could not load file or assembly 'Faker.Net.Standard.2.0, Version=1.5.136.0 #16

Open
ManikandanMani opened this issue May 13, 2021 · 15 comments

Comments

@ManikandanMani
Copy link

image
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.

@Siliconrob
Copy link

Yes, this sucks. Would you like to submit a fix?

@Siliconrob
Copy link

@ManikandanMani I can't replicate it can you upload your project somewhere please?

@ManikandanMani
Copy link
Author

@ManikandanMani I can't replicate it can you upload your project somewhere please?

@Siliconrob https://github.com/ManikandanMani/FakerIssueRepro

@ManikandanMani
Copy link
Author

ManikandanMani commented May 16, 2021

@Siliconrob , @oriches I assume its similar to this (dotnet/runtime#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 .
image

@Siliconrob
Copy link

Give me a day or so to look over it. Thanks for the upload

@Siliconrob
Copy link

@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?

@Siliconrob
Copy link

@oriches Would you publish the change in #17 to nuget please

@oriches
Copy link
Owner

oriches commented May 18, 2021 via email

@Siliconrob
Copy link

😦😖😞 I will check it tonight, but if it doesn't work I will do further investigation.

@oriches
Copy link
Owner

oriches commented May 18, 2021 via email

@Siliconrob
Copy link

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?

@Siliconrob
Copy link

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

@oriches
Copy link
Owner

oriches commented May 24, 2021 via email

@ManikandanMani
Copy link
Author

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.

@Siliconrob
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants