I'm trying to create a Portable Class Library. It will support .Net 4.51 & Windows Store apps.
For some reason the option to Generate Task-Based Operations is disabled. Yet both .Net 4.51 & WIndows Store apps support this.
There is a connect issue open as will not resolve and the work around doesn't work or isn't something we would want if it did.
Questions
1) Is there a svcutil for Windows Store Apps? (Add Service Reference from a Windows STore app and trying to shoehorn it into a PCL isn't what we're looking for.)
2) Is there a way to prevent svcutil from implementing IExtensibleDataObject?
Thanks
Related
Can VS2012 build a proxy in a PCL project to consume a WCF service for SP2010? We add a reference (old school works everywhere else) but once we make calls, for instance GetListsCollectionAsync(), we get all sorts of errors. When we build the proxy, VS gives a warning:
Service proxy generation failed. Proxy requires type 'System.Xml.Linq.XElement' which is not supported in portable libraries
Has anyone successfully subscribed to a SharePoint WCF using a portable class library? The same stuff works fine in .net 4.5 class libraries and in metro libraries. Only portable ones give us this problem. We have win 7 and win 8 devices in the mix - so PCL would be a really good fit.
Got a conclusion here: We found a work around and the statement that this is a bug in VS2012 PCL projects still stands.
We created our proxy in a metro project and simply copied the reference.cs file over into the PCL project. It was a "what the heck - why not" last attempt of sorts, but it actually works. Even better, the calls are awaitable and come with response objects. Awesome!
Cheers,
Gregor
We're looking to read some QR codes in a Windows 8 Metro app. .NET libraries we've used in the past can't be referenced in WinRT/Metro and porting them won't be easy because they depend on System.Drawing which isn't in the .NET for Metro style apps. We looked at this by Benjamin Soulier but it didn't seem to work. Any other suggestions or something easy we're missing?
Thanks
You can use ZXing.Net:
http://zxingnet.codeplex.com/
For Metro apps based upon HTML5/Javascript I'm currently working on a port of zxing.net for Windows Runtime Components WinMD. You can get the source from here
https://zxingnet.svn.codeplex.com/svn/branches/WINMD
(btw. I'm the creator of ZXing.Net (a port of the java based ZXing))
Based on feedback from MS resources, there is nothing built in and no frameworks they were aware of yet.
Quick way to try is by using Esponce web service. Make a simple HTTP POST request to http://www.esponce.com/api/v3/decode?format=png and send image data in body. Response should contain something like that:
{"content":"here goes content decoded from QR Code"}
Web services are platform-independent (easy to port) and lightweight on client side.
More details in Esponce API documentation
It is my understanding that JumpList implementation using Windows API Code Pack is now depreciated as Microsoft now supports JumpList directly through Microsoft .NET Framework 4.0.
http://msdn.microsoft.com/en-us/library/system.windows.shell.taskbariteminfo.aspx
I can see that it is possible to set progress etc. to the Taskbar Item in their examples; however I have struggled so much to implement this on a Windows Form.
I had successfully managed to implement JumpList and TaskBarItem progress using Windows API Pack in the past http://code.google.com/p/zscreen/source/browse/trunk/ZScreen/Forms/ZScreenConfigGUI.cs#277 but I want to move away from this dependency and utilise the Microsoft .NET Framework 4.0 instead.
Your advice is much appreciated.
Thanks
Mike
System.Windows.Application is in the presentation framework(PresentationFramework.dll) i.e. WPF. It does not exist in Winforms. So use Windows API Code Pack like here: http://code.msdn.microsoft.com/windowsdesktop/Jump-List-with-Windows-db005b99
WPF 4 provides a native support for Jump List. Instead, if we use
Windows Forms, we must adopt the Windows API Code Pack, a managed
wrapper that allows to access to the Windows API functions. Available
on NuGet too, it provides all you need to manage Jump Lists within our
Windows Forms Applications.
Another example here: http://www.codeproject.com/Articles/103913/How-to-Create-a-Custom-Jumplist-with-Custom-Events
It is my understanding that JumpList implementation using Windows API
Code Pack is now depreciated
Its not deprecated, its also a part of new .net 4 features but for WPF. For winforms, you will still have to use the pack like mentioned above.
I have a monotouch application which accesses a WCF web service. This application is built within Monodevelop.
I have recently released a new version of this webservice. I.e. from http://localhost/v1/webservice.asmx to http://localhost/v2/webservice.asmx.
I need to update the url of web service in my Monotouch app and update the reference so that I can access the new methods. There does not seem to be a way to do this via monotouch. What is the simplest way to accomplish this task short of deleting and re-adding the reference?
That does not seem possible via the GUI indeed.
It seems that the URL is stored in Reference.svcmap.
You could try editing this file, then running Update Web References. I have not tried though.
I have some methods which are not compiled with Silverlight framework but are very essential for execution of SL workflow(by workflow, I mean to process my application completely). What is the best/quickest way to do so?
I was thinking of publishing a web-service(for non-sl compiled methods) and make SL call into my WS.. but I am unable to see/create webservice instance even after registering one in my SL project. (I am using VS 2010)
any help?
Esentially, you have three ways to run code.
native built-in methods in your application--this would be the easiest way
methods that live in an external silverlight assembly, like a class library
use a webservice
if you use a webservice, you have to either host the website yourself or use a 3rd party website, then add a reference to said service. if the service is not hosted on the same website as your silverlight app, there must be a cross-domain policy file in place otherwise silverlight will not use the service.
if you use an external assembly, it MUST be a silverlight assembly. you can not use a windows class library, etc.
There is a common (and relatively easy) way to solve this issue without requiring a web service: you can create a new Silverlight class library and then share the files from the other project through to your new Silverlight library.
To do this, right click on the library in the Solution Explorer, and select Add -> Existing Item, then navigate to the appropriate code file, select it, but instead of just clicking Add you should instead click the little down arrow and select Add As Link.
Of course when you do this you have to ensure that the shared files don't contain anything that cannot be compiled targeting the Silverlight runtime, if they do then you will either have to use conditional compilation directives to isolate out that code, or revert to the web service option.