-
-
Notifications
You must be signed in to change notification settings - Fork 226
Closed
Labels
Description
Package
Sentry
.NET Flavor
.NET
.NET Version
8.0.12
OS
Windows
SDK Version
5.0.1
Self-Hosted Sentry Version
No response
Steps to Reproduce
(Please find a minimal project attached below.)
- In Visual Studio 2022, create a
Blank App, Packaged (WinUI 3 in Desktop), and add Sentry 5.0.1 as a NuGet package. Set the project to Release mode and apply Native AoT (right-click project > Properties > Build > Publish > enable Publish native AOT). - Add the WinUI (with trimming) code to the project.
- Package the project (right-click project > Package and publish > Create App Packages, and create a Release x64 MSIX binary).
During the Release build, after mentioning Generating native code, the build log will output the following warning: LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
I was able to discover this by using PowerShell:
cd "C:\Users\User\source\repos\Project\src\Project"
Get-ChildItem -Recurse | Select-String "msvcrt" -List | Select Path | Format-List *
Path : C:\Users\User\source\repos\Project\src\Project\bin\ARM64\Release\net8.0-windows10.0.26100.0\win-arm64\Sentry.dll
Path : C:\Users\User\source\repos\Project\src\Project\bin\Release\net8.0-windows10.0.26100.0\win-arm64\publish\Sentry.dll
Path : C:\Users\User\source\repos\Project\src\Project\bin\Release\net8.0-windows10.0.26100.0\win-x64\publish\project.exe
Path : C:\Users\User\source\repos\Project\src\Project\bin\Release\net8.0-windows10.0.26100.0\win-x64\publish\project.pdb
Path : C:\Users\User\source\repos\Project\src\Project\bin\x64\Debug\net8.0-windows10.0.26100.0\win-x64\Sentry.dll
Path : C:\Users\User\source\repos\Project\src\Project\bin\x64\Debug\net8.0-windows10.0.26100.0\win-x64\AppX\Sentry.dll
Path : C:\Users\User\source\repos\Project\src\Project\bin\x64\Release\net8.0-windows10.0.26100.0\win-x64\Sentry.dll
Path : C:\Users\User\source\repos\Project\src\Project\bin\x64\Release\net8.0-windows10.0.26100.0\win-x64\AppX\Sentry.dll
Path : C:\Users\User\source\repos\Project\src\Project\bin\x64\Release\net8.0-windows10.0.26100.0\win-x64\native\project.exe
Path : C:\Users\User\source\repos\Project\src\Project\bin\x64\Release\net8.0-windows10.0.26100.0\win-x64\native\project.pdb
Path : C:\Users\User\source\repos\Project\src\Project\obj\ARM64\Release\net8.0-windows10.0.26100.0\win-arm64\linked\Sentry.dll
Path : C:\Users\User\source\repos\Project\src\Project\obj\ARM64\Release\net8.0-windows10.0.26100.0\win-arm64\R2R\Sentry.dll
Path : C:\Users\User\source\repos\Project\src\Project\obj\x64\Release\net8.0-windows10.0.26100.0\win-x64\linked\Sentry.dll
Path : C:\Users\User\source\repos\Project\src\Project\obj\x64\Release\net8.0-windows10.0.26100.0\win-x64\native\project.obj
Path : C:\Users\User\source\repos\Project\src\Project\obj\x64\Release\net8.0-windows10.0.26100.0\win-x64\R2R\Sentry.dll
Expected Result
No warning should appear in the build log.
Actual Result
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
Metadata
Metadata
Assignees
Labels
Projects
Status
Done
Status
Waiting for: Product Owner