All converted apps including samples fail to run with a 'The parameter is incorrect' - wpf

I'm trying to convert a WPF oneclick installed application and so everything should be pretty straight forward. However, whenever I run the debug project, I get
'The parameter is incorrect'
in a message box popup and I can never run the app.
This happens for my app while trying to debug, all the samples from github, and even the DAC application from the Windows Store. The error pops up even once the app is installed and showing in my application list.
I'm on the latest build of the Creators Update.
There are various errors in the event viewers, but they seem to be a common occurence for WinRT apps.
Any ideas at all?

If you have the WPF project in VS2017, I'd recommend to package directly from VS without using the DAC. see the article for more information https://learn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-packaging-dot-net

The problem appears to be related to the May Security Update. I restored Windows to the factory defaults and everything works fine.
However, once I install the the May Security Update to address this bug with Sql Server and Filestreams, the Desktop Bridge Debugging project stops working.
I'm going to throw out a random guess that it's related to the Microsoft Malicious Software Removal Tool, as the event viewer logs mentioned an issue with the 'parameter is incorrect' referring to the Microsoft.MRT.
Of course it could be anything, and as only 7500 people have even downloaded the Desktop Bridge Debugging project in the first place, I doubt it's high on the list of Microsoft Developer Priorities.
And to be completely honest, it's really probably my fault for not rewriting the app as a UWP app, after rewriting it as a Windows Forms app, and as a Silverlight app, and as a WPF app and on and on and on. Although, I'm not sure how many glasses of Kool Aid are left in the punch bowl for me.

Related

Does Thinfinity Virtual UI work with embedded browsers (Cefsharp)?

My company wants to try out the library "Thinfinity Virtual UI", to run a Windows Forms application in a browser.
It seems to more or less work, though the application crashes everytime an embedded browser is attached to the form (Cefsharp), see attached image.
I am not able to catch the error in the try/catch.
Any ideas how to remedy/debug this issue?
I tried searching the web for a solution/alternative to CefSharp, looking at error logs, inserting the try/catch. I also wrote to the company, but so far I get no reply.
This is Luke and I work at Cybele Software where we developed Thinfinity VirtualUI to help Windows developers converting their Legacy Windows Applications into modern Web Applications by just modifying one single line of code and adding our libraries.
Unfortunately, as it is, WebView and Chromium are not supported in our propietary protocol. But do not worry, we have 2 valid workarounds.
Using our HTMLDOC demo. Link to our GitHub HERE
This demo shows how to programatically create an iframe inside your application (using HTMLDOC.CreateComponent) , and how to communicate back and forward between the application and the website running inside that iframe, using Javascript Remote Objects (JSRO)
Using our 'Third Party Applications' Feature. Link on how to enable this HERE
Be aware that to enable this feature, you'll need to have our Thinfinity Broker and your app running on a Windows Server. Basically, with this option, you'll be using a Microsoft feature called 'Desktop Duplication' where we can eventually render any Third Party application with the help of Remote Desktop Services.
I hope this does the trick for you and don't hesitate on contacting us about this or any other doubt you may have about our products :)
Thank you!

Losing control while testing in Xamarin test cloud

After entering into phonebook or gmail or playing YouTube through the testing application, I am losing all the controls to test or query. As soon as it comes into play I lose control. Then I have to manually deal with it. On writing tree on Repl mode I am not able to see anything.
This is because you are leaving the application. Xamarin UITest works by running a client-side server next to or inside the mobile application. the client-side server is what enables us to interact with controls and query for things on the screen.
If you are on iOS, you have to have the Calabash agent installed in the application to make things work. Once you leave the application (switching to YouTube or other app), the client-side server is backgrounded and won't be able to do anything because of how iOS operating system is designed.
On Android, it depends on what version of Android you are using. Older Android versions don't sand box apps the same. Android 6.0 and above have more security controls and I wouldn't expect this behavior to work.
If you are trying to test if those things work, You should be testing that the Intent you are sending is correct. You are really testing the operating system at this point because you are verifying that YouTube or whatever did what you expected. Really we should have a base assumption that when we provide the phonebook with the proper intent, the operating system should behave accordingly. If you test that the video actually opens in the YouTube app, you are now testing if YouTube can open their links/intents successfully. Some people decide to test these things, many find that it is redundant and increases their teams cycle time.
I hope this helps!
Disclosure: I work at Xamarin/Microsoft

Why does Inspect.exe not display the AutomationId and other UIAutomation properties when running in debug?

I've been using Inspect.exe from the Windows SDK to examine the properties of a WinForms application but noticed that I didn't see any of the properties (for example, the AutomationId) whilst running the application from Visual Studio (F5 to run.) However, if I ran the .exe from the bin\debug folder I could see the properties fine.
The source I was using was example code downloaded from UI Automation Custom Provider Samples - Part 3.
I'm wondering why this happened since I'm sure another machine that I had tried this on worked fine and I wasted time poking around in debug mode wondering why my UI Automation properties weren't visible. Obviously there's a workaround but I'd like to understand why this was happening and have a record of the problem for other people to find!
I've struck upon the answer - because I had launched Visual Studio as Administrator but the Inspect.exe tool as standard user then the properties being reported back were a sub-set of what I should have seen. As soon as I launched Inspect.exe as Administrator it worked!

Debugging silverlight application problem

My VS2010 doesn't stop at breakpoints inside of silverlight application. It appears that no symbols for it have been loaded during debugging. When I hover over the break point it says "The braekpoint will not currently be hit, no symbols have been loaded".
I have tried all of possible solutions offered by google and have no success. The problem occurs even when I create brand new silverlight app hosted by an ASP .NET web project. All of my project configuration looks fine - silverlight debugging is enabled in the Web project.
I am using silverlight 4.
here a link to the sample project created out from the tepmlate.
Any thoughts ?
P.S I just tried to reinstall VS2010 and the problem still exists.
EDIT: I just tested the same project on another machine and it stops at the break point it seams that the problem is somewhere in the configuration of VS or silverlight.
with Matt Dotson's help I managed to attach the debugger manually. However this solution is not good enough for daily use.
Depending on my experience in Silverlight following these steps keep your project debug-gable.
Condition 1>
Firstly we need to be ensure that in Web Project's properties there is a Web section, as you see below Silverlight checkbox must be checked.
Condition 2>
Follow In Menu Debug => Attach Debugger>
Visual Studio sometimes can't attach debugging platform you need to lead the way :) . By this way you may debug other platforms,(also you may debug your product platform but pdb files must be sync and don't forget you may suspend your product platform using this).
Condition 3> Your default web browser may be Firefox,Chrome or other than IE.By Visual Studio default try to attach to IE. But when you run VS calls default browser,so you need to have a manual attachment in Condition 2 or set your default browser by right clicking on default page > Browse with .
Condition 4> There is xap file generally located in web project\ClientBin directory. Sometimes after build operations this file can't be replaced and your ProjectDll and your Project PDB files not be sync. This cause wrong line match while debugging or can't find a debugging file attached caution. I strongly suggest delete all generated files in Bus project and delete Clientbin\ProjectName.xap file. After rebuild all it must be ok!
Hope helps.
What broswer are you using? You need to be using Internet Explorer to debug silverlight projects.
I have had a similar frustrating experience with this but in my case the solution was very simple. It seems that somehow, and I really have no idea how, the debugger option for Silverlight had become unchecked in the properties on the hosting ASP.NET project.
I just assumed that as I had been previously debugging, this option was set and I didn't bother to make sure that this was this case. Just goes to show that one should always check the basics first; if I had done that it would have saved me some time.
To check this in VS2010, right-click on the project and select properties, change to the Web tab and check the Silverlight option at the bottom of the page, in the debuggers section.
Also see the debugger to a silverlight process
http://msdn.microsoft.com/en-us/library/cc838267(VS.95).aspx
If that doesn't work, then
reset iis (if you are debugging in that)
delete temporary asp.net files (%SystemRoot%\Microsoft.NET\Framework\versionNumber\Temporary ASP.NET Files)
clean and rebuild your solution
The resolution came after 2 days of headbanging. It appears that the link which Malcolm gave covers exactly my problem but my I was narrow-minded enough not to pay it enough attention because when I run the debugger as long with the app my default browser was FF. So I thought that after the FF starts I can load the page from IE or Chrome.
Actually the problem is that the debugger cannot be attached to the silverlight project because of the FF. And when I load the app from IE or Chrome the debugger dis still not attached.
Thanks to everyone that tried to help.
if you have multiple project, Rebuild the project separately that you want break point. Its work for me
Try also picking internet explorer from browser list menu as your browser

Running a WPF application on Windows XP

I recently built a new application using WPF, so that I can learn the new technology. Now that I am trying to deploy the application, it appears as if it is running fine on a Vista system, but on a Windows XP SP2 machine with the .Net fx 3.5SP1, it's not able to load the PresentationFramework.dll file.
I did some further investigation into this and discovered that there is a slight build difference between the PresentationFramework.dll files on my xp test machines vs. what is on my Vista development machine.
What I'm curious about is if anyone else has run into this issue as well, and what they did to remedy the situation so that they could develop on Windows Vista, but deploy the developed application to both Vista and XP clients.
Thanks.
I need to add to this a bit... on the vista machine and on the client machine, I've got .Net Fx 3.5 SP1. I had done a bit of digging, and found out that the PresentationFramework.dll file is the same, except the last set of versioning numbers.
Has anyone found a decent work around for this issue?
Sorry that I left this stagnant, but I figured out the issue I was running into. Turned out that there was corruption in the Windows XP box I was using as a test bed.
I was working between stackoverflow and another forum for the package I was writing the Add-in for. When I learned of the answer, this is what I posted, in case I ran into issue in the future.
I thought that I'd post this here, so
that I would have reference, and also
in case anyone else would need
reference to it for the future... I'm
working on another Dinerware Add-on
using WPF, and although it was running
fine on my development machine, every
time I'd go to run it on a test
machine (a machine ghosted like it was
in the field at a customer's
location), I kept getting weird
processing errors.
I did hours of searching online, only
to come up empty handed until I ran
across this article:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/6e5de3d8-fc02-4504-b00f-7a2192d24a48/
which gives a link to the download of
the WIC (Windows Imaging Components),
located here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=8e011506-6307-445b-b950-215def45ddd8&displaylang=en
For some reason, what is/was happening
is that the Windows Imaging components
have become corrupt against what my
application is looking for. TO fix
the issue, you have to:
1) navigate to
%windir%\$NtUninstallWIC$\spuninst\
and run the spuninst.exe file in
there. That will remove the Windows
imaging components. 2) after you have
completely removed the components, you
will then re-install them using the
second link from above.
So far, I've not run into any further
issues.
What a crazy thing that
was?!?!?!?!?!?!!
Hopefully, if someone else runs into this issue, I may be able to help them out quick by >putting this out there.
As I said on that forum... hopefully this helps someone else out that runs into this issue in the future.
I've done a bit more experimentation and built a test WPF project and used a Setup and Deployment project instead of a WiX installer. for some reason, the application is working fine when its installed with the Setup and Deployment installer, but when using WiX, it's having issues...
Beginning to think the issue has to do with WiX, and not the .Net Fx version/build
You can have this problem sometimes with templates and Blend, although I thought it had been fixed in the latest Blend. Basically when Blend "pulls in" information for making a new template, it can sometimes copy in Aero only stuff from Vista, which means the control you then create is then reliant on Vista :-(
I did think this was fixed though, although you may have been bitten by it if the project has taken a while to put together.
Make sure that .NET Version on your Vista and XP machine are same.

Resources