Skip to content

Commit 1f682fc

Browse files
committed
Core - Cef.ChromiumVersion change to using System.Version
- After upgrading to VS `17.12.1` the String::Format code wouldn't compile in .Net Core 3.1
1 parent b53ff70 commit 1f682fc

File tree

1 file changed

+3
-4
lines changed
  • CefSharp.Core.Runtime

1 file changed

+3
-4
lines changed

CefSharp.Core.Runtime/Cef.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,9 @@ namespace CefSharp
131131
{
132132
String^ get()
133133
{
134-
// Need explicit cast here to avoid C4965 warning when the minor version is zero.
135-
return String::Format("{0}.{1}.{2}.{3}",
136-
CHROME_VERSION_MAJOR, (Object^)CHROME_VERSION_MINOR,
137-
CHROME_VERSION_BUILD, CHROME_VERSION_PATCH);
134+
auto version = gcnew Version(CHROME_VERSION_MAJOR, CHROME_VERSION_MINOR, CHROME_VERSION_BUILD, CHROME_VERSION_PATCH);
135+
136+
return version->ToString();
138137
}
139138
}
140139

0 commit comments

Comments
 (0)