Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.0.100-rc.2.20471.7] Single File for OpenMU/HandyControl/TuringTrader target 5.0 app, tests failed #42665

Closed
jiangzeng01 opened this issue Sep 24, 2020 · 7 comments
Assignees
Milestone

Comments

@jiangzeng01
Copy link
Contributor

jiangzeng01 commented Sep 24, 2020

Application Names: OpenMU
OS: Windows 10 RS5
CPU: X64
.NET Build Number: 5.0.100-rc.2.20471.7
App Location: \appcompatsrv\Appcompat\DotNetCore\AppSource\SingleFileP0AppsTarget5\Apps\OpenMU-5.0
App Source: \appcompatsrv\Appcompat\DotNetCore\AppSource\SingleFileP0AppsTarget5\AppSources\OpenMU-5.0
DevDiv issue: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1218902

Repro steps:
Retarget 5.0
Single File exe was created by
dotnet publish MUnique.OpenMU.Startup.csproj -r win-x64 -p:PublishSingleFile=true --self-contained true
using 5.0.100-rc.2.20471.7 SDK
Copy '\appcompatsrv\Appcompat\DotNetCore\AppSource\SingleFileP0AppsTarget5\Apps\OpenMU-5.0' to local machine.
Double-click on MUnique.OpenMU.Startup.exe

Expected Result:
Open OpenMU app successful.

Actual Result:
The OpenMU app thrown exception and unable to start.

Findings:
According to the exception, we think it might be caused by related Pull Request:
#40974

Exception from command window for OpenMU:

Unhandled exception. System.TypeInitializationException: The type initializer for 'MUnique.OpenMU.Persistence.EntityFramework.ConnectionConfigurator' threw an exception.
 ---> System.NotSupportedException: CodeBase is not supported on assemblies loaded from a single-file bundle.
   at System.Reflection.RuntimeAssembly.get_CodeBase()
   at MUnique.OpenMU.Persistence.EntityFramework.ConnectionConfigurator.LoadSettings()
   at MUnique.OpenMU.Persistence.EntityFramework.ConnectionConfigurator..cctor()
   --- End of inner exception stack trace ---
   at MUnique.OpenMU.Persistence.EntityFramework.ConnectionConfigurator.Configure(DbContext context, DbContextOptionsBuilder optionsBuilder)
   at MUnique.OpenMU.Persistence.EntityFramework.EntityDataContext.OnConfiguring(DbContextOptionsBuilder optionsBuilder)
   at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
   at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies()
   at Microsoft.EntityFrameworkCore.DbContext.get_Model()
   at MUnique.OpenMU.Persistence.EntityFramework.GenericRepository`1..ctor(PersistenceContextProvider contextProvider)
   at MUnique.OpenMU.Persistence.EntityFramework.AccountRepository..ctor(PersistenceContextProvider contextProvider)
   at MUnique.OpenMU.Persistence.EntityFramework.RepositoryManager.RegisterRepositories(PersistenceContextProvider contextProvider)
   at MUnique.OpenMU.Persistence.EntityFramework.PersistenceContextProvider..ctor()
   at MUnique.OpenMU.Startup.Program.PrepareRepositoryManager(Boolean reinit, Boolean autoupdate)
   at MUnique.OpenMU.Startup.Program..ctor(String[] args)
   at MUnique.OpenMU.Startup.Program.Main(String[] args)

cc @dotnet-actwx-bot

@ghost
Copy link

ghost commented Sep 24, 2020

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

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Sep 24, 2020
@jiangzeng01
Copy link
Contributor Author

jiangzeng01 commented Sep 24, 2020

We have 3 failed apps effected by this PR: #40974
Effected 3 Apps:
OpenMU
HandyControl
TuringTrader

@LakshanF Please help to confirm if this is by design change.

@jiangzeng01 jiangzeng01 changed the title [5.0.100-rc.2.20471.7] Single File for OpenMU target 5.0 app, launch failed [5.0.100-rc.2.20471.7] Single File for OpenMU/HandyControl/TuringTrader target 5.0 app, tests failed Sep 24, 2020
@agocke
Copy link
Member

agocke commented Sep 28, 2020

Should be fixed by #42352

@agocke agocke removed the untriaged New issue has not been triaged by the area owner label Sep 28, 2020
@agocke agocke added this to the 5.0.0 milestone Sep 28, 2020
@agocke
Copy link
Member

agocke commented Oct 5, 2020

Fixed in #42352

@agocke agocke closed this as completed Oct 5, 2020
@jiangzeng01
Copy link
Contributor Author

@agocke We verified with both RC2 build: 5.0.100-rc.2.20480.7 and RTM build:5.0.100-rtm.20508.1, the issue is still happening with the same error log.
which .Net 5 release will the fix #42435 be located?

@agocke
Copy link
Member

agocke commented Oct 9, 2020

@jiangzeng01 Sorry, I should have been more detailed. For app compat, the apps may need to pass the IncludeAllContentForSelfExtract=true flag. That should be working in the latest 5.0 RTM builds.

Without that flag, apps may not work without modification to their source code.

@jiangzeng01
Copy link
Contributor Author

jiangzeng01 commented Oct 10, 2020

@agocke This issue is verified as fixed with 5.0 RTM.
But there are other issues for 2 of the apps when we continue:
OpenMU (Retarget 5.0): the same issue with target 3.1, #42570
TuringTrader (Retarget 5.0): new issue created, #43251

@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants