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

.Net Framework 4.7.2, XAML not working for EXE #369

Open
barkermn01 opened this issue Aug 11, 2024 · 3 comments
Open

.Net Framework 4.7.2, XAML not working for EXE #369

barkermn01 opened this issue Aug 11, 2024 · 3 comments

Comments

@barkermn01
Copy link

barkermn01 commented Aug 11, 2024

Using it to pack DLL's into an EXE and for some reason it's not working when i try and run the app i just get think it might be because it's using mainwindow.xaml and not MainWindow.xaml it's about the only thing i can think it could be.

System.IO.IOException: Cannot locate resource 'mainwindow.xaml'.
   at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
   at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
   at System.Windows.Application.LoadComponent(Uri resourceLocator, Boolean bSkipJournaledProperties)
   at System.Windows.Application.DoStartup()

I'm running it like this:

/log /verbose /pause /targetplatform:v4 /out:Memoria.Launcher.Merged.exe Memoria.Launcher.exe ZstdSharp.dll SharpCompress.dll System.Buffers.dll System.Memory.dll System.Numerics.Vectors.dll System.Runtime.CompilerServices.Unsafe.dll System.Text.Encoding.CodePages.dll **System.Threading.Tasks.Extensions.dll

I have tried not using the `/targetplatform' as well same problem

In the /verbos /log does tell me it has packaged the MainWindow.

Processing XAML resource paths ...
 - Patching type Memoria.Launcher.AdvOptionsWindow
 - Patching type Memoria.Launcher.UiModManagerButton
 - Patching type Memoria.Launcher.MainWindow
 - Patching type Memoria.Launcher.UiLauncherButton
 - Patching type Memoria.Launcher.ModConflictWindow
 - Patching type Memoria.Launcher.ModManagerWindow

Code is: https://github.com/barkermn01/Memoria/tree/feature/archives

The build command is part of our Memoria.MSBuild Project in Pack.cs

@barkermn01 barkermn01 changed the title .Net Framework 4.7.2 .Net Framework 4.7.2, XAML not working for EXE Aug 11, 2024
@KirillOsenkov
Copy link
Collaborator

I tried to build it, but the build fails, References\UnityEnginer.dll is missing

If you'd like my help, you'll have to provide an easy to run self-contained repro (ideally a zip file with run.cmd that I can unpack and run to get the exact same command line as you)

@KirillOsenkov
Copy link
Collaborator

Memoria.Launcher doesn't seem to properly reference NuGet packages. If you clone the repo on a new machine it will fail to build. Long term my recommendation is to convert all projects to SDK-style and use PackageReference so that the build is reproducible on any machine.

@barkermn01
Copy link
Author

Memoria.Launcher doesn't seem to properly reference NuGet packages. If you clone the repo on a new machine it will fail to build. Long term my recommendation is to convert all projects to SDK-style and use PackageReference so that the build is reproducible on any machine.

not sure what i you mean i have change the code since then so it's using MSBuild's AfterResolveReferences, and a OnResolveAssembly hook. and it works correctly, but those packages were all installed using the NuGet UI in VS2022 and all from installing SharpCompress so i have no idea what is breaking NuGet from downloading on build.

I tried to build it, but the build fails, References\UnityEnginer.dll is missing

Is because to compile the system you have to have Final Fantasy 9 installed and run the installer script to copy the DLL's we're not allowed to share as that would be piracy and team members have agreements with publisher hence why we don't ship those DLL files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants