Visual Studio C中的Resx错误#

时间:2015-09-24 10:34:49

标签: c# visual-studio

我不知道为什么我收到了resx错误。它以前运行得很完美,然后在试图打开表单设计器或运行项目时,蓝色的visual studio抛出了这个错误:

Severity    Code    Description Project File    Line
Error   CS0234  The type or namespace name 'Resources' does not exist in the namespace 'AudioPlayer.Properties' (are you missing an assembly reference?)    AudioPlayer C:\Users\Vincas\documents\visual studio 2015\Projects\AudioPlayer\AudioPlayer\Forms\FormMain.Designer.cs    94
Error   CS0234  The type or namespace name 'Resources' does not exist in the namespace 'AudioPlayer.Properties' (are you missing an assembly reference?)    AudioPlayer C:\Users\Vincas\documents\visual studio 2015\Projects\AudioPlayer\AudioPlayer\Forms\FormMain.Designer.cs    192
Error   CS0234  The type or namespace name 'Resources' does not exist in the namespace 'AudioPlayer.Properties' (are you missing an assembly reference?)    AudioPlayer C:\Users\Vincas\documents\visual studio 2015\Projects\AudioPlayer\AudioPlayer\Forms\FormMain.Designer.cs    239
Error   CS0234  The type or namespace name 'Resources' does not exist in the namespace 'AudioPlayer.Properties' (are you missing an assembly reference?)    AudioPlayer C:\Users\Vincas\documents\visual studio 2015\Projects\AudioPlayer\AudioPlayer\Forms\FormMain.Designer.cs    250
Error       Invalid Resx file. Cannot find a name for the resource with the value '17, 17'. Line 122, position 5.   AudioPlayer C:\Users\Vincas\documents\visual studio 2015\Projects\AudioPlayer\AudioPlayer\Forms\FormMain.resx   122
Error       Invalid Resx file. Value cannot be null.
Parameter name: assemblyName Line 120, position 4.  AudioPlayer C:\Users\Vincas\documents\visual studio 2015\Projects\AudioPlayer\AudioPlayer\Properties\Resources.resx 120
Message     ResX input is not valid. Cannot find valid "resheader" tags for the ResX reader and writer type names.          0
Message     ResX file Cannot find a name for the resource with the value '17, 17'. Line 122, position 5. cannot be parsed.          122
Message     ResX file Cannot find a name for the resource with the value '17, 17'. Line 122, position 5. cannot be parsed.          122

Resources.resx(没有复制模式描述):

<resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <assembly alias="System.Windows.Forms" Title="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  <data Title="sound" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\sound.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data Title="play" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\play.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data Title="muted" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\muted.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data Title="previous" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\previous.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data Title="next" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\next.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data Title="pause" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\pause.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data Title="settings" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\settings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data Title="search" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\search.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>

FormMain.resx(没有架构):

<resheader Title="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader Title="version">
    <value>2.0</value>
  </resheader>
  <resheader Title="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader Title="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <metadata Title="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>17, 17</value>
  </metadata>
  <assembly alias="System.Drawing" Title="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  <data Title="buttonOpen.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
        YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAOGSURBVHhe7ZpLiBRXFIbHJyEoClmIaBCNqBvjwogiKCGg
        CEEwqyyiIqgY3GQjiILEx84ghIAKwUVQFHSRbCKoiKhBEcGF4gtBXCRR4wN8RGPw+f0NM8z8faqnp6t7
        5jbeD75N161bp6qrTt17bnVkMplMJpPJvM8Mw2V4Bq+32Cu4BydgMmzFt/3sJfwAk+ACRkG22lWYBHcx
        CrDVXsVBOODo2Y8C7A8344oGnYdNuYB70QPbh5832cvoxymr7qIRWAr9C96xLkCz0TPvx2mGW7AUegV6
        p2ex2Sjr30c/VlnPYynmonf6D7aClejHKusjLMUYjDou/WwV8DUewCMNGsWqcyjFU/ROZ2CK3EOPVW+E
        UlxE7/QrTJE/0GMtPaj6Fb3TdVgveh9Pxmn94G/osf6MUdsiP8Ye/IDe6W6shyV4G33/1NXEbCpW+Ba9
        wTHsjXH4BH3fdvEkVliAvvEm9sZG9P3ayQdYYRL6xpc4FGtxDX2/drLrDtCJ6oS9wSdYxCz09lIDk9SM
        XvNyNXahW94bLMQifkJvfwNTJJqHvMDR2IWSnjdScoxQGS0akGzCFDmNHush7IFee95Ir8eIxeht3+BE
        TA3FpNg8Xp1DDzTw8UYaIEXo6nlbXeUU0V3pserurUrwGvp6Qw2RHT03en68bTI1PkN5yWNV/qriU/SG
        yp6OMqe3+w9HYWrMQY9VfoZVaPobNfapZpRQDmKK7EKPVWW0QqIKsQomnRQllC8xNYbjQ/RYN2AhUYV4
        KXYSJRRVj3obMQ4EUU7Tn1c1E+xOVCH+HjuJEsqPmCLRtPkE1kQn6zvpooiihDITU+Mj/B89Vq0n1CSq
        EOuxEDvRt2lOnSJr0WN9hiOxJlGFWIlRCUVTR9+2HlPkHHqs+7FXiirESoT+22scj6kxBT1WuQjrIpo6
        am3ffzuOKbINPdY7OATrIqoQRy7H1FBx9hZ6rDuwbqIKsfsvtmrhpAzzMYq3T2scUYXYbcXiaTPQ5zce
        azShq0lUIXZVRE0NLb4+Ro+1L+sbFaIKcXf/xsGYGlpz9Fhf4VjsE1GFuLvbMUUOo8d6FPtMUYW40+mY
        Ghq/RDF/gw0RVYjlXxh9/jLQRolb45kPsSGiCnG7+Qs2TFQhbje/wIb5DqNO28U/sdSbSqu+zzHqvB3U
        t0ilmY2/oxZA/aPnVD2FazCTyWQymUwmU5uOjnf4eJQsIJLu8wAAAABJRU5ErkJggg==
</value>
  </data>
  <metadata Title="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>141, 17</value>
  </metadata>
  <metadata Title="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>75</value>
  </metadata>

同样在FormMain.Designer.cs我收到如下行中的错误:this.buttonSearch.Image = global::AudioPlayer.Properties.Resources.search;

我在项目中期安装了ReSharper,但它当时没有崩溃。

0 个答案:

没有答案