今天再用VS2010来做ActiveX控件,第一次生成成功了,生来我改了点东西,一直报错,如图:

VS2010 做ActinveX 生成出错Unable to copy file .dll to .dll. The process cannot access图解 

 首先来说一下2010怎么做ActiveX控件,其实很简单的。只有几个步骤。

首先创建一个windows控件库

然后改一下AssemblyInfo.cs 文件,如图:

VS2010 做ActinveX 生成出错Unable to copy file .dll to .dll. The process cannot access图解 

第二步再你的控件usercotrol.cs文件中加入Guid,注这个Guid和上面的是一样的。如图:

 VS2010 做ActinveX 生成出错Unable to copy file .dll to .dll. The process cannot access图解

 下面我们来说一下如何解决这个出错的问题。

其实也很简单的只不过网上很少有正确的答案,本人也是好不容易才找的,所以来分享一下,其实只要在web.config里加入

<hostingEnvironment shadowCopyBinAssemblies="false"/>

就可以了。如图:

 VS2010 做ActinveX 生成出错Unable to copy file .dll to .dll. The process cannot access图解

加入完已后可能第一次生成还会出错,不过没关系,你再生成一次就不会出错了。

就这样就大功生成了。

 

相关文章:

  • 2021-07-21
  • 2021-10-22
  • 2022-12-23
  • 2021-08-19
  • 2021-08-25
  • 2022-12-23
  • 2021-06-28
猜你喜欢
  • 2021-11-29
  • 2021-10-22
  • 2021-04-12
  • 2021-08-18
  • 2021-07-04
  • 2021-08-11
  • 2021-11-04
相关资源
相似解决方案