积极答复者
VSTO自带的appconfig在哪里?

问题
-
我现在使用VSTO开发10版本的visio,版本是.net4.0,我需要引用一个.net3.5的dll,但是出现以下问题:
混合模式程序集是针对“v2.0.50727”版的运行时生成的,在没有配置其他信息的情况下,无法在 4.0 运行时中加载该程序集。
我刚刚看完微软技术团队提供的帖子明白了原因,相应提供的解决方法是设置app.config,但是我给自己的vsto新增一个config文件设置后无效,这该怎么解决呢?(我猜测我的vsto程序启动时并没有加载我自己添加的config文件)
答案
-
这个里面提到了,要用代码加载配置
1, To load your config:
When Excel starts a startup method in your add-in will be call it named "ThisAddIn_Startup", in this method you'll be able to write code to load configuration as in anyother C# program.专注于.NET MIS开发框架,C/S架构,SQL Server + ORM(LLBL Gen Pro) + Infragistics WinForms
- 已建议为答案 Jack Zhai-MSFTMicrosoft contingent staff, Moderator 2016年5月11日 10:52
- 已标记为答案 Jack Zhai-MSFTMicrosoft contingent staff, Moderator 2016年5月23日 9:03
-
- 已建议为答案 Jack Zhai-MSFTMicrosoft contingent staff, Moderator 2016年5月11日 10:52
- 已标记为答案 Jack Zhai-MSFTMicrosoft contingent staff, Moderator 2016年5月23日 9:03
全部回复
-
- 已建议为答案 Jack Zhai-MSFTMicrosoft contingent staff, Moderator 2016年5月11日 10:52
- 已标记为答案 Jack Zhai-MSFTMicrosoft contingent staff, Moderator 2016年5月23日 9:03
-
这个里面提到了,要用代码加载配置
1, To load your config:
When Excel starts a startup method in your add-in will be call it named "ThisAddIn_Startup", in this method you'll be able to write code to load configuration as in anyother C# program.专注于.NET MIS开发框架,C/S架构,SQL Server + ORM(LLBL Gen Pro) + Infragistics WinForms
- 已建议为答案 Jack Zhai-MSFTMicrosoft contingent staff, Moderator 2016年5月11日 10:52
- 已标记为答案 Jack Zhai-MSFTMicrosoft contingent staff, Moderator 2016年5月23日 9:03
-
因为这个论坛主要讨论VS安装和使用的问题,从你的描述来看,主要问题应该和VSTO有关,据我所知VSTO应该没有中文论坛,如果方便的话,个人建议你到VSTO英文论坛问一下这个问题:
https://social.msdn.microsoft.com/Forums/zh-CN/home?forum=vsto&filter=alllanguages
那边你应该会得到更专业的技术支持。当然,如果你遇到VS安装和使用的问题,欢迎你来VS相关讨论论坛。
谢谢!
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.