Does a Silverlight 4 out of browser a开发者_运维知识库pplication have access to the .NET Framework?
In a word: No. There is an exception. When the application is installed as having Elevated Trust then COM Visible and creatable portions of the .NET Framework may be accessed.
Yes ... and so do in-browser applications! Silverlight out-of-browser applications do not have any significant extra frameworks available to them. Silverlight uses a subset of the .NET framework. If you are interested in whether a specific framework feature is available, update your question.
No. Long answer: There are at least two completely different branches of the .NET Framework. The desktop/server ones which are the ones you want access to and the Silverlight ones which include the Windows Phone and XNA branches.
It is possible to write libraries that work with both branches of frameworks in binary form, but they cannot use any API save very fundamental stuff. Especially UI and IO is off limits. So in practice, you have two worlds that are incompatible on a binary level. This is very sad, but that's how it is and it can't changed without breaking backward compatibility.
So as others said, even with elevated privileges, you need to write a separate software in the main .NET framework and communicate with it over COM or Silverlight's host environment.
精彩评论