Update 6/21 - there is a fix for this known issue see KB2468871 look for issue #9
I have found that when you set your app to use .NET Framework Platform Update 1 Visual Studio adds something to your configuration file. It is trying to do the right thing and here is what you get.
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0.1,Profile=Client"/>
Great, but then when I try to run the app on my machine which has .NET Framework Platform Update 1 installed I get this
You may also see this exception
The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, '<compilation targetFramework="4.0">').
Fix It The Easy Way
Just delete the targetFramework attribute (it will then default to 4.0) or change it back to 4.0
I’ve heard from more than one of you that you are also experiencing this issue. There are a couple of connect bugs tracking this issue as well
- Click-Once + .NET Framework 4 Platform Update 1
- .NET 4 Platform Update 1 not working on Win 2008 R2 x64
The Hard Way
If you really want to fix it, here is how you can do it.
Create a .reg file with the following, merge with the registry and you are good to go
WARNING: This works on my machine – your results may vary