开发者

How to require .NET 3.5 framework?

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开发者_C百科, preferably in a declarative manner?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜