Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > What's A Reliable Dependency Check for .NET Framework 3.5 SP1?
 

What's A Reliable Dependency Check for .NET Framework 3.5 SP1?

We use Mage.exe to create our application manifest and then tweak it to add supportUrls. We currently do NOT use a bootstrapper setup.exe. One default <dependency> section in the application manifest is:

<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="2.0.50727.0" />
</dependentAssembly>
</dependency>

but does this enforce JUST 3.5 SP1? Isn't this CommonLanguageRuntime version also for .NET Framework 2.x?

When I changed the version to "3.5.30729.1" we got the "Update Required" dialog for this version on several
machines even though 3.5 SP1 was loaded.

I tried looking at a Visual Studio 2008 manifest generated file from a project that requires 3.5 SP1 and it looks
like it adds a <dependency> for System.Core = version 3.5.0.0 (which doesn't seem very 3.5 SP1 reliable either).

Is the only reliable check through use of a bootstrapper?
Scott Jeslis  Thursday, September 17, 2009 10:28 PM

Hi Scott Jeslis,

> I tried looking at a Visual Studio 2008 manifest generated file from a project that requires 3.5 SP1 and it looks like it adds a <dependency> for System.Core = version 3.5.0.0

My research also indicates the manifest only contains the following prerequisites declaration.

<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">

<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="2.0.50727.0" />

</dependentAssembly>

</dependency>

<dependency>

<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">

<assemblyIdentity name="System.Core" version="3.5.0.0" publicKeyToken="b77a5c561934e089" language="neutral" processorArchitecture="msil" />

</dependentAssembly>

</dependency>

<dependency>

<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">

<assemblyIdentity name="WindowsBase" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" language="neutral" processorArchitecture="msil" />

</dependentAssembly>

It doesn’t contain the sp1 information. The prerequisite information shows the assembly needs .NET Framework 2.0 and 3.5 to run the app. If your common language runtime version is lower than 2.0.50727.0, it will require you to update.

Is there any reason why you don’t want to generate bootstrapper (setup.exe)?

To set prerequisites with your application, you ought to use bootstrapper. Bootstrapper(setup.exe) is coded with unmanaged C++ code. It can be run on a computer without any .NET Framework. It will do the check and install required version of framework.

Here is a document talking about manually deploy ClickOnce app.

http://msdn.microsoft.com/en-us/library/xc3tc5xx.aspx

ClickOnce applications deployed from Visual Studio can include a prerequisite installation bootstrapper (setup.exe) with your deployment. This walkthrough creates the two manifests required for a ClickOnce deployment. You can create a prerequisite bootstrapper by using the GenerateBootstrapper Task.

In the GenerateBootstrapper task document, you can find example code to require .NET Framework 2.0.

Sincerely,

Kira Qian

Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com
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!
Kira Qian  Monday, September 21, 2009 6:34 AM

You can use google to search for other answers

Custom Search

More Threads

• MSI Issue - ReInstall app for every login User
• Sign the Bootstrapper
• Deploy application made in Visual Basic Express
• Custom bootstrap application
• Creating a setup Project with custom SQL script and dll
• Application installs twice
• Resource Files
• .msi Can't remove old version of same Setup.
• Don´t Build Aplications" Could not find file 'bin\Debug'._
• can clients access remote database (SQL)....?