问题描述
你好
使用exe输出(不确定网络)构建任何项目时,以4.0以上版本的框架(例如3.5)为目标,定义ConfigEncryptionProvider可以使用vs 2010对app.config文件进行加密,则会添加一些配置标签到 输出配置文件,而3.5框架无法识别它们,因此,配置例外会在运行时抛出.
作为新配置标签的示例:
< uri configProtectionProvider = '" XXXXXX " > < ; EncryptedData > YYYYYYYYYY
</ EncryptedData >
</ uri >
And:
< 路由 />
< 跟踪 />
.
.
.
我不确定在没有定义ConfigEncryptionProvider的情况下是否将标签添加到配置中,因为我没有对其进行测试.
将目标框架切换到4.0将解决此问题.但是有什么解决方法可以停止添加这些标签并生成与vs.net 2008一样的配置文件吗?
谢谢
Hello,
When building any project with exe output (not sure about the web) targeting a framework older than 4.0 (3.5 as an example) with ConfigEncryptionProvider defined to encrypt the app.config file using vs 2010, some configuration tags are added to the output config file where they are not recognized by 3.5 framework, hence to that, configuration exception(s) will be thrown at run-time.
As an example of new configuration tag:
<uriconfigProtectionProvider="XXXXXX"><EncryptedData>YYYYYYYYYY</EncryptedData>
</uri>
And:
<routing />
<tracking />
.
.
.
I'm not sure if tags are added to the configuration when there is no ConfigEncryptionProvider defined as i didnt test it.
Switching the target framework to 4.0 will solve the problem. but is there any workaround to stop adding those tags and generate the config file same way vs.net 2008 does?
Thanks
这篇关于VS 2010中的ConfigEncryptionProvider和3.5目标框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!