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

Get machine.specification working on "Metro"/AppStore apps #120

Closed
haf opened this issue Oct 11, 2012 · 10 comments
Closed

Get machine.specification working on "Metro"/AppStore apps #120

haf opened this issue Oct 11, 2012 · 10 comments

Comments

@haf
Copy link
Contributor

haf commented Oct 11, 2012

PM> install-package machine.specifications
Successfully installed 'Machine.Specifications 0.5.9'.
Successfully uninstalled 'Machine.Specifications 0.5.9'.
Install failed. Rolling back...
install-package : Could not install package 'Machine.Specifications 0.5.9'. You are trying to install this package into a project that targets '.NETCore,Version=v4.5', but the package does not contain any assembly references or content files that are compatib
le with that framework. For more information, contact the package author.
At line:1 char:1
+ install-package machine.specifications
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

Unfortunately it doesn't work, and I'm going slowly insane with withdrawal symptoms from not using Machine Specifications; excessive salivation, yelling at co-workers, bitter tweets about WinRT, you name it.

I belive it's mostly a matter of compiling it for ".Net" (Windows Runtime) 4.5 and avoiding things that are dangerous according to WinRT propaganda, such as ThreadPool and the like.

@agross
Copy link
Member

agross commented Nov 22, 2012

I don't have Windows 8 (and don't plan to upgrade, yet). VS 2012 doesn't have any entries for WinRT/Metro -- I don't even where to start.

Can you try to convert Machine.Specifications.dll to such a "NetCore" project and see if it compiles?

@haf
Copy link
Contributor Author

haf commented Nov 22, 2012

Sure, I'll give it a shot, but it's very unlikely to, because they've changed the reflection APIs completely.

@tutok
Copy link

tutok commented Mar 10, 2013

Is any progress with this? can I help somehow?

@haf
Copy link
Contributor Author

haf commented Mar 11, 2013

For me, this meant that I switched testing framework for Win8 apps.

@ScottBelchak
Copy link

haf: You switched to use the Visual Studio testing framework?

@AnthonyMastrean
Copy link

@agross the metro projects don't even show up unless you're on Win 8. I have a Win 8 machine lying around, I'll try to convert it soon.

@agross
Copy link
Member

agross commented Aug 10, 2013

Thanks!

@AnthonyMastrean
Copy link

I assume we're talking about converting Machine.Specifications.dll to a "Portable Library". First big error I had was with [Serializable]. It's not in the list of supported assemblies (I chose Windows Store and .NET Framework 4.0 as my portable subset).

The difficulty of replacing it with [DataContract] appears to be related to how much backwards compatibility you need or how many other targets you're supporting.

@agross
Copy link
Member

agross commented Aug 13, 2013

We need serializability mostly for cross-AppDomain communication reasons. I am okay with an #ifdef solution if that works. I don't know if DataContract works across AppDomain boundaries.

@ivanz
Copy link
Contributor

ivanz commented Jul 30, 2016

I am going to close this issue:

  • When my .NET Standard pull requests lands - UWP will be supported by "Machine.Specification"
    • I've created a "Controller" which uses the same XML protocol used by the current AppDomain remoting stuff (wich is also not something supported on .NET Core or .Net Standard), but over Action for the listener and reflection over a simple interface (it's what xunit and nunit do as well). I have also added test discovery to the interface.
    • I have also eliminated the Assembly.Load(path) which are not available on the above platforms.
  • What would be left is to add support to "dotnet-test-mspec" to run tests in the UWP runtime (currently it can do .NET and .NET Core): Support for running test on UWP runtime #302

@ivanz ivanz closed this as completed Jul 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants