Skip to content

Commit 1734448

Browse files
committed
When building a project, we no longer get an error if the user Vandovs has a name in Cyrillic.
Previously, we were getting a build error due to the Username on the PC being in Russian. This fix eliminates the build error.
1 parent 7c3df82 commit 1734448

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ packages/*
2323

2424
wpp.tgz
2525
cov-int
26+
/.build-temp/
2627

2728
# Rider
2829
.idea

WowPacketParser.Proto/WowPacketParser.Proto.csproj

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,30 @@
55
<Nullable>enable</Nullable>
66
</PropertyGroup>
77

8+
<UsingTask TaskName="SetProcessEnvironmentVariable"
9+
TaskFactory="RoslynCodeTaskFactory"
10+
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
11+
<ParameterGroup>
12+
<Name ParameterType="System.String" Required="true" />
13+
<Value ParameterType="System.String" Required="true" />
14+
</ParameterGroup>
15+
<Task>
16+
<Using Namespace="System" />
17+
<Code Type="Fragment" Language="cs"><![CDATA[
18+
Environment.SetEnvironmentVariable(Name, Value, EnvironmentVariableTarget.Process);
19+
]]></Code>
20+
</Task>
21+
</UsingTask>
22+
23+
<Target Name="SetAsciiTempForProtobuf" BeforeTargets="Protobuf_ResolvePlatform">
24+
<PropertyGroup>
25+
<_ProtobufSafeTemp>$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\..\.build-temp'))</_ProtobufSafeTemp>
26+
</PropertyGroup>
27+
<MakeDir Directories="$(_ProtobufSafeTemp)" />
28+
<SetProcessEnvironmentVariable Name="TEMP" Value="$(_ProtobufSafeTemp)" />
29+
<SetProcessEnvironmentVariable Name="TMP" Value="$(_ProtobufSafeTemp)" />
30+
</Target>
31+
832
<ItemGroup>
933
<PackageReference Include="Google.Protobuf" Version="3.34.1" />
1034
<PackageReference Include="Grpc.Tools" Version="2.80.0">

0 commit comments

Comments
 (0)