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

MicaEditor fails to compile when included in a different solution. #2

Open
ERmilburn02 opened this issue Oct 24, 2023 · 1 comment
Open

Comments

@ERmilburn02
Copy link

Problem

When attempting to include MicaEditor into a different solution, compilation fails because the project is hard-coded to expect the packages directory to always be at the same level as the MicaEditor directory.

Workaround

One simple solution to this, is to open the WinUIEditor solution and attempt to build MicaEditor inside there, although this isn't ideal for projects looking to include MicaEditor.

Solution

Editing the MicaEditor project file (MicaEditor.vcxproj) to swap out any references to ..\packages with $(SolutionDir)packages. This would then allow for the required packages to be successfully imported, no matter what solution MicaEditor is in.

Evidence

I have tested with a recreated copy of CsDemoWinUI3, as well as all the projects inside the WinUIEditor solution, and they all work.

@BreeceW
Copy link
Owner

BreeceW commented Jan 23, 2024

Thanks for trying this out. I looked into why the default template references NuGet packages relatively, and it is because a different solution won’t necessarily have NuGet packages in $(SolutionDir)Packages.

Sorry I hadn’t responded to this earlier. Now there is a NuGet package available for preview, so you do not have to build the project yourself.

If you still want to consume from another solution, NuGet suggests restoring the packages in the library solution first.

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

Successfully merging a pull request may close this issue.

2 participants