diff --git a/ILSpy.AddIn/ILSpy.AddIn.csproj b/ILSpy.AddIn/ILSpy.AddIn.csproj index adf54d6f9..b4f78a163 100644 --- a/ILSpy.AddIn/ILSpy.AddIn.csproj +++ b/ILSpy.AddIn/ILSpy.AddIn.csproj @@ -12,7 +12,6 @@ <Company>IC#Code</Company> <Description>ILSpy</Description> - <NeutralLanguage>en-US</NeutralLanguage> <Version>1.7.1.0</Version> <FileVersion>1.7.1.0</FileVersion> @@ -90,11 +89,20 @@ <LastGenOutput>Resources.Designer.cs</LastGenOutput> <SubType>Designer</SubType> </EmbeddedResource> + <EmbeddedResource Include="VSPackage.en-US.resx"> + <MergeWithCTO>true</MergeWithCTO> + <LogicalName>VSPackage.en-US.resources</LogicalName> + <DependentUpon>VSPackage.resx</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="VSPackage.resx"> <MergeWithCTO>true</MergeWithCTO> <ManifestResourceName>VSPackage</ManifestResourceName> </EmbeddedResource> - <EmbeddedResource Include="VSPackage.zh-Hans.resx" /> + <EmbeddedResource Include="VSPackage.zh-Hans.resx"> + <MergeWithCTO>true</MergeWithCTO> + <LogicalName>VSPackage.zh-Hans.resources</LogicalName> + <DependentUpon>VSPackage.resx</DependentUpon> + </EmbeddedResource> </ItemGroup> <!-- @@ -129,24 +137,25 @@ </ItemGroup> <ItemGroup> - <None Include="ILSpyAddIn.vsct" /> - <None Include="ILSpyAddIn.en-US.vsct" /> - <None Include="ILSpyAddIn.zh-Hans.vsct" /> + <None Include="source.extension.vsixmanifest.template" /> <None Include="source.extension.vsixmanifest"> <SubType>Designer</SubType> </None> </ItemGroup> <ItemGroup> + <None Include="ILSpyAddIn.vsct"> + <SubType>Designer</SubType> + </None> <VSCTCompile Include="ILSpyAddIn.en-US.vsct"> <ResourceName>Menus.ctmenu</ResourceName> <SubType>Designer</SubType> + <DependentUpon>ILSpyAddIn.vsct</DependentUpon> </VSCTCompile> - </ItemGroup> - <ItemGroup> <VSCTCompile Include="ILSpyAddIn.zh-Hans.vsct"> <ResourceName>Menus.ctmenu</ResourceName> <SubType>Designer</SubType> + <DependentUpon>ILSpyAddIn.vsct</DependentUpon> </VSCTCompile> </ItemGroup> <ItemGroup> diff --git a/ILSpy.AddIn/ILSpyAddIn.en-US.vsct b/ILSpy.AddIn/ILSpyAddIn.en-US.vsct index f0867de8b..a6a3c6947 100644 --- a/ILSpy.AddIn/ILSpyAddIn.en-US.vsct +++ b/ILSpy.AddIn/ILSpyAddIn.en-US.vsct @@ -35,28 +35,6 @@ with command ids defined by other packages. --> - <!-- In this section you can define new menu groups. A menu group is a container for - other menus or buttons (commands); from a visual point of view you can see the - group as the part of a menu contained between two lines. The parent of a group - must be a menu. --> - <Groups> - <Group guid="guidILSpyAddInCmdSet" id="OpenILSpyGroup" priority="0x0200"> - <Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/> - </Group> - - <Group guid="guidILSpyAddInCmdSet" id="OpenILSpyProjGroup" priority="0x0200"> - <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_PROJNODE"/> - </Group> - - <Group guid="guidILSpyAddInCmdSet" id="OpenILSpyCodeItemGroup" priority="0x0200"> - <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_CODEWIN"/> - </Group> - - <Group guid="guidILSpyAddInCmdSet" id="OpenILSpyRefGroup" priority="0x0200"> - <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_REFERENCE"/> - </Group> - </Groups> - <!--Buttons section. --> <!--This section defines the elements the user can interact with, like a menu command or a button or combo box in a toolbar. --> @@ -109,15 +87,7 @@ </Buttons> - <!--The bitmaps section is used to define the bitmaps that are used for the commands.--> - <Bitmaps> - <!-- The bitmap id is defined in a way that is a little bit different from the others: - the declaration starts with a guid for the bitmap strip, then there is the resource id of the - bitmap strip containing the bitmaps and then there are the numeric ids of the elements used - inside a button definition. An important aspect of this declaration is that the element id - must be the actual index (1-based) of the bitmap inside the bitmap strip. --> - <Bitmap guid="guidImages" href="Resources\Images.png" usedList="bmpLogo, bmpPic1, bmpPic2, bmpPicX, bmpPicArrows"/> - </Bitmaps> + </Commands> diff --git a/ILSpy.AddIn/ILSpyAddIn.vsct b/ILSpy.AddIn/ILSpyAddIn.vsct index 156263ee9..3d992eae7 100644 --- a/ILSpy.AddIn/ILSpyAddIn.vsct +++ b/ILSpy.AddIn/ILSpyAddIn.vsct @@ -19,11 +19,55 @@ <!--This header contains the command ids for the menus provided by the shell. --> <Extern href="vsshlids.h"/> - + + <!--The Commands section is where we the commands, menus and menu groups are defined. + This section uses a Guid to identify the package that provides the command defined inside it. --> + <Commands package="guidILSpyAddInPkg"> + <!-- Inside this section we have different sub-sections: one for the menus, another + for the menu groups, one for the buttons (the actual commands), one for the combos + and the last one for the bitmaps used. Each element is identified by a command id that + is a unique pair of guid and numeric identifier; the guid part of the identifier is usually + called "command set" and is used to group different command inside a logically related + group; your package should define its own command set in order to avoid collisions + with command ids defined by other packages. --> + + + <!-- In this section you can define new menu groups. A menu group is a container for + other menus or buttons (commands); from a visual point of view you can see the + group as the part of a menu contained between two lines. The parent of a group + must be a menu. --> + <Groups> + <Group guid="guidILSpyAddInCmdSet" id="OpenILSpyGroup" priority="0x0200"> + <Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/> + </Group> + + <Group guid="guidILSpyAddInCmdSet" id="OpenILSpyProjGroup" priority="0x0200"> + <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_PROJNODE"/> + </Group> + + <Group guid="guidILSpyAddInCmdSet" id="OpenILSpyCodeItemGroup" priority="0x0200"> + <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_CODEWIN"/> + </Group> + + <Group guid="guidILSpyAddInCmdSet" id="OpenILSpyRefGroup" priority="0x0200"> + <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_REFERENCE"/> + </Group> + </Groups> + + <!--The bitmaps section is used to define the bitmaps that are used for the commands.--> + <Bitmaps> + <!-- The bitmap id is defined in a way that is a little bit different from the others: + the declaration starts with a guid for the bitmap strip, then there is the resource id of the + bitmap strip containing the bitmaps and then there are the numeric ids of the elements used + inside a button definition. An important aspect of this declaration is that the element id + must be the actual index (1-based) of the bitmap inside the bitmap strip. --> + <Bitmap guid="guidImages" href="Resources\Images.png" usedList="bmpLogo, bmpPic1, bmpPic2, bmpPicX, bmpPicArrows"/> + </Bitmaps> + </Commands> <Symbols> <!-- This is the package guid. --> <GuidSymbol name="guidILSpyAddInPkg" value="{a9120dbe-164a-4891-842f-fb7829273838}" /> - + <!-- This is the guid used to group the menu commands together --> <GuidSymbol name="guidILSpyAddInCmdSet" value="{85ddb8ca-a842-4b1c-ba1a-94141fdf19d0}"> @@ -36,7 +80,7 @@ <IDSymbol name="cmdidOpenProjectOutputInILSpy" value="0x0300" /> <IDSymbol name="cmdidOpenCodeItemInILSpy" value="0x0400" /> </GuidSymbol> - + <GuidSymbol name="guidImages" value="{2f654db9-4641-4638-9937-27c6202b2a6a}" > <IDSymbol name="bmpLogo" value="1" /> <IDSymbol name="bmpPic1" value="2" /> diff --git a/ILSpy.AddIn/ILSpyAddIn.zh-Hans.vsct b/ILSpy.AddIn/ILSpyAddIn.zh-Hans.vsct index 544ddc299..f84717c94 100644 --- a/ILSpy.AddIn/ILSpyAddIn.zh-Hans.vsct +++ b/ILSpy.AddIn/ILSpyAddIn.zh-Hans.vsct @@ -35,28 +35,6 @@ with command ids defined by other packages. --> - <!-- In this section you can define new menu groups. A menu group is a container for - other menus or buttons (commands); from a visual point of view you can see the - group as the part of a menu contained between two lines. The parent of a group - must be a menu. --> - <Groups> - <Group guid="guidILSpyAddInCmdSet" id="OpenILSpyGroup" priority="0x0200"> - <Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/> - </Group> - - <Group guid="guidILSpyAddInCmdSet" id="OpenILSpyProjGroup" priority="0x0200"> - <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_PROJNODE"/> - </Group> - - <Group guid="guidILSpyAddInCmdSet" id="OpenILSpyCodeItemGroup" priority="0x0200"> - <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_CODEWIN"/> - </Group> - - <Group guid="guidILSpyAddInCmdSet" id="OpenILSpyRefGroup" priority="0x0200"> - <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_REFERENCE"/> - </Group> - </Groups> - <!--Buttons section. --> <!--This section defines the elements the user can interact with, like a menu command or a button or combo box in a toolbar. --> @@ -108,16 +86,7 @@ </Button> </Buttons> - - <!--The bitmaps section is used to define the bitmaps that are used for the commands.--> - <Bitmaps> - <!-- The bitmap id is defined in a way that is a little bit different from the others: - the declaration starts with a guid for the bitmap strip, then there is the resource id of the - bitmap strip containing the bitmaps and then there are the numeric ids of the elements used - inside a button definition. An important aspect of this declaration is that the element id - must be the actual index (1-based) of the bitmap inside the bitmap strip. --> - <Bitmap guid="guidImages" href="Resources\Images.png" usedList="bmpLogo, bmpPic1, bmpPic2, bmpPicX, bmpPicArrows"/> - </Bitmaps> + </Commands> </CommandTable> diff --git a/ILSpy.AddIn/Properties/AssemblyInfo.cs b/ILSpy.AddIn/Properties/AssemblyInfo.cs index db36e8d59..64f95fad1 100644 --- a/ILSpy.AddIn/Properties/AssemblyInfo.cs +++ b/ILSpy.AddIn/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System; using System.Reflection; +using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -11,6 +12,6 @@ using System.Runtime.InteropServices; [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: CLSCompliant(false)] - +[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] [assembly: InternalsVisibleTo("ILSpy.AddIn_IntegrationTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100653c4a319be4f524972c3c5bba5fd243330f8e900287d9022d7821a63fd0086fd3801e3683dbe9897f2ecc44727023e9b40adcf180730af70c81c54476b3e5ba8b0f07f5132b2c3cc54347a2c1a9d64ebaaaf3cbffc1a18c427981e2a51d53d5ab02536b7550e732f795121c38a0abfdb38596353525d034baf9e6f1fd8ac4ac")] [assembly: InternalsVisibleTo("ILSpy.AddIn_UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100653c4a319be4f524972c3c5bba5fd243330f8e900287d9022d7821a63fd0086fd3801e3683dbe9897f2ecc44727023e9b40adcf180730af70c81c54476b3e5ba8b0f07f5132b2c3cc54347a2c1a9d64ebaaaf3cbffc1a18c427981e2a51d53d5ab02536b7550e732f795121c38a0abfdb38596353525d034baf9e6f1fd8ac4ac")] diff --git a/ILSpy.AddIn/VSPackage.en-US.resx b/ILSpy.AddIn/VSPackage.en-US.resx new file mode 100644 index 000000000..73c158134 --- /dev/null +++ b/ILSpy.AddIn/VSPackage.en-US.resx @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <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=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> + <data name="110" xml:space="preserve"> + <value>ILSpy.AddIn</value> + </data> + <data name="112" xml:space="preserve"> + <value>Integration of the ILSpy Decompiler into Visual Studio.</value> + </data> +</root> \ No newline at end of file diff --git a/ILSpy.AddIn/VSPackage.zh-Hans.resx b/ILSpy.AddIn/VSPackage.zh-Hans.resx index 1af7de150..73c158134 100644 --- a/ILSpy.AddIn/VSPackage.zh-Hans.resx +++ b/ILSpy.AddIn/VSPackage.zh-Hans.resx @@ -117,4 +117,10 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <data name="110" xml:space="preserve"> + <value>ILSpy.AddIn</value> + </data> + <data name="112" xml:space="preserve"> + <value>Integration of the ILSpy Decompiler into Visual Studio.</value> + </data> </root> \ No newline at end of file