Avalonia.Win32 is blocked as a "virus" [RESOLVED]
See original GitHub issueDescribe the bug
Some of my users are getting this exception on startup:
System.IO.FileLoadException: Could not load file or
assembly 'Avalonia.Win32, Version=0.10.3.0, Culture=neutral,
PublicKeyToken=c8d484a7012f9a8b'. Operation did not complete successfully
because the file contains a virus or potentially unwanted software.
(0x800700E1)
at
Avalonia.AppBuilderDesktopExtensions.LoadWin32[TAppBuilder](TAppBuilder
builder)
at
Avalonia.AppBuilderDesktopExtensions.UsePlatformDetect[TAppBuilder](TAppBuilder
builder) in /_/src/Avalonia.Desktop/AppBuilderDesktopExtensions.cs:line 23
at Bulk_Edit_Calendar_Events_WPF.Program.BuildAvaloniaApp() in
C:\Users\derek\source\repos\Bulk Edit Calendar Events\Code\Bulk Edit
Calendar Events_WPF\Program.cs:line 54
at Bulk_Edit_Calendar_Events_WPF.Program.Main(String[] args) in
C:\Users\derek\source\repos\Bulk Edit Calendar Events\Code\Bulk Edit
Calendar Events_WPF\Program.cs:line 26
This is coming from the:
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.LogToTrace()
.With(new AvaloniaNativePlatformOptions { UseGpu = false });
Since the exception message contains the “virus” warning, I think this is Windows Defender (as opposed to some 3rd party virus software). Are there changes that can be made to Avalonia.Win32 to make it “ok” for Windows Defender? This seems like a big issue if Windows Defender is going to start blocking all Avalonia applications.
Desktop (please complete the following information):
Here’s what I know about what the user has set up:
- OS: Windows 10 Home & Windows 10 Pro
- Version 0.10.3
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:24 (1 by maintainers)
Top Results From Across the Web
Virus alert about the Win32/Conficker worm
Describes ways to detect and clean a system that has the Win32/Conficker worm. ... This site may be blocked because of the malware...
Read more >Avalonia.Win32 11.0.4
Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as...
Read more >How to Remove SettingsModifier:Win32/HostsFileHijack
But you'll want to consider how to get rid of a virus if you're ... If you want to also block the entries...
Read more >HackTool:Win32/Keygen malware – Virus removal guide
HackTool:Win32/Keygen is a malware that can infect a computer through the use of cracks or key generators to activate premium software.
Read more >FalsePositive on Silverlight.exe (Virus/Win32.slugin.ozi ID
In our ThreatLog we can see that the file Silverlight.exe is beeing blocked because it is identified as Virus/Win32.slugin.ozi ID: 2044771. We are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I submitted the files to Microsoft Security. Avalonia.Themes.Default.dll has been removed from misidentification and should be available in the next Windows Defender definition.
Avalonia.Win32.dll is still pending (they could not repro so I added a dump of support files from Windows Defender)
For people that find this issue, you can get the latest definition by opening Windows Defender (also listed as "Windows Security), going to “Virus & Threat protection”, and “Check for updates” under “Virus & threat protection updates”. You can also force a refresh of your cache by running the following from an admin command prompt:
This issue is FIXED (see above comments on how Microsoft Security has cleared the files and how your users can fix their Defender cache). However, since more people might continue hitting this, I’m going to reopen it for easier visibility and so people don’t create new issues (probably can be closed in a few days).