Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Using InPlaceHostingManager to automate ClickOnce installations
 

Using InPlaceHostingManager to automate ClickOnce installations

I am automating the installation of a series of ClickOnce Apps using the standard InHouseHosting Manager steps.
GetmanifestAsync, when GetmanifestCompleted, then AssertApplicationRequirements and then DownloadApplicationAsync.

This works great in some environments. I have random installations that are receiving a Method not found error for AssertApplicationRequirements. These users have .net framework 1.1, 2.0 SP1, 3.0 SP1and 3.5 installed.

My app is written in VB .net using VS2005.
In addition when I converted the app to VS2008 thinking this may be a .net framwork 2.0 issue, all was OK. Then I updated the app and even though System.Deployment is still referenced, VS2008 is not recognizingInPlaceHostingManager.

I am automating the ClickOnce installations because our users will install 7 ClickOnce apps and I am minimizing user interaction during the installation.

Can you provide some guidance?


  • Moved byYiChun ChenMSFTWednesday, September 23, 2009 7:32 AMDeployment issue (From:.NET Framework Setup)
  •  
JDar  Monday, September 21, 2009 9:26 PM

Here's our resolution... Even though each of the random users had all the right .net Framework versions installed, they were NOT current on their windows updates.  We orginally instructed each to get the cricial windows updates, but since some of the updates had dependancies they did not apply all.  Once all the critical windows updates were applied (which included a couple for .net framework) the custom ClickOnce process ran like a champ! 

  • Marked As Answer byJDar Monday, October 05, 2009 7:52 PM
  •  
JDar  Monday, October 05, 2009 7:51 PM
Hi JDar,

I am moving this thread from Base ".NET Framework Setup" forum to the "ClickOnce and Setup & Deployment Projects" forum, since the issue is related to deployment. There are moredeployment experts in the ClickOnce and Setup & Deployment Projects" forum.

Thanks
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
YiChun Chen  Wednesday, September 23, 2009 7:31 AM

Hi JDar,

You said: I have random installations that are receiving a Method not found error for AssertApplicationRequirements.
From my experience, this issue is caused by the relative .net framework library cannot be loaded. InPlaceHostingManager is a new class in .Net 2.0 and can also be referenced in the 3.0 or 3.5. But it cannot be found in .Net framework 1.0 or 1.1. So we need to follow the thread below to check the .Net framework version when we run the program:
http://social.msdn.microsoft.com/Forums/en-US/netfxsetup/thread/1e960ca7-9322-45b6-836f-baaff4f86316.

You also said: Then I updated the app and even though System.Deployment is still referenced, VS2008 is not recognizingInPlaceHostingManager.
I create a project with .Net framework 3.5 and reference the System.Deployment library. The InPlaceHostingManager class can be found successfully. You need to check the version of the Target Framework of the project and the version of the System.Deployment library. They need to be consistent.

The documents below shows the details about InPlaceHostingManager:
.Net 3.5:
http://msdn.microsoft.com/en-us/library/system.deployment.application.inplacehostingmanager.aspx
.Net 2.0: http://msdn.microsoft.com/en-us/library/system.deployment.application.inplacehostingmanager(VS.80).aspx

Let me know if this helps or not.
Aland Li


Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Thursday, September 24, 2009 3:22 AM
Each of the PCs receiving the error have .net framework 1.1, 1.1hotfix, 2.0, 3.0 and 3.5 installed.
My original app is compiled in VS2005 with the target framework 2.0 and the system.deployment.dll from the 2.0 libraries.
I recompiled the app in VS2008 and changed the target framework to 3.5. No impact.
The confusion is the inconsistency, out out of 100 installations I have 5 that fail.
JDar  Thursday, September 24, 2009 8:33 PM

Here's our resolution... Even though each of the random users had all the right .net Framework versions installed, they were NOT current on their windows updates.  We orginally instructed each to get the cricial windows updates, but since some of the updates had dependancies they did not apply all.  Once all the critical windows updates were applied (which included a couple for .net framework) the custom ClickOnce process ran like a champ! 

  • Marked As Answer byJDar Monday, October 05, 2009 7:52 PM
  •  
JDar  Monday, October 05, 2009 7:51 PM

You can use google to search for other answers

Custom Search

More Threads

• Can't install my application
• Conditionally deploy SQL Server Express
• ClickOnce loads old version from server
• How To Determine if we are in 'Repair' mode?
• ClickOnce: Error "Application cannot be started. Contact the application vendor"
• Several Start Menu shortcuts to different versions of a same application
• MSI question and help with code
• Click once deployment
• Can a custom action restart the install
• How to redistribute clickonce applications