From f45ed83c5c229e7705384a3d8294f10fde1f5728 Mon Sep 17 00:00:00 2001 From: Johan Larsson <johan_gavle1@hotmail.com> Date: Mon, 18 Jul 2016 02:22:59 +0200 Subject: [PATCH] Pack localized assemblies take II. Fixes since previous attempt: - #1810 should be ok now. - Outputting warning instead of throwing if satellite dll is not found. - Better pattern for finding languages. - Checking that matches for the regex is a culture name. --- docs/content/commands/pack.md | 9 ++ .../Paket.IntegrationTests/PackSpecs.fs | 33 +++++ .../before/LocalizedLib.sln | 22 ++++ .../before/LocalizedLib/Class1.cs | 6 + .../before/LocalizedLib/LocalizedLib.csproj | 66 ++++++++++ .../LocalizedLib/Properties/AssemblyInfo.cs | 36 +++++ .../Properties/Resources.Designer.cs | 72 ++++++++++ .../LocalizedLib/Properties/Resources.resx | 123 ++++++++++++++++++ .../Properties/Resources.sv-FI.resx | 123 ++++++++++++++++++ .../LocalizedLib/Properties/Resources.sv.resx | 123 ++++++++++++++++++ .../LocalizedLib/bin/Release/LocalizedLib.dll | Bin 0 -> 5120 bytes .../Release/sv-FI/LocalizedLib.resources.dll | Bin 0 -> 3584 bytes .../bin/Release/sv/LocalizedLib.resources.dll | Bin 0 -> 3584 bytes .../before/LocalizedLib/paket.template | 4 + .../before/LocalizedLib.sln | 22 ++++ .../before/LocalizedLib/Class1.cs | 6 + .../before/LocalizedLib/LocalizedLib.csproj | 66 ++++++++++ .../LocalizedLib/Properties/AssemblyInfo.cs | 36 +++++ .../Properties/Resources.Designer.cs | 72 ++++++++++ .../LocalizedLib/Properties/Resources.resx | 123 ++++++++++++++++++ .../Properties/Resources.sv-FI.resx | 123 ++++++++++++++++++ .../LocalizedLib/Properties/Resources.sv.resx | 123 ++++++++++++++++++ .../LocalizedLib/bin/Release/LocalizedLib.dll | Bin 0 -> 5120 bytes .../Release/sv-FI/LocalizedLib.resources.dll | Bin 0 -> 3584 bytes .../before/LocalizedLib/paket.template | 4 + src/Paket.Core/Cultures.fs | 19 +++ src/Paket.Core/PackageMetaData.fs | 40 ++++-- src/Paket.Core/Paket.Core.fsproj | 1 + src/Paket.Core/ProjectFile.fs | 29 ++++- src/Paket/Paket.fsproj | 4 +- tests/Paket.Tests/Paket.Tests.fsproj | 4 + .../ProjectFile/LocalizationSpecs.fs | 30 +++++ .../TestData/LocalizedLib.csprojtest | 66 ++++++++++ 33 files changed, 1373 insertions(+), 12 deletions(-) create mode 100644 integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib.sln create mode 100644 integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Class1.cs create mode 100644 integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/LocalizedLib.csproj create mode 100644 integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/AssemblyInfo.cs create mode 100644 integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/Resources.Designer.cs create mode 100644 integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/Resources.resx create mode 100644 integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/Resources.sv-FI.resx create mode 100644 integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/Resources.sv.resx create mode 100644 integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/bin/Release/LocalizedLib.dll create mode 100644 integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/bin/Release/sv-FI/LocalizedLib.resources.dll create mode 100644 integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/bin/Release/sv/LocalizedLib.resources.dll create mode 100644 integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/paket.template create mode 100644 integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib.sln create mode 100644 integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Class1.cs create mode 100644 integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/LocalizedLib.csproj create mode 100644 integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/AssemblyInfo.cs create mode 100644 integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/Resources.Designer.cs create mode 100644 integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/Resources.resx create mode 100644 integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/Resources.sv-FI.resx create mode 100644 integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/Resources.sv.resx create mode 100644 integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/bin/Release/LocalizedLib.dll create mode 100644 integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/bin/Release/sv-FI/LocalizedLib.resources.dll create mode 100644 integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/paket.template create mode 100644 src/Paket.Core/Cultures.fs create mode 100644 tests/Paket.Tests/ProjectFile/LocalizationSpecs.fs create mode 100644 tests/Paket.Tests/ProjectFile/TestData/LocalizedLib.csprojtest diff --git a/docs/content/commands/pack.md b/docs/content/commands/pack.md index d23dce7b5b..226e14b9c3 100644 --- a/docs/content/commands/pack.md +++ b/docs/content/commands/pack.md @@ -79,3 +79,12 @@ by using the `minimum-from-lock-file` parameter the dependencies of the generate [depfile]: dependencies-file.html [reffile]: references-files.html [templatefile]: template-files.html + +### Localized Packages + +When using a `.template` with `type project` any localized satellite dlls are included in the created packages. +The following layout is created: +``` +lib/net45/Foo.dll + /se/Foo.resources.dll +``` \ No newline at end of file diff --git a/integrationtests/Paket.IntegrationTests/PackSpecs.fs b/integrationtests/Paket.IntegrationTests/PackSpecs.fs index 48f85f9718..33568d3375 100644 --- a/integrationtests/Paket.IntegrationTests/PackSpecs.fs +++ b/integrationtests/Paket.IntegrationTests/PackSpecs.fs @@ -349,3 +349,36 @@ let ``#1596 pack works for reflected definition assemblies``() = File.Exists(Path.Combine(outPath, "lib", "net45", "Project2.dll")) |> shouldEqual true File.Delete(templatePath) + +[<Test>] +let ``#1816 pack localized happy path`` () = + let scenario = "i001816-pack-localized-happy-path" + let rootPath = scenarioTempPath scenario + let outPath = Path.Combine(rootPath, "out") + let package = Path.Combine(outPath, "LocalizedLib.1.0.0.0.nupkg") + + paket ("pack -v output \"" + outPath) scenario |> ignore + ZipFile.ExtractToDirectory(package, outPath) + + Path.Combine(outPath, "lib", "net45", "LocalizedLib.dll") |> checkFileExists + Path.Combine(outPath, "lib", "net45", "sv", "LocalizedLib.resources.dll") |> checkFileExists + Path.Combine(outPath, "lib", "net45", "sv-FI", "LocalizedLib.resources.dll") |> checkFileExists + + CleanDir rootPath + +[<Test>] +let ``#1816 pack localized when satellite dll is missing`` () = + let scenario = "i001816-pack-localized-missing-dll" + let rootPath = scenarioTempPath scenario + let outPath = Path.Combine(rootPath, "out") + let package = Path.Combine(outPath, "LocalizedLib.1.0.0.0.nupkg") + + let result = paket ("pack -v output \"" + outPath) scenario + let expectedMessage = "Did not find satellite assembly for (sv) try building and running pack again." + StringAssert.Contains(expectedMessage, result) + ZipFile.ExtractToDirectory(package, outPath) + + Path.Combine(outPath, "lib", "net45", "LocalizedLib.dll") |> checkFileExists + Path.Combine(outPath, "lib", "net45", "sv-FI", "LocalizedLib.resources.dll") |> checkFileExists + + CleanDir rootPath diff --git a/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib.sln b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib.sln new file mode 100644 index 0000000000..a84b233aa2 --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LocalizedLib", "LocalizedLib\LocalizedLib.csproj", "{F1120474-4821-4FE7-95C1-C71E639664C0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F1120474-4821-4FE7-95C1-C71E639664C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F1120474-4821-4FE7-95C1-C71E639664C0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F1120474-4821-4FE7-95C1-C71E639664C0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F1120474-4821-4FE7-95C1-C71E639664C0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Class1.cs b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Class1.cs new file mode 100644 index 0000000000..48508ef3d9 --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Class1.cs @@ -0,0 +1,6 @@ +namespace LocalizedLib +{ + public class Class1 + { + } +} diff --git a/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/LocalizedLib.csproj b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/LocalizedLib.csproj new file mode 100644 index 0000000000..e0764eb484 --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/LocalizedLib.csproj @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{F1120474-4821-4FE7-95C1-C71E639664C0}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>LocalizedLib</RootNamespace> + <AssemblyName>LocalizedLib</AssemblyName> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>none</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>0</WarningLevel> + <DocumentationFile> + </DocumentationFile> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Class1.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <EmbeddedResource Include="Properties\Resources.sv-FI.resx" /> + <EmbeddedResource Include="Properties\Resources.sv.resx" /> + </ItemGroup> + <ItemGroup> + <None Include="paket.template" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/AssemblyInfo.cs b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..39a892127f --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("LocalizedLib")] +[assembly: AssemblyDescription("Test with satellite dlls")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Author")] +[assembly: AssemblyProduct("LocalizedLib")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f1120474-4821-4fe7-95c1-c71e639664c0")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/Resources.Designer.cs b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/Resources.Designer.cs new file mode 100644 index 0000000000..06c92529ef --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/Resources.Designer.cs @@ -0,0 +1,72 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace LocalizedLib.Properties { + using System; + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LocalizedLib.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// <summary> + /// Looks up a localized string similar to Key. + /// </summary> + internal static string Key { + get { + return ResourceManager.GetString("Key", resourceCulture); + } + } + } +} diff --git a/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/Resources.resx b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/Resources.resx new file mode 100644 index 0000000000..58c1f76475 --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/Resources.resx @@ -0,0 +1,123 @@ +<?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="Key" xml:space="preserve"> + <value>Key</value> + </data> +</root> \ No newline at end of file diff --git a/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/Resources.sv-FI.resx b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/Resources.sv-FI.resx new file mode 100644 index 0000000000..3ae158b572 --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/Resources.sv-FI.resx @@ -0,0 +1,123 @@ +<?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="Key" xml:space="preserve"> + <value>Nyckel</value> + </data> +</root> \ No newline at end of file diff --git a/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/Resources.sv.resx b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/Resources.sv.resx new file mode 100644 index 0000000000..3ae158b572 --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/Properties/Resources.sv.resx @@ -0,0 +1,123 @@ +<?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="Key" xml:space="preserve"> + <value>Nyckel</value> + </data> +</root> \ No newline at end of file diff --git a/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/bin/Release/LocalizedLib.dll b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/bin/Release/LocalizedLib.dll new file mode 100644 index 0000000000000000000000000000000000000000..56b6a4e70aa3c17d81de4c2d3e221f01edc7012d GIT binary patch literal 5120 zcmeHLU2Ggz6+Sb&UOP#%)Na$HK?zeFAa(4O*IwH(ZNNWkC!5%@W3QdG4T@)Huh-Me z&MY&twl`G4sBLIfAyMUtwhtijK$QxWsDgmhs^JBM8mQDh08f#C3L#L$0}?{0;X8L` zylXq5^by2e&$;LCo_p@OXU@Ij$;ZD*F(QiNxqX}H8hUO+68?Lz266IJKS|OX+ipB` zO_{jyP=3kuw2JGLT)nIrx@|kYRuGz7wKdb$vQx8K*(r+D&Yjy2gr=v*h$fU6y|#Sm zbTr#d`n0w~=_a}doJ7E#KZIVxGlYleUWu!L-^>Wrh}J-W&n-p^&$252)%%cS7Fry3 zrx+O`dY=Qaxh({4Y-WEXtr4{}D7An-)<CCxvFd|9y8{3+xz^BcP_k)63n|xg4N%gz zAt1a_Njwd02;Qe$VL4FbkkJAjw$+BGp$!p@G>{TK%yC6y-&AU%*EFK%wh<}JM9Xv# zy&Ita5!|mHypL#m$M-M7LcD9gi>~r60;?XpAADyQfcF5v8q1|p$KH!@Hr}ycU6cL% zL8vEOBt}IFoZV~?vyaRkA5lWjc%93cRClVkyEi?^t~HSb_)nN<zeuzM8-K^sKI^-t zUGi9Cp_ynJef!)jy$+nyqW$PxE{pzc&_9Pu?IV^`0L=}il+(Mut!x9I{-N{|{AP47 z9+;LP=DcGbd?YMf;w<BBVm@rhp6Df&Y0lJNDRZ#|J*qPN6Sc=aL02&(L5Gz0)C66X z@Un#MDsyg0yhY+865p-#W9;{c;j-j>Nm+pAZ(>)}?es%x0{;dqC+Hi*v;0l10{%gL z3({432Jl0`1f8HOfS;4_&$0K|*)VH4&I%%=P%8~foa6OW?0SqT72K<84seMkX<FlP zm-g(#97;$%9a3kc>~hOr)l-l?6H?PO59)=GI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6}o3bxubmw?a2$z*H%n_N%K&GEF`tikbbyTG|5AKheC<rs=tKH zpxp|!t-mqaPhZuvp6+x%(ZdQISWKsTx-$cruFT<{bXR6k40H|l8R;%#AT9cP2mAXo zMmO$o3N@#3wZV@lr_kQi$+7%;#pn#*mm|3T^kGfO``1NT)2mo|?IdbT8;{Y}B^q>x z6zYv$y(n{1dB?H56ka;VE}@K}To<DR8>yOBQMk=~%aX3dg9{A3gWdh*FK)fX<coN$ zEmk8FGXnL`?bM<(qf?8V4~=$e;d^+*7FFNXtxj#aTChw5`I&dl3;Rf6U_kFP`ufv@ zy&2Jcc(8rzWWhNU%{eQ4-pbHdnjX&b-^^dW&NprP8J<KvMU@yP>J0C|EFWiFV{B`S z?#hAW+^FMbEo)LY?chulLY5?!-u?`1@b&V)tnrPHXb;iaM#uT(Awo88;j<opJDeFJ zS`BUw%mSVPoX5@Q9N-u##VqCUrF9Z?4sbm9>Y_K}w>}IuE84K2|Dv=K++fzPC?PM4 zUV&8|Rc9Qv$U?=*kxh%JP}~m4druxx9b6A`UDhlIRM1|J{~AUW_~b*&1iy3#OK(V> zZmc`_Wl#wb13HeosDk^QLuLE~M*EnBC@(9ZkF8&UO&@n-4Sb$kzz43WjA^K<Ovz6Y z)X?U2TNUYV4bjo1UG{YtwUsS7@RQpJ?Sy``>a3j6kZY(w&xBsE#=BK=w$Y86Shq0` z8!o)5k4?j??)8V~Y=u5YnEiLr^9fP+@@{jb!j<xz$M7+#;55N)P>$y4Rd7yl^h;PD ze+zHrY4j@MrBM(3NfU}Fb-+raonV)Xuv>;*7x(HQt~}>)>GxDP2k$cb9mS3*-aY*P z0lwV%)C+csZGB$GJvar6*b@UD*CTLu8$326<Gpe0=BRIu`C&O`7_0H*+6wTzhDdzW YIG*ogH7)p`!I?)s)~Nq0|BpoAUjYhoi~s-t literal 0 HcmV?d00001 diff --git a/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/bin/Release/sv-FI/LocalizedLib.resources.dll b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/bin/Release/sv-FI/LocalizedLib.resources.dll new file mode 100644 index 0000000000000000000000000000000000000000..0cf45ee439c586709407044194468eb96d852cf6 GIT binary patch literal 3584 zcmeHJO>9(E6h4oZwoo8~1R-d+O-qcizRb|_(+E0k2c%M9(iy5TCiKmlOZ(C{?~V7} z0frdTg<?#Ik)^KPkg#AuA^|1-B_sw=qV9}g;lhoQxO8Ft&VBP{I&DE*%bB_7o^$TG z=YIFxzjyeJ52=la+EM1`iLRn%${7A|HizbQ+pevnE30nzT(!n;_Y`KlNK{lft(>xO zogfIcC`zHKf$##6J(?Hguq5rZYghNxL+ADrjazMW>EyZBlF{zbik@z(o2Ua8E}&ny zgFwlk5Ite!6)|o$Fn&XG;IK2bQRZEC<$trTt84<DN8F<<WQe}!L@cH$qBV<ckD?2r zt_6Nw&<`%qZ7ol0=)W>>w3&I<aYHjCh^A~6DHoc-mVv<j3j;%iIb$p7hj27lr(on* zi-5y#1lAV%0`q5LY%6Fb_4N?VAP<(Y66FNZ4|Vxbs_)=*=iB=?xc>zdKVOTqEZY+@ z3aiSMQA3)LPD!eMQI6bD`ChSKOiC4bVX$w|PVui_j8=VJRdQb-t6DjJzsOaKzULm2 zwL&;6gMG!_yPcix&RyxDfkBztGt|3uuxg;avP?$LOU-#{Ol~-v!++xU_psTBZlZJ? zB1tvY$m%#!b7!SbBl%ZHta>L-=}87SkQzu2vD-@W!MhN%_bib{ontw#l^0A$?C}l8 z<R$ApmZw{gc{}#La%?P%`e*3pSs(GkB5Ed>tj>)@s~G2B+XrY<47n33o48J7*12FO z)$0!0PETSxjTnC1@Y9B0F#M9?H^G_WzC62Cw3oKgdc(IE-edT4hNlf5GTf$a>LVKw zc7boD0(h^nJWo@Q2k12Ti*%OS=aLaHl%aXrWbqbG$fDH{xx}7N$AF0T9u7-YU%o`i z{-DO<p75osu~BF^ie$Oy*9xBY<*-J^i&ZVjc6F#4jaeDF%BygPrc2UuG%Qz~ptiIj zr!c&$mo|)sm74OVXO?LyDD3F6qh^=(I^g-TzP+1`<Du*L-WgdM_lh{b$pI<(J}uuw z(a9GMjI}lbXhkaREjU?`ZTy-cIk|0uIR&}Tp55B^_2>t0e{}b^%3GgM*QaORoZK>a z@BNL}E`5CK`s{{3?y5iEIXB-v|K(4W8|}if)~&Z_%|bv#&sem%AR{eKd3r`fj+Vaf zX(<35JHFeZj^V1F!6ML87Hw#xOnh}wh#jf)E}R;R@Y<}gs52d(c3`_wzl#{>9hL=4 zODVat;+Es1q00LHVaE&Ny&|Q}DP)@8ju__lk9{BWhiAYt$=Xab*XkGFeyL^b?8k4% z>lxgAcsCN#ZG#XeDNo12_tONVF}$=#ppStch+kd$y#4;)@ySmPeq6s?55#u`?!y+! zLbDLnA%!>|?q7+R0iB@G`1P4bvVc|x)(GtmY50ZEV!GV^BVV$>q~YbkKD|t&%f=@~ z$#0N~knz1jThMnD@yhr~^wt=Ka1Tn<8e8rZVrrU!6q&IlF!;tMVJjKUJPnA~*@#s! zcx%XxW8yN_VXB%)A#gHfX)XMdS!d0Nu9-sxe$6?K1D%UFJn9*Em4Mm<ex?*&qh^dr zv?}0i_D$pVPBjYF7I(a5GOUenVB$7WK4>f(aXBL)=AeLvWxGCm#&M7~AnrKq(<UNk zw1UT%S7aL5<L{%THbEDWLqR)$F^v}pA4vw^(Rx2#O`dm>Bi4A8c-@xI$-m*;YjU1L z{1E7?n2By#qX)&skThs=-P(6?#uw*%kLfdvY(>Cb#;W<qiolL<U8%+Wc)b5iBK}Og M$H(<C{qHjH4<60bY5)KL literal 0 HcmV?d00001 diff --git a/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/bin/Release/sv/LocalizedLib.resources.dll b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/bin/Release/sv/LocalizedLib.resources.dll new file mode 100644 index 0000000000000000000000000000000000000000..de2dbc497f806529de7ad68e8015742b4986e291 GIT binary patch literal 3584 zcmeHJO>9(E6h4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XFjHm&n~_>)jjy&-5ocV zKK%Cc`R%{|pdMYmvfR3S=jZb6R$*CNw^_7#B@m+LE!vfrkrwAYJtrbZOW*gj6o8DK z-epnSNJY;f`ShGc+v}+kUtJSoUn+e7r^O<?GMg=GPsgVm=$2}C5Cgr>vS4W~C3jVG z%k)^Nvc7-P@q&1-NNIBlnU?n=mbv|#`#jaw&wyo;wTo!6xjnx9QtQ~+kKc~hGr0Tk zZX~2z1|d#Sj;6tn&?Kbebec{<KMsBrGSe5W5C4i!esb{R`W4d}KX<qfn<xv-LR5zo z;&`}!C1M72jzZ(tXCBEsS{+y;v^%8X7eb5adMn?%7BFded9cr}6Y09~Nm23}qyl7o zuTVGojv-zNKZ)KNqY&;viCSaJokvVfbC4o4wgd*>*d%O4qnW1x@!IRL$_8&0*>Ox< z#yUb36Db5vrYvoNe=_T=8PPR!D8sKY$8n%@5r;>;2(Kbgd%(|>!fVusF@;tIoQ=L| z+}^2r!P?@Ew@ik$@eNGe2Fk~cWg{+UB*YvP(6DURX3sc|(RRcghke#W<cyZ_`0|R( zB76LOwALo*8geLTA26oz0^xhb;5%LG$E(TnPIAN=uM)4@`Z@VGoWmyP6Nn!IeFZbo zO>6YHxEPWKO|F~!uFm-Cd>=A>Mv$!txJy_yA6XID@y#o>x*w1CpGm}@i4XX=KBfO% G2L1*`ywZvQ literal 0 HcmV?d00001 diff --git a/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/paket.template b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/paket.template new file mode 100644 index 0000000000..89dba9f5ba --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-happy-path/before/LocalizedLib/paket.template @@ -0,0 +1,4 @@ +type project +licenseUrl http://opensource.org/licenses/MIT +authors blub +description bla diff --git a/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib.sln b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib.sln new file mode 100644 index 0000000000..a84b233aa2 --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LocalizedLib", "LocalizedLib\LocalizedLib.csproj", "{F1120474-4821-4FE7-95C1-C71E639664C0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F1120474-4821-4FE7-95C1-C71E639664C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F1120474-4821-4FE7-95C1-C71E639664C0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F1120474-4821-4FE7-95C1-C71E639664C0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F1120474-4821-4FE7-95C1-C71E639664C0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Class1.cs b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Class1.cs new file mode 100644 index 0000000000..48508ef3d9 --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Class1.cs @@ -0,0 +1,6 @@ +namespace LocalizedLib +{ + public class Class1 + { + } +} diff --git a/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/LocalizedLib.csproj b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/LocalizedLib.csproj new file mode 100644 index 0000000000..e0764eb484 --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/LocalizedLib.csproj @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{F1120474-4821-4FE7-95C1-C71E639664C0}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>LocalizedLib</RootNamespace> + <AssemblyName>LocalizedLib</AssemblyName> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>none</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>0</WarningLevel> + <DocumentationFile> + </DocumentationFile> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Class1.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <EmbeddedResource Include="Properties\Resources.sv-FI.resx" /> + <EmbeddedResource Include="Properties\Resources.sv.resx" /> + </ItemGroup> + <ItemGroup> + <None Include="paket.template" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/AssemblyInfo.cs b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..39a892127f --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("LocalizedLib")] +[assembly: AssemblyDescription("Test with satellite dlls")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Author")] +[assembly: AssemblyProduct("LocalizedLib")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f1120474-4821-4fe7-95c1-c71e639664c0")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/Resources.Designer.cs b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/Resources.Designer.cs new file mode 100644 index 0000000000..06c92529ef --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/Resources.Designer.cs @@ -0,0 +1,72 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace LocalizedLib.Properties { + using System; + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LocalizedLib.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// <summary> + /// Looks up a localized string similar to Key. + /// </summary> + internal static string Key { + get { + return ResourceManager.GetString("Key", resourceCulture); + } + } + } +} diff --git a/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/Resources.resx b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/Resources.resx new file mode 100644 index 0000000000..58c1f76475 --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/Resources.resx @@ -0,0 +1,123 @@ +<?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="Key" xml:space="preserve"> + <value>Key</value> + </data> +</root> \ No newline at end of file diff --git a/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/Resources.sv-FI.resx b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/Resources.sv-FI.resx new file mode 100644 index 0000000000..3ae158b572 --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/Resources.sv-FI.resx @@ -0,0 +1,123 @@ +<?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="Key" xml:space="preserve"> + <value>Nyckel</value> + </data> +</root> \ No newline at end of file diff --git a/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/Resources.sv.resx b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/Resources.sv.resx new file mode 100644 index 0000000000..3ae158b572 --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/Properties/Resources.sv.resx @@ -0,0 +1,123 @@ +<?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="Key" xml:space="preserve"> + <value>Nyckel</value> + </data> +</root> \ No newline at end of file diff --git a/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/bin/Release/LocalizedLib.dll b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/bin/Release/LocalizedLib.dll new file mode 100644 index 0000000000000000000000000000000000000000..56b6a4e70aa3c17d81de4c2d3e221f01edc7012d GIT binary patch literal 5120 zcmeHLU2Ggz6+Sb&UOP#%)Na$HK?zeFAa(4O*IwH(ZNNWkC!5%@W3QdG4T@)Huh-Me z&MY&twl`G4sBLIfAyMUtwhtijK$QxWsDgmhs^JBM8mQDh08f#C3L#L$0}?{0;X8L` zylXq5^by2e&$;LCo_p@OXU@Ij$;ZD*F(QiNxqX}H8hUO+68?Lz266IJKS|OX+ipB` zO_{jyP=3kuw2JGLT)nIrx@|kYRuGz7wKdb$vQx8K*(r+D&Yjy2gr=v*h$fU6y|#Sm zbTr#d`n0w~=_a}doJ7E#KZIVxGlYleUWu!L-^>Wrh}J-W&n-p^&$252)%%cS7Fry3 zrx+O`dY=Qaxh({4Y-WEXtr4{}D7An-)<CCxvFd|9y8{3+xz^BcP_k)63n|xg4N%gz zAt1a_Njwd02;Qe$VL4FbkkJAjw$+BGp$!p@G>{TK%yC6y-&AU%*EFK%wh<}JM9Xv# zy&Ita5!|mHypL#m$M-M7LcD9gi>~r60;?XpAADyQfcF5v8q1|p$KH!@Hr}ycU6cL% zL8vEOBt}IFoZV~?vyaRkA5lWjc%93cRClVkyEi?^t~HSb_)nN<zeuzM8-K^sKI^-t zUGi9Cp_ynJef!)jy$+nyqW$PxE{pzc&_9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7yl^h;PD ze+zHrY4j@MrBM(3NfU}Fb-+raonV)Xuv>;*7x(HQt~}>)>GxDP2k$cb9mS3*-aY*P z0lwV%)C+csZGB$GJvar6*b@UD*CTLu8$326<Gpe0=BRIu`C&O`7_0H*+6wTzhDdzW YIG*ogH7)p`!I?)s)~Nq0|BpoAUjYhoi~s-t literal 0 HcmV?d00001 diff --git a/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/bin/Release/sv-FI/LocalizedLib.resources.dll b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/bin/Release/sv-FI/LocalizedLib.resources.dll new file mode 100644 index 0000000000000000000000000000000000000000..0cf45ee439c586709407044194468eb96d852cf6 GIT binary patch literal 3584 zcmeHJO>9(E6h4oZwoo8~1R-d+O-qcizRb|_(+E0k2c%M9(iy5TCiKmlOZ(C{?~V7} z0frdTg<?#Ik)^KPkg#AuA^|1-B_sw=qV9}g;lhoQxO8Ft&VBP{I&DE*%bB_7o^$TG z=YIFxzjyeJ52=la+EM1`iLRn%${7A|HizbQ+pevnE30nzT(!n;_Y`KlNK{lft(>xO zogfIcC`zHKf$##6J(?Hguq5rZYghNxL+ADrjazMW>EyZBlF{zbik@z(o2Ua8E}&ny zgFwlk5Ite!6)|o$Fn&XG;IK2bQRZEC<$trTt84<DN8F<<WQe}!L@cH$qBV<ckD?2r zt_6Nw&<`%qZ7ol0=)W>>w3&I<aYHjCh^A~6DHoc-mVv<j3j;%iIb$p7hj27lr(on* zi-5y#1lAV%0`q5LY%6Fb_4N?VAP<(Y66FNZ4|Vxbs_)=*=iB=?xc>zdKVOTqEZY+@ z3aiSMQA3)LPD!eMQI6bD`ChSKOiC4bVX$w|PVui_j8=VJRdQb-t6DjJzsOaKzULm2 zwL&;6gMG!_yPcix&RyxDfkBztGt|3uuxg;avP?$LOU-#{Ol~-v!++xU_psTBZlZJ? zB1tvY$m%#!b7!SbBl%ZHta>L-=}87SkQzu2vD-@W!MhN%_bib{ontw#l^0A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cb#;W<qiolL<U8%+Wc)b5iBK}Og M$H(<C{qHjH4<60bY5)KL literal 0 HcmV?d00001 diff --git a/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/paket.template b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/paket.template new file mode 100644 index 0000000000..89dba9f5ba --- /dev/null +++ b/integrationtests/scenarios/i001816-pack-localized-missing-dll/before/LocalizedLib/paket.template @@ -0,0 +1,4 @@ +type project +licenseUrl http://opensource.org/licenses/MIT +authors blub +description bla diff --git a/src/Paket.Core/Cultures.fs b/src/Paket.Core/Cultures.fs new file mode 100644 index 0000000000..7cbf2118fd --- /dev/null +++ b/src/Paket.Core/Cultures.fs @@ -0,0 +1,19 @@ +namespace Paket +open System +open System.Collections.Generic +open System.Globalization + +[<CompilationRepresentation (CompilationRepresentationFlags.ModuleSuffix)>] +module Cultures = + let private allLanguageNames = + let allLanguageNames = + CultureInfo.GetCultures CultureTypes.AllCultures + |> Array.map (fun c -> c.Name) + |> Array.filter (String.IsNullOrEmpty >> not) + HashSet<_>(allLanguageNames, StringComparer.OrdinalIgnoreCase) + + let isLanguageName text = + if String.IsNullOrWhiteSpace text then + false + else + allLanguageNames.Contains text diff --git a/src/Paket.Core/PackageMetaData.fs b/src/Paket.Core/PackageMetaData.fs index 0bfa9f7b20..3e24fee239 100644 --- a/src/Paket.Core/PackageMetaData.fs +++ b/src/Paket.Core/PackageMetaData.fs @@ -167,17 +167,39 @@ let findDependencies (dependenciesFile : DependenciesFile) config platform (temp deps, p :: files) ([], []) - // Add the assembly + pdb + dll from this project + // Add the assembly + {.dll, .pdb, .xml, /*/.resources.dll} from this project let templateWithOutput = + let projects = + if includeReferencedProjects then + project.GetAllInterProjectDependenciesWithoutProjectTemplates() + |> Seq.toList + else + [ project ] + + let satelliteDlls = + seq { + for project in projects do + let satelliteAssemblyName = Path.GetFileNameWithoutExtension(project.GetAssemblyName()) + ".resources.dll" + let projectDir = Path.GetDirectoryName(Path.GetFullPath(project.FileName)) + let outputDir = Path.Combine(projectDir, project.GetOutputDirectory config platform) + for language in project.FindLocalizedLanguageNames() do + let fileName = Path.Combine(outputDir, language, satelliteAssemblyName) + if File.Exists fileName then + let satelliteTargetDir = Path.Combine(targetDir, language) + yield (FileInfo fileName, satelliteTargetDir) + else + traceWarnfn "Did not find satellite assembly for (%s) try building and running pack again." language + } + + let template = + satelliteDlls + |> Seq.fold (fun template (dllFile, targetDir) -> addFile dllFile.FullName targetDir template) template + + let assemblyNames = + projects + |> List.map (fun proj -> proj.GetAssemblyName()) + let additionalFiles = - let assemblyNames = - if includeReferencedProjects then - project.GetAllInterProjectDependenciesWithoutProjectTemplates() - |> Seq.toList - else - [ project ] - |> List.map (fun proj -> proj.GetAssemblyName()) - assemblyNames |> Seq.collect (fun assemblyFileName -> let assemblyfi = FileInfo(assemblyFileName) diff --git a/src/Paket.Core/Paket.Core.fsproj b/src/Paket.Core/Paket.Core.fsproj index 36930dcb8b..1fc991632f 100644 --- a/src/Paket.Core/Paket.Core.fsproj +++ b/src/Paket.Core/Paket.Core.fsproj @@ -98,6 +98,7 @@ <Compile Include="PlatformDetection.fs" /> <Compile Include="ConfigFile.fs" /> <Compile Include="Cache.fs" /> + <Compile Include="Cultures.fs" /> <Compile Include="PackageSources.fs" /> <Compile Include="FrameworkHandling.fs" /> <Compile Include="PlatformMatching.fs" /> diff --git a/src/Paket.Core/ProjectFile.fs b/src/Paket.Core/ProjectFile.fs index 0e65eb715f..754e7fb702 100644 --- a/src/Paket.Core/ProjectFile.fs +++ b/src/Paket.Core/ProjectFile.fs @@ -4,9 +4,10 @@ open Paket open Paket.Domain open Paket.Logging open System +open System.Collections.Generic open System.IO +open System.Text.RegularExpressions open System.Xml -open System.Collections.Generic open Paket.Xml open Paket.Requirements @@ -1337,6 +1338,32 @@ type ProjectFile with member this.FindReferencesFile() = this.FindCorrespondingFile Constants.ReferencesFile + member this.FindLocalizedLanguageNames() = + let tryGetAttributeValue name node = + if hasAttribute name node then + Some node.Attributes.[name].Value + else + None + + let tryGetLanguage value = + let pattern = @"\.(?<language>\w+(-\w+)?)\.resx$" + let m = Regex.Match(value, pattern, RegexOptions.ExplicitCapture) + if m.Success then + let value = m.Groups.["language"].Value + if Cultures.isLanguageName value then + Some value + else + None + else + None + + this.ProjectNode + |> getDescendants "EmbeddedResource" + |> List.choose (tryGetAttributeValue "Include") + |> List.choose (tryGetLanguage) + |> List.distinct + |> List.sort + member this.HasPackageInstalled(groupName,package) = match this.FindReferencesFile() with | None -> false diff --git a/src/Paket/Paket.fsproj b/src/Paket/Paket.fsproj index 341f93bde0..a3c2ee144e 100644 --- a/src/Paket/Paket.fsproj +++ b/src/Paket/Paket.fsproj @@ -30,8 +30,8 @@ <StartAction>Project</StartAction> <StartProgram>paket.exe</StartProgram> <StartAction>Project</StartAction> - <StartArguments>install -v</StartArguments> - <StartWorkingDirectory>C:\PROJ\Paket\integrationtests\scenarios\i001779-net20-only-in-net461\temp</StartWorkingDirectory> + <StartArguments>pack -v output "C:\Git\ThirdParty\Paket\integrationtests\scenarios\i001816-pack-localized-happy-path\temp\out</StartArguments> + <StartWorkingDirectory>C:\Git\ThirdParty\Paket\integrationtests\scenarios\i001816-pack-localized-happy-path\before\</StartWorkingDirectory> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> diff --git a/tests/Paket.Tests/Paket.Tests.fsproj b/tests/Paket.Tests/Paket.Tests.fsproj index e91812845e..e0e7b10a56 100644 --- a/tests/Paket.Tests/Paket.Tests.fsproj +++ b/tests/Paket.Tests/Paket.Tests.fsproj @@ -306,6 +306,9 @@ <None Include="ProjectFile\TestData\WithWildcardCompileItems.csprojtest"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> + <None Include="ProjectFile\TestData\LocalizedLib.csprojtest"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> <Compile Include="ProjectFile\ConditionSpecs.fs" /> <Compile Include="ProjectFile\TargetFrameworkSpecs.fs" /> <Compile Include="ProjectFile\FileBuildActionSpecs.fs" /> @@ -313,6 +316,7 @@ <Compile Include="ProjectFile\FrameworkReferencesSpecs.fs" /> <Compile Include="ProjectFile\OutputSpecs.fs" /> <Compile Include="ProjectFile\ProjectLanguageSpecs.fs" /> + <Compile Include="ProjectFile\LocalizationSpecs.fs" /> <Compile Include="InstallModel\FrameworkIdentifierSpecs.fs" /> <Compile Include="InstallModel\ProcessingSpecs.fs" /> <Compile Include="InstallModel\Xml\Fantomas.fs" /> diff --git a/tests/Paket.Tests/ProjectFile/LocalizationSpecs.fs b/tests/Paket.Tests/ProjectFile/LocalizationSpecs.fs new file mode 100644 index 0000000000..73a70c6d16 --- /dev/null +++ b/tests/Paket.Tests/ProjectFile/LocalizationSpecs.fs @@ -0,0 +1,30 @@ +module Paket.ProjectFile.LocalizationSpecs + +open Paket +open NUnit.Framework +open FsUnit +open System.Xml +open System.Xml.Linq +open TestHelpers + +[<Test>] +let ``finds language names`` () = + ensureDir () + let actual = ProjectFile.TryLoad("./ProjectFile/TestData/LocalizedLib.csprojtest") + .Value + .FindLocalizedLanguageNames() + let expected = + [ + "sv" + "sv-FI" + ] + CollectionAssert.AreEqual(expected, actual) + +[<Test>] +let ``returns empty when no localization`` () = + ensureDir () + let actual = ProjectFile.TryLoad("./ProjectFile/TestData/NewSilverlightClassLibrary.csprojtest") + .Value + .FindLocalizedLanguageNames() + CollectionAssert.IsEmpty(actual) + diff --git a/tests/Paket.Tests/ProjectFile/TestData/LocalizedLib.csprojtest b/tests/Paket.Tests/ProjectFile/TestData/LocalizedLib.csprojtest new file mode 100644 index 0000000000..e0764eb484 --- /dev/null +++ b/tests/Paket.Tests/ProjectFile/TestData/LocalizedLib.csprojtest @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{F1120474-4821-4FE7-95C1-C71E639664C0}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>LocalizedLib</RootNamespace> + <AssemblyName>LocalizedLib</AssemblyName> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>none</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>0</WarningLevel> + <DocumentationFile> + </DocumentationFile> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Class1.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <EmbeddedResource Include="Properties\Resources.sv-FI.resx" /> + <EmbeddedResource Include="Properties\Resources.sv.resx" /> + </ItemGroup> + <ItemGroup> + <None Include="paket.template" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file