Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Tasks/Microsoft.NET.Build.Tasks/ResourceUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ private sealed class Kernel32
// Native methods for updating resources
//

[DllImport(nameof(Kernel32), SetLastError=true)]
[DllImport(nameof(Kernel32), CharSet = CharSet.Unicode, SetLastError=true)]
public static extern SafeUpdateHandle BeginUpdateResource(string pFileName,
[MarshalAs(UnmanagedType.Bool)]bool bDeleteExistingResources);

Expand Down Expand Up @@ -71,7 +71,7 @@ public enum LoadLibraryFlags : uint
LOAD_LIBRARY_AS_IMAGE_RESOURCE = 0x00000020
}

[DllImport(nameof(Kernel32), SetLastError=true)]
[DllImport(nameof(Kernel32), CharSet = CharSet.Unicode, SetLastError=true)]
public static extern IntPtr LoadLibraryEx(string lpFileName,
IntPtr hReservedNull,
LoadLibraryFlags dwFlags);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,29 @@ public void ItHasNoPackageReferences()
packageReferences
.Should()
.BeEmpty();
}

[WindowsOnlyFact]
public void It_builds_with_unicode_characters_in_path()
{
var testProject = new TestProject()
{
Name = "Prj_すおヸょー",
TargetFrameworks = "netcoreapp3.0",
IsSdkProject = true,
IsExe = true,
};

var testAsset = _testAssetsManager
.CreateTestProject(testProject)
.Restore(Log, testProject.Name);

var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));

buildCommand
.Execute()
.Should()
.Pass();
}
}
}