I try to make an application that is build with .net framework version 3.5 on a machine with version 4.0 installed. To make this work you have to add
<startup>
<supportedRunt开发者_JAVA技巧ime version="v4.0" />
<supportedRuntime version="v2.0.50727"/>
</startup>
to the App.config file. But where is it? I cannot find any *.config file in my Visual Studio 2010 project folder?
Thanks, Martin
ah I'm sorry - I'm using C++/CLI. There are Debug and Release subdirectories and I've added useLegacyV2RuntimeActivationPolicy="true". Also, I had to add "copy app.config “$(TargetPath).config”" to post build events and finally I get a test.exe.config file :) But still the programm doesn't run on a Windows XP SP3 with the net framework 4 and the Visual C++ 2010 Redistributable...
You have to create it yourself. Project + Add New Item, pick the "Application Configuration File" template. Edit it.
You'll find it back in the bin\Debug folder after building. Twice, something.exe.config
that you deploy and something.vshost.exe.config
that's used while debugging with the Visual Studio Hosting process option enabled. Well, deploy the bin\Release folder content.
精彩评论