Forum Discussion

ANW's avatar
ANW
Contributor
14 years ago

Launching ClickOnce apps as Tested Apps??

I wrote this question in another thread, but that thread was really about how to run it outside of TestedApps. So I thought it would be better to make a new thread.





I am trying to setup automated tests for some ClickOnce apps, and since I only really have access to the "shortcut" file, I need a way to launch the application via TestedApps somehow.



In this thread there was a suggestion as to how to do it .... but I have not gotten that to work.



I get the below error when trying to use this suggestion:



Additionally, you can use the following way to add a ClickOnce application to the Tested Apps project item: 

 - Add rundll32.exe to the TestedApps project item. 

 - Insert the below string into the 'Command line parameters' field of the newly created item: 

 dfshim.dll,ShOpenVerbShortcut "<path to application>"



, and linking it to my .appref-ms file. I have even tried to link it to the Application file located somewhere in my AppData directory, but that also failed. I am guessing that is the file I need to link to? ... problem for me is that I get an update evey morning, which means I get a new .exe file, in a new folder all the time. Is there a way around this??



Now I am unsure as to what exactly is meant with "<path to application>".



is that the path to my VictorTEST.appref-ms file?? .. or the actual exe file?



This is what my current command line looks like:



dfshim.dll,ShOpenVerbShortcut "d:\Toolbars\MVNO\VictorTest.appref-ms"



Error on execution:



PLATFORM VERSION INFO 

Windows : 6.1.7600.0 (Win32NT) 

Common Language Runtime : 4.0.30319.1 

System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100) 

clr.dll : 4.0.30319.1 (RTMRel.030319-0100) 

dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100) 





ERROR SUMMARY 

Below is a summary of the errors, details of these errors are listed later in the log. 

* Activation of "d:\Toolbars\MVNO\VictorTest.appref-ms" resulted in exception. Following failure messages were detected: 

+ Invalid URI: The URI scheme is not valid. 





COMPONENT STORE TRANSACTION FAILURE SUMMARY 

No transaction error was detected. 





WARNINGS 

There were no warnings during this operation. 





OPERATION PROGRESS STATUS 

No phase information is available. 





ERROR DETAILS 

Following errors were detected during this operation. 

* [19-01-2011 15:59:51] System.UriFormatException 

- Invalid URI: The URI scheme is not valid. 

- Source: System 

- Stack trace: 

at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) 

at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state) 





COMPONENT STORE TRANSACTION DETAILS 

No transaction information is available.