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

Could not load file or assembly using Microsoft.Extensions.Configuration.Json #18461

Open
Cheelax opened this issue Sep 7, 2016 · 4 comments
Labels
area-Meta backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity question Answer questions and provide assistance, not an issue with source code or documentation.
Milestone

Comments

@Cheelax
Copy link

Cheelax commented Sep 7, 2016

Hi everybody,
I'm working on a windows 10 IoT project where I want to use Microsoft.Extensions.Configuration.Json so I added it in my project.json in the dependencies:

"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2",
"System.Xml.XmlDocument": "4.0.1",
"System.Xml.XPath.XDocument": "4.0.1",
"Serilog": "2.2.1",
"Serilog.Sinks.RollingFile": "2.2.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0"
},

I can deploy my solution but I have this exception:

{"Could not load file or assembly 'System.IO.FileSystem.Watcher, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies.
The system cannot find the file specified.":"System.IO.FileSystem.Watcher, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"}

I tried adding System.IO.FileSystem.Watcher to my dependencies in project.json but it didn't solve the problem...

It looks like this person has a similar problem:
http://stackoverflow.com/questions/37365216/uwp-application-and-net-core-rc2-cannot-reference-netstandard1-4-packages

Somebody has an idea?
Thank you

@tarekgh
Copy link
Member

tarekgh commented Mar 2, 2017

CC @ericstj @ianhays

@ericstj
Copy link
Member

ericstj commented Mar 2, 2017

I take it this is a UAP app? FileSystem.Watcher isn't supported for UAP. The Windows APIs it needs to call are not available to UAP apps. You should have seen an error from NuGet after you added that to your project.

Here is what I see:

Error		System.IO.FileSystem.Watcher 4.0.0 provides a compile-time reference assembly for System.IO.FileSystem.Watcher on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64-aot.
Error		One or more packages are incompatible with UAP,Version=v10.0 (win10-arm-aot).
...

Those errors mean that the package is not compatible with UAP.

@tarekgh
Copy link
Member

tarekgh commented Mar 2, 2017

@ericstj any idea if there is a version of Microsoft.Extensions.Configuration.Json package that can work in UAP? it looks from the thread System.IO.FileSystem.Watcher is just a problem because Microsoft.Extensions.Configuration.Json is referencing it.

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Feb 23, 2020
@ericstj ericstj removed the untriaged New issue has not been triaged by the area owner label Jun 25, 2020
Copy link
Contributor

Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

This process is part of our issue cleanup automation.

@dotnet-policy-service dotnet-policy-service bot added backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity labels Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Meta backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity question Answer questions and provide assistance, not an issue with source code or documentation.
Projects
No open projects
Development

No branches or pull requests

5 participants