1

So, it seems to be a lot of niceties coming with WebMatrix.

E.g. the Json-helper and the simplified database api in WebMatrix.Data.

Is it possible to use these things in a regular application?

Vegar
  • 12,828
  • 16
  • 85
  • 151

2 Answers2

3

Some will work, some won't. The Json Helper should work just fine. I think the Database Helper should work just fine too. That said, all are untested since we're the ASP.NET team and just focused on the web. Would love to hear if they work in other projects for you.

Erik Porter
  • 2,286
  • 1
  • 14
  • 8
  • As soon as I try to call Json.Decode(), I get the following exception: `The type initializer for 'System.Web.Helpers.Json' threw an exception.` with inner exception `Attempt by method 'System.Web.Helpers.Json..cctor()' to access method 'System.Web.Helpers.Json.CreateSerializer()' failed.` – Vegar May 09 '11 at 20:35
  • [Same case](http://stackoverflow.com/questions/5096096/c-json-decoding-using-web-matrix-helpers) – Vegar May 09 '11 at 20:38
  • 10
    "all are untested since we're the ASP.NET team" - it's quite a slogan you got there ;-) – Vegar May 12 '11 at 21:13
  • I think what @Erik means is that he can't be certain that these "things" (as the OP called them) will work in anything EXCEPT the web, specifically WebMatrix, because he is on the ASP.NET team and they ONLY test the code in the context of the WEB... or at least I *hope* that's what he means. – samandmoore Jul 13 '11 at 22:27
  • Well, the question asker DID mention this is a DESKTOP app. – Rick Rat Jul 13 '11 at 23:07
  • Yes, that's what I meant. While it may work outside of ASP.NET, we only test it and confirm it will work in ASP.NET. Use at your own risk, otherwise. – Erik Porter Jul 14 '11 at 22:12
0

It seems that you are referring to the helpers that are a part of ASP.NET Web Pages... (http://www.asp.net/web-pages)

A lot of these helpers come in the form of NuGet packages, and NuGet packages can in fact be used in any .NET application. Please see http://nuget.org/ for more information.

simtan
  • 364
  • 1
  • 3