Question

Guaw on Thu, 18 Oct 2012 08:05:00


Hi,

I moved a program from Vs2010 to Vs2012.

The project compile but some .resx files (not all of them) cannot be opened with Vs2012.

I have the message "The operation cannot be completed. Invalid Pointer".

The same .resx from the same project loaded with Vs2010 open like it did before.

For exemple : i have a localised form MyForm.cs. The MyForm.resx won't open only with Vs2012 but MyForm.en.resx and MyForm.es.resx will open without problem both with 2010 and 2012.

I first tried to find a solution and i found that the same error was existing with 2010 with bad fonts or bad settings.

I have tried to set ALL fonts in "Tools->Options->Environment->Fonts and Colors" to "Consolas". I also tried to use "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe /resetuserdata".

As none of this works I try here.

How can I make the error go away?

Regards,



Replies

CoolDadTx on Thu, 18 Oct 2012 14:13:13


Can you post the RESX file that is causing problems?  Otherwise we can't really narrow down what is going on.

Michael Taylor - 10/18/2012
http://msmvps.com/blogs/p3net

Guaw on Thu, 18 Oct 2012 14:21:04


Yes of course here is one, in this case a usercontrol : (i need to say that i can open and edit this usercontrol with the IDE, the only thing i can't open is the .resx)

<?xml version="1.0" encoding="utf-8"?>
<root>  
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  <data name="pbImage.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
    <value>Zoom</value>
  </data>
  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  <data name="pbImage.Location" type="System.Drawing.Point, System.Drawing">
    <value>1, 0</value>
  </data>
  <data name="pbImage.Size" type="System.Drawing.Size, System.Drawing">
    <value>130, 120</value>
  </data>
  <data name="pbImage.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
    <value>StretchImage</value>
  </data>
  <assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  <data name="pbImage.TabIndex" type="System.Int32, mscorlib">
    <value>0</value>
  </data>
  <data name="&gt;&gt;pbImage.Name" xml:space="preserve">
    <value>pbImage</value>
  </data>
  <data name="&gt;&gt;pbImage.Type" xml:space="preserve">
    <value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </data>
  <data name="&gt;&gt;pbImage.Parent" xml:space="preserve">
    <value>$this</value>
  </data>
  <data name="&gt;&gt;pbImage.ZOrder" xml:space="preserve">
    <value>1</value>
  </data>
  <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>17, 17</value>
  </metadata>
  <data name="gbSeparator.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
    <value>Bottom, Left, Right</value>
  </data>
  <data name="gbSeparator.Location" type="System.Drawing.Point, System.Drawing">
    <value>0, 122</value>
  </data>
  <data name="gbSeparator.Size" type="System.Drawing.Size, System.Drawing">
    <value>680, 2</value>
  </data>
  <data name="gbSeparator.TabIndex" type="System.Int32, mscorlib">
    <value>37</value>
  </data>
  <data name="&gt;&gt;gbSeparator.Name" xml:space="preserve">
    <value>gbSeparator</value>
  </data>
  <data name="&gt;&gt;gbSeparator.Type" xml:space="preserve">
    <value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </data>
  <data name="&gt;&gt;gbSeparator.Parent" xml:space="preserve">
    <value>$this</value>
  </data>
  <data name="&gt;&gt;gbSeparator.ZOrder" xml:space="preserve">
    <value>2</value>
  </data>
  <data name="gcResult.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
    <value>Top, Bottom, Left, Right</value>
  </data>
  <data name="gcResult.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAAhwAAAB4CAYAAAC5BCsZAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAcpSURBVHhe7doBbloHEARQH903T+VIrijx94fGDMvOixS1
        dSi7+4aWEfbbL78IECBAgAABAg8WePt4/vf3d78ZeA14DXgNeA14DXgNPOw18G/heHCx8fQECBAgQIBA
        sYDCURy+0wkQIECAQEpA4UhJm0OAAAECBIoFFI7i8J1OgAABAgRSAgpHStocAgQIECBQLKBwFIfvdAIE
        CBAgkBJQOFLS5hAgQIAAgWIBhaM4fKcTIECAAIGUgMKRkjaHAAECBAgUCygcxeE7nQABAgQIpAQUjpS0
        OQQIECBAoFhA4SgO3+kECBAgQCAloHCkpM0hQIAAAQLFAgpHcfhOJ0CAAAECKQGFIyVtDgECBAgQKBZQ
        OIrDdzoBAgQIEEgJKBwpaXMIECBAgECxgMJRHL7TCRAgQIBASkDhSEmbQ4AAAQIEigUUjuLwnU6AAAEC
        BFICCkdK2hwCBAgQIFAsoHAUh+90AgQIECCQElA4UtLmECBAgACBYgGFozh8pxMgQIAAgZSAwpGSNocA
        AQIECBQLKBzF4TudAAECBAikBBSOlLQ5BAgQIECgWEDhKA7f6QQIECBAICWgcKSkzSFAgAABAsUCCkdx
        +E4nQIAAAQIpAYUjJW0OAQIECBAoFlA4isN3OgECBAgQSAkoHClpcwgQIECAQLGAwlEcvtMJECBAgEBK
        QOFISZtDgAABAgSKBRSO4vCdToAAAQIEUgIKR0raHAIECBAgUCygcBSH73QCBAgQIJASUDhS0uYQIECA
        AIFiAYWjOHynEyBAgACBlIDCkZI2hwABAgQIFAsoHMXhO50AAQIECKQEFI6UtDkECBAgQKBYQOEoDt/p
        BAgQIEAgJaBwpKTNIUCAAAECxQIKR3H4TidAgAABAikBhSMlbQ4BAgQIECgWUDiKw3c6AQIECBBICSgc
        KWlzCBAgQIBAsYDCURy+0wkQIECAQEpA4UhJm0OAAAECBIoFFI7i8J1OgAABAgRSAgpHStocAgQIECBQ
        LKBwFIfvdAIECBAgkBJQOFLS5hAgQIAAgWIBhaM4fKcTIECAAIGUgMKRkjaHAAECBAgUCygcxeE7nQAB
        AgQIpAQUjpS0OQQIECBAoFhA4SgO3+kECBAgQCAloHCkpM0hQIAAAQLFAgpHcfhOJ0CAAAECKQGFIyVt
        DgEC/1vg7e33/6r8IkDghQUUjhcOz+odAq/yZvuoPR/1vB2vHlcSmCOgcMzJwiYE/hD4fLN9hTfdV9jR
        S4wAgecJKBzPszeZwKnAUeG4fnO//OePv//8/Tng6PGXj/3qMdfPc73w5Z/fssPRbl99/WPWvV8/BfUA
        AgSeJqBwPI3eYALnAvcWju+KxeW0s+f9rtB8VWKOisdnabj86/W//1M7n2t6BAECzxRQOJ6pbzaBbwTO
        PsW4pUDc8gnH0fN89+lHokBcz78sSWe7eWERIDBPQOGYl4mNCPwWOHrDvefN/m8Kx1kMP/XJxK3Pc3TL
        2Z7+nACBGQIKx4wcbEHgPwJHP4D51bdC7v12xr2P/6rgXH/tb57z1sJx9m0gLyECBGYLKByz87FdqcBZ
        4bj8BOTozf/oh0AvH3/2bZuf/qHRyzhvKRB+aLT0PwBnrxRQOFbG6igCBAgQIDBLQOGYlYdtCBAgQIDA
        SgGFY2WsjiJAgAABArMEFI5ZediGAAECBAisFFA4VsbqKAIECBAgMEtA4ZiVh20IECBAgMBKAYVjZayO
        IkCAAAECswQUjll52IYAAQIECKwUUDhWxuooAgQIECAwS0DhmJWHbQgQIECAwEoBhWNlrI4iQIAAAQKz
        BBSOWXnYhgABAgQIrBRQOFbG6igCBAgQIDBLQOGYlYdtCBAgQIDASgGFY2WsjiJAgAABArMEFI5ZediG
        AAECBAisFFA4VsbqKAIECBAgMEtA4ZiVh20IECBAgMBKAYVjZayOIkCAAAECswQUjll52IYAAQIECKwU
        UDhWxuooAgQIECAwS0DhmJWHbQgQIECAwEoBhWNlrI4iQIAAAQKzBBSOWXnYhgABAgQIrBRQOFbG6igC
        BAgQIDBLQOGYlYdtCBAgQIDASgGFY2WsjiJAgAABArMEFI5ZediGAAECBAisFFA4VsbqKAIECBAgMEtA
        4ZiVh20IECBAgMBKAYVjZayOIkCAAAECswQUjll52IYAAQIECKwUUDhWxuooAgQIECAwS0DhmJWHbQgQ
        IECAwEoBhWNlrI4iQIAAAQKzBBSOWXnYhgABAgQIrBRQOFbG6igCBAgQIDBLQOGYlYdtCBAgQIDASgGF
        Y2WsjiJAgAABArMEFI5ZediGAAECBAisFFA4VsbqKAIECBAgMEtA4ZiVh20IECBAgMBKAYVjZayOIkCA
        AAECswQUjll52IYAAQIECKwUUDhWxuooAgQIECAwS0DhmJWHbQgQIECAwEoBhWNlrI4iQIAAAQKzBP4B
        25/UjND7bpIAAAAASUVORK5CYII=
</value>
  </data>
  <data name="gcResult.Location" type="System.Drawing.Point, System.Drawing">
    <value>137, 0</value>
  </data>
  <data name="gcResult.Size" type="System.Drawing.Size, System.Drawing">
    <value>540, 120</value>
  </data>
  <data name="gcResult.TabIndex" type="System.Int32, mscorlib">
    <value>38</value>
  </data>
  <data name="gcResult.Titre" type="System.Resources.ResXNullRef, System.Windows.Forms">
    <value />
  </data>
  <data name="gcResult.TitreAxeH" xml:space="preserve">
    <value>Temps</value>
  </data>
  <data name="gcResult.TitreAxeV" xml:space="preserve">
    <value>Angle</value>
  </data>
  <data name="&gt;&gt;gcResult.Name" xml:space="preserve">
    <value>gcResult</value>
  </data>
  <data name="&gt;&gt;gcResult.Type" xml:space="preserve">
    <value>RMControl.GraphControl, GraphControl, Version=5.0.4077.20461, Culture=neutral, PublicKeyToken=null</value>
  </data>
  <data name="&gt;&gt;gcResult.Parent" xml:space="preserve">
    <value>$this</value>
  </data>
  <data name="&gt;&gt;gcResult.ZOrder" xml:space="preserve">
    <value>0</value>
  </data>
  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>True</value>
  </metadata>
  <data name="$this.Size" type="System.Drawing.Size, System.Drawing">
    <value>680, 126</value>
  </data>
  <data name="&gt;&gt;toolTip1.Name" xml:space="preserve">
    <value>toolTip1</value>
  </data>
  <data name="&gt;&gt;toolTip1.Type" xml:space="preserve">
    <value>System.Windows.Forms.ToolTip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </data>
  <data name="&gt;&gt;$this.Name" xml:space="preserve">
    <value>BLabCourbeEvolution</value>
  </data>
  <data name="&gt;&gt;$this.Type" xml:space="preserve">
    <value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </data>
</root>


CoolDadTx on Thu, 18 Oct 2012 15:08:32


The issue lies in the custom control information that is stored in the RESX file.  The designer doesn't like it.  If you remove the gcResult properties then it works correctly.  Exactly why that is I can't say but it looks like maybe VS is trying to load the control in the designer, perhaps for validation.  I see an error about not being able to dispose of objects at design time.  Based upon reporting issues in previous versions of VS you can get that if you have a property with a mimetype set.  The image associated with the control does set the mimetype but removing that didn't get rid of the error for me.  Again this could just be because I'm missing the underlying control.

I would probably use the VS Feedback Tool to report the issue to MS along with the RESX file so they can provide either a more clear explanation or fix the issue.

Michael Taylor - 10/18/2012
http://msmvps.com/blogs/p3net

Guaw on Fri, 19 Oct 2012 05:56:56


Yes, i was thinking too it was a problem with the custom control. As I can still open the Control that go with this RESX it's not a big problem but i sometime need to open .resx files (for translation purposes for exemple). As it was working (and still work) with Vs2010 i thought that it was needed to be post here cause it look like a VS2012 problem (and i dont know how to use the VS Feedback Tool).

CoolDadTx on Fri, 19 Oct 2012 15:56:00


To use the VSFT just open it up and fill in the details of the issue and attach your RESX file.  It'll then send the feedback to MS along with some technical details so they can reproduce the problem.

Michael Taylor - 10/19/2012
http://msmvps.com/blogs/p3net