开发者

Type 'Microsoft.VisualBasic.CompilerServices.DesignerGenerated' is not defined

When ever I start a blank WPF project in Visual Basic 2010 (SP1) I get the following error:

Type 'Microsoft.VisualBasic.CompilerServices.DesignerGenerated' is not defined.

The error comes from the auto-generated code in MainWindow.g.i.vb - when I try to add a reference to Microsoft开发者_如何学C.VisualBasic, it says I can't because it will be added at runtime.

I search of the MSDN forums found nothing, a workaround on MS Connect was to install SP1 (which I have done).

Anyone else have this prob or know how to fix it?


I have got the same Problem and fix it with this: (I have the German-Version of VS, so i do not know the correct description of the buttons.) Advanced Compile->Change your framework and say OK. After this change is back. Then go to clean your project(find under build) and rebuild it new.

If VS when it breaks down later, you have the problem-again. The Downloads have only change my memory-space.


I had this problem and found it was due to adding a namespace of Microsoft.MapPoint (in fact any namespace starting "Microsoft" caused it). This was a class from a Microsoft article: http://msdn.microsoft.com/en-us/library/bb259689.aspx

Renaming the namespace to something without Microsoft in it fixed the problem.


Try to install the file from Microsoft VBWP7SetupENU.msi

See the instructions and the required files in: http://msdn.microsoft.com/en-us/library/ff402530(v=vs.92).aspx#BKMK_Installing

Good luck

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜