dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.16k stars 4.72k forks source link

[5.0.0-rc.1.20452.10 (x64)] Single File Publish issue on WPF APP Core 3.0 after retarget .NET5.0 #42672

Closed alvaro-vantis-pt closed 4 years ago

alvaro-vantis-pt commented 4 years ago

Description

WPF App does not launch after retarget from Core 3.1 to NET 5.0. App was retarget in Visual Studio Version 16.8.0 Preview 3.1

Normal published app can be launched. Only the Single file unable to launch

Single File was published with the following command on "x64 native tools command prompt for VS2019 Platform": dotnet publish -r win10-x64 -p:PublishSingleFile=true -c:Release

also tried with: dotnet publish -r win10-x64 -p:PublishSingleFile=true -c:Release -p:PublishTrimmed=false and same result.

The following exceptions were found in Application Event Log: `-

`-

Configuration

Windows 10 - Pro x64 `Get-ComputerInfo -Property *

WindowsBuildLabEx : 17763.1.amd64fre.rs5_release.180914-1434 WindowsCurrentVersion : 6.3 WindowsEditionId : ServerHyper WindowsInstallationType : Server Core WindowsInstallDateFromRegistry : 8/26/2020 4:17:11 PM WindowsProductId : 03612-029-0000043-76134 WindowsProductName : Hyper-V Server 2019 WindowsRegisteredOrganization : WindowsRegisteredOwner : WindowsSystemRoot : C:\Windows WindowsVersion : 1809 BiosCharacteristics : {7, 9, 11, 12...} BiosBIOSVersion : {HPE - 1, U30, HPE - 22200} BiosBuildNumber : BiosCaption : U30 BiosCodeSet : BiosCurrentLanguage : BiosDescription : U30 BiosEmbeddedControllerMajorVersion : 2 BiosEmbeddedControllerMinorVersion : 16 BiosFirmwareType : Uefi BiosIdentificationCode : BiosInstallableLanguages : BiosInstallDate : BiosLanguageEdition : BiosListOfLanguages : BiosManufacturer : HPE BiosName : U30 BiosOtherTargetOS : BiosPrimaryBIOS : True BiosReleaseDate : 4/8/2020 1:00:00 AM BiosSeralNumber : CZ202903RH BiosSMBIOSBIOSVersion : U30 BiosSMBIOSMajorVersion : 3 BiosSMBIOSMinorVersion : 2 BiosSMBIOSPresent : True BiosSoftwareElementState : Running BiosStatus : OK BiosSystemBiosMajorVersion : 2 BiosSystemBiosMinorVersion : 34 BiosTargetOperatingSystem : 0 BiosVersion : HPE - 1 CsAdminPasswordStatus : Unknown CsAutomaticManagedPagefile : True CsAutomaticResetBootOption : True CsAutomaticResetCapability : True CsBootOptionOnLimit : CsBootOptionOnWatchDog : CsBootROMSupported : True CsBootStatus : {0, 0, 0, 203...} CsBootupState : Normal boot CsCaption : PANDORA CsChassisBootupState : Safe CsChassisSKUNumber : CsCurrentTimeZone : 60 CsDaylightInEffect : True CsDescription : AT/AT COMPATIBLE CsDNSHostName : p*** CsDomain : **.local CsDomainRole : MemberServer CsEnableDaylightSavingsTime : True CsFrontPanelResetStatus : Unknown CsHypervisorPresent : True CsInfraredSupported : False CsInitialLoadInfo : CsInstallDate : CsKeyboardPasswordStatus : Unknown CsLastLoadInfo : CsManufacturer : HPE CsModel : ProLiant DL380 Gen10 CsName : P** CsNetworkAdapters : {Ethernet, Embedded LOM 1 Port 3, Embedded LOM 1 Port 1, Embedded LOM 1 Port 4...} CsNetworkServerModeEnabled : True CsNumberOfLogicalProcessors : 16 CsNumberOfProcessors : 1 CsProcessors : {Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz} CsOEMStringArray : {PSF: , Product ID: P06420-B21, OEM String: } CsPartOfDomain : True CsPauseAfterReset : -1 CsPCSystemType : EnterpriseServer CsPCSystemTypeEx : EnterpriseServer CsPowerManagementCapabilities : CsPowerManagementSupported : CsPowerOnPasswordStatus : Unknown CsPowerState : Unknown CsPowerSupplyState : Safe CsPrimaryOwnerContact : CsPrimaryOwnerName : CsResetCapability : Other CsResetCount : -1 CsResetLimit : -1 CsRoles : {LM_Workstation, LM_Server, NT, Server_NT} CsStatus : OK CsSupportContactDescription : CsSystemFamily : ProLiant CsSystemSKUNumber : P06420-B21 CsSystemType : x64-based PC CsThermalState : Safe CsTotalPhysicalMemory : 34000547840 CsPhyicallyInstalledMemory : 33554432 CsUserName : CsWakeUpType : PowerSwitch CsWorkgroup : OsName : Microsoft Hyper-V Server OsType : WINNT OsOperatingSystemSKU : MicrosoftHyperVServer OsVersion : 10.0.17763 OsCSDVersion : OsBuildNumber : 17763 OsHotFixes : {KB4570720, KB4494174, KB4512577, KB4566424...} OsBootDevice : \Device\HarddiskVolume1 OsSystemDevice : \Device\HarddiskVolume3 OsSystemDirectory : C:\Windows\system32 OsSystemDrive : C: OsWindowsDirectory : C:\Windows OsCountryCode : 1 OsCurrentTimeZone : 60 OsLocaleID : 0409 OsLocale : en-US OsLocalDateTime : 9/24/2020 10:15:11 AM OsLastBootUpTime : 9/14/2020 11:17:08 AM OsUptime : 9.22:58:02.6607450 OsBuildType : Multiprocessor Free OsCodeSet : 1252 OsDataExecutionPreventionAvailable : True OsDataExecutionPrevention32BitApplications : True OsDataExecutionPreventionDrivers : True OsDataExecutionPreventionSupportPolicy : OptOut OsDebug : False OsDistributed : False OsEncryptionLevel : 256 OsForegroundApplicationBoost : Maximum OsTotalVisibleMemorySize : 33203660 OsFreePhysicalMemory : 8554228 OsTotalVirtualMemorySize : 38184396 OsFreeVirtualMemory : 13422728 OsInUseVirtualMemory : 24761668 OsTotalSwapSpaceSize : OsSizeStoredInPagingFiles : 4980736 OsFreeSpaceInPagingFiles : 4846384 OsPagingFiles : {C:\pagefile.sys} OsHardwareAbstractionLayer : 10.0.17763.1369 OsInstallDate : 8/26/2020 5:17:11 PM OsManufacturer : Microsoft Corporation OsMaxNumberOfProcesses : 4294967295 OsMaxProcessMemorySize : 137438953344 OsMuiLanguages : {en-US} OsNumberOfLicensedUsers : 0 OsNumberOfProcesses : 82 OsNumberOfUsers : 10 OsOrganization : OsArchitecture : 64-bit OsLanguage : en-US OsProductSuites : {TerminalServicesSingleSession} OsOtherTypeDescription : OsPAEEnabled : OsPortableOperatingSystem : False OsPrimary : True OsProductType : Server OsRegisteredUser : OsSerialNumber : 03612-029-0000043-76134 OsServicePackMajorVersion : 0 OsServicePackMinorVersion : 0 OsStatus : OK OsSuites : {TerminalServices, TerminalServicesSingleSession} OsServerLevel : ServerCore KeyboardLayout : TimeZone : (UTC+00:00) Dublin, Edinburgh, Lisbon, London LogonServer : PowerPlatformRole : EnterpriseServer HyperVisorPresent : True HyperVRequirementDataExecutionPreventionAvailable : HyperVRequirementSecondLevelAddressTranslation : HyperVRequirementVirtualizationFirmwareEnabled : HyperVRequirementVMMonitorModeExtensions : DeviceGuardSmartStatus : Off DeviceGuardRequiredSecurityProperties : {0} DeviceGuardAvailableSecurityProperties : {BaseVirtualizationSupport, DMAProtection, SecureMemoryOverwrite, 5...} DeviceGuardSecurityServicesConfigured : {0} DeviceGuardSecurityServicesRunning : {0} DeviceGuardCodeIntegrityPolicyEnforcementStatus : DeviceGuardUserModeCodeIntegrityPolicyEnforcementStatus : `

It works fine in .NET Core 3.1

ghost commented 4 years ago

Tagging subscribers to this area: @safern, @viktorhofer See info in area-owners.md if you want to be subscribed.

ghost commented 4 years ago

Tagging subscribers to this area: @agocke See info in area-owners.md if you want to be subscribed.

agocke commented 4 years ago

Dup of https://github.com/dotnet/runtime/issues/38636, this should be fixed in RC2.

alvaro-vantis-pt commented 4 years ago

Just to give a feedback. I've tried RC2 from latest build on GITHUB and it worked as expected.