开发者

Visual studio 2010 locking issue when developing user controls

I researched quite a lot on this but finally seemed to pin d开发者_如何学Pythonown on this issue. Visual Studio some times randomly locks the build dll/exe file if you have custom controls in your project. Steps to replicate:

  1. Create a winforms app/dll project
  2. Add a new class, say CustomButton that inherits from Button
  3. Build
  4. Create a form. Look in the toolbox, and the custombutton appears allowing you drag it on your form
  5. [This now becomes random] the next build of your project will either proceed or fail requiring you to restart visual studio.

Any ideas?


Seems to have found a [temporary] solution. It seems M$ "fixed" this in later versions, but it still does not work. Anyways, here is solution: remove automatic version incrementing in the assembly version attribute. This seems to resolve the issue however it's somewhat inconvenient.

https://connect.microsoft.com/VisualStudio/feedback/details/533411

Temporary workaround would be disable assembly version update after the rebuild. In AssemblyInfo.cs file, remove the wild card from the AssemblyVersion attribute, for example: replace this: [assembly: AssemblyVersion("1.4.*")] [assembly: AssemblyFileVersion("1.4")] with this: [assembly: AssemblyVersion("1.4.0.0")] [assembly: AssemblyFileVersion("1.4.0.0")]

UPD Again :( The above did not solve the problem. I am still going to leave it in case somebody else encounters something like this, but the question remains open.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜