2016-05-21 5 views
11

Ich habe ein Szenario, in dem ich eine UWP-Client-Anwendung, eine UWP IOT-Anwendung und eine .NET-Core-Anwendung mit einem gemeinsamen Code-Basis ausführen. In .NET Core RC1 habe ich eine Klassenbibliothek (Package) erstellt und "dotnet5.4" als Basisframework für diese Bibliothek verwendet.UWP-Anwendung und .NET Core RC2: kann nicht netstandard1.4 Pakete

Mit "generate build output" konnte ich die erstellten nuget-Pakete von der .NET Core-Anwendung (Konsole) referenzieren und eine Workaround (kopiere die Pakete von% local% .dnx ->% local% .nuget) den UWP verwenden Anwendungen konnten das Paket auch verweisen und verwenden.

Jetzt in RC2 haben sich die Dinge ein wenig geändert und ich bin wieder in der Lage, die aktualisierte Bibliothek zu konsumieren (Tooling aktualisiert in Projektdatei, Änderungen an project.json, netstandard1.4 (seit 1.5 funktioniert nicht mit UAP10 nach this)) perfekt mit der .NET Core-Konsolenanwendung.

Für UWP kann ich die Bibliothek nicht hinzufügen, da ich Dutzende von berüchtigten

"[...] provides a compile-time reference assembly [...] but there is no run-time assembly compatible with [...]" 

Fehler erhalten.

Nach einiger umsah, habe ich versucht, das Problem zu isolieren und fand heraus, dass ich nicht einmal einen Hinweis auf System.IO.FileSystem.Watcher aufgrund hinzufügen:

System.IO.FileSystem.Watcher 4.0.0-rc2-24027 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-arm-aot. 
Some packages are not compatible with UAP,Version=v10.0 (win10-x64-aot). 
System.IO.FileSystem.Watcher 4.0.0-rc2-24027 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. 
Some packages are not compatible with UAP,Version=v10.0 (win10-arm). 
Some packages are not compatible with UAP,Version=v10.0 (win10-x86-aot). 
System.IO.FileSystem.Watcher 4.0.0-rc2-24027 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-x86. 
System.IO.FileSystem.Watcher 4.0.0-rc2-24027 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-x86-aot. 
System.IO.FileSystem.Watcher 4.0.0-rc2-24027 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-arm. 
Some packages are not compatible with UAP,Version=v10.0 (win10-x64). 
System.IO.FileSystem.Watcher 4.0.0-rc2-24027 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. 
Some packages are not compatible with UAP,Version=v10.0 (win10-x86). 
Some packages are not compatible with UAP,Version=v10.0 (win10-arm-aot). 

ich eine Minimallösung habe um das hochgeladene Problem zu reproduzieren to OneDrive.

Ich habe keine Änderungen an der leeren UWP-Vorlage mit Ausnahme der Abhängigkeiten in project.json:

"dependencies": 
{ 
    "Microsoft.ApplicationInsights": "2.1.0-beta4", 
    "Microsoft.ApplicationInsights.PersistenceChannel": "2.0.0-beta3", 
    "Microsoft.ApplicationInsights.WindowsApps": "1.1.1", 
    "Microsoft.NETCore.Platforms": "1.0.1-rc2-24027", 
    "Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0", 
    "NETStandard.Library": "1.5.0-rc2-24027", 

    "System.IO.FileSystem.Watcher": "4.0.0-rc2-24027" 
}, 

Anmerkung: Ich Microsoft.NETCore.UniversalWindowsPlatform auf die neueste Version aktualisiert. Ich habe NETStandard.Library und Microsoft.NETCore.Platforms hinzugefügt.

Hilfe wird sehr geschätzt! Vielen Dank im Voraus -Simon

Antwort

2

System.IO.FileSystem.Watcher wird derzeit in UWP nicht unterstützt. Das moderne SDK stellt die zugrunde liegende Windows-API (ReadDirectoryChanges), die wir implementieren müssen, nicht zur Verfügung.

-Eric, .NET Team