Reputation: 61646
My client-side app is built using .NET 3.5, in fact, I want to require that the user has it installed. Before I even start the app, I want to make sure that the framework is present on the box.
I tried to use the
<requiredRuntime version="v3.5..."/>
but it seems that the underlying code can't really tell between .net 2 and .net 3.5 (which, i know, it's the same thing).
So how do I check for presence of the .NET 3.5 framework, preferably in a declarative manner?
Upvotes: 2
Views: 268
Reputation: 1039438
If you are deploying your application through an MSI generated with a Setup and Deployment project you could enforce a .NET Framework Launch Condition. If it is a simple copy of the executable you could probably probe for the presence of System.Core
assembly with reflection as this assembly is specific to .NET 3.5 but if the user has no CLR 2.0 installed this will fail.
Upvotes: 3