Open kmelmon opened 3 years ago
Having the same issue. I have already converted a WinForms base that also can host WPF windows/elements from core3.1 to net5. Looking to replace the WinForms shell with WinUI3 but having issues getting that and WPF/WinForms to play nice. Came across this sample and unable to get it working with the same error:
Error CS0006 Metadata file 'Xaml-Islands-Samples\Samples\Managed\UILibrary\bin\Debug\UILibrary.winmd' could not be found UWPApplication
Problem is still present.
.\build.ps1 WinForms
doesn't work either:
"C:\github\microsoft\Xaml-Islands-Samples\Samples\WinForms\WAP\WAP.wapproj" (ReBuild target) (1) ->
"C:\github\microsoft\Xaml-Islands-Samples\Samples\WinForms\WinForms_XAMLIslands_v1\WinForms_XAMLIslands_v1.csproj" (publish target) (2:6) ->
(_HandleFileConflictsForPublish target) ->
C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(112,5): error NETSDK1152: Found multipl
e publish output files with the same relative path: C:\github\microsoft\Xaml-Islands-Samples\Samples\Managed\UILibrary\bin\x64\Release\UILibrary\UILi
brary.xr.xml, C:\github\microsoft\Xaml-Islands-Samples\Samples\Managed\UILibrary\obj\x64\Release\UILibrary.xr.xml, C:\Users\jjaehrig\.nuget\packages\
microsoft.toolkit.win32.ui.xamlapplication\6.1.2\runtimes\win10-x64\native\Microsoft.Toolkit.Win32.UI.XamlHost.dll, C:\Users\jjaehrig\.nuget\packages
\microsoft.toolkit.win32.ui.xamlapplication\6.1.2\build\..\runtimes\win10-x64\native\Microsoft.Toolkit.Win32.UI.XamlHost.dll, C:\Users\jjaehrig\.nuge
t\packages\microsoft.toolkit.win32.ui.xamlapplication\6.1.2\runtimes\win10-x64\native\Microsoft.Toolkit.Win32.UI.XamlHost.pri, C:\Users\jjaehrig\.nug
et\packages\microsoft.toolkit.win32.ui.xamlapplication\6.1.2\build\..\runtimes\win10-x64\native\Microsoft.Toolkit.Win32.UI.XamlHost.pri, C:\Users\jja
ehrig\.nuget\packages\microsoft.toolkit.win32.ui.xamlapplication\6.1.2\lib\uap10.0\Microsoft.Toolkit.Win32.UI.XamlHost.winmd, C:\Users\jjaehrig\.nuge
t\packages\microsoft.toolkit.win32.ui.xamlapplication\6.1.2\build\..\lib\uap10.0\Microsoft.Toolkit.Win32.UI.XamlHost.winmd, C:\Users\jjaehrig\.nuget\
packages\microsoft.ui.xaml\2.4.0-prerelease.200113001\runtimes\win10-x64\native\Microsoft.UI.Xaml.dll, C:\github\microsoft\Xaml-Islands-Samples\Sampl
es\Managed\UWPApplication\bin\x64\Release\Microsoft.UI.Xaml.dll, C:\Users\jjaehrig\.nuget\packages\microsoft.ui.xaml\2.4.0-prerelease.200113001\runti
mes\win10-x64\native\Microsoft.UI.Xaml.pri, C:\github\microsoft\Xaml-Islands-Samples\Samples\Managed\UWPApplication\bin\x64\Release\Microsoft.UI.Xaml
.pri, C:\Users\jjaehrig\.nuget\packages\microsoft.ui.xaml\2.4.0-prerelease.200113001\lib\uap10.0\Microsoft.UI.Xaml.winmd, C:\github\microsoft\Xaml-Is
lands-Samples\Samples\Managed\UWPApplication\bin\x64\Release\Microsoft.UI.Xaml.winmd, C:\github\microsoft\Xaml-Islands-Samples\Samples\Native\Native_
SwapChainPanel_Comp\x64\Release\Native_SwapChainPanel_Comp\Native_SwapChainPanel_Comp.winmd, C:\github\microsoft\Xaml-Islands-Samples\Samples\Managed
\UWPApplication\bin\x64\Release\Native_SwapChainPanel_Comp.winmd, C:\github\microsoft\Xaml-Islands-Samples\Samples\Managed\UILibrary\bin\x64\Release\
UILibrary.winmd, C:\github\microsoft\Xaml-Islands-Samples\Samples\Managed\UWPApplication\bin\x64\Release\UILibrary.winmd, C:\github\microsoft\Xaml-Is
lands-Samples\Samples\Native\Native_SwapChainPanel_Comp\x64\Release\Native_SwapChainPanel_Comp\Native_SwapChainPanel_Comp.pdb, C:\github\microsoft\Xa
ml-Islands-Samples\Samples\Managed\UWPApplication\bin\x64\Release\Native_SwapChainPanel_Comp.pdb, C:\github\microsoft\Xaml-Islands-Samples\Samples\Na
tive\Native_SwapChainPanel_Comp\x64\Release\Native_SwapChainPanel_Comp\Native_SwapChainPanel_Comp.pri, C:\github\microsoft\Xaml-Islands-Samples\Sampl
es\Managed\UWPApplication\bin\x64\Release\Native_SwapChainPanel_Comp.pri, C:\github\microsoft\Xaml-Islands-Samples\Samples\Native\Native_SwapChainPan
el_Comp\x64\Release\Native_SwapChainPanel_Comp\Native_SwapChainPanel_Comp.dll, C:\github\microsoft\Xaml-Islands-Samples\Samples\Managed\UWPApplicatio
n\bin\x64\Release\Native_SwapChainPanel_Comp.dll, C:\github\microsoft\Xaml-Islands-Samples\Samples\Managed\UILibrary\bin\x64\Release\UILibrary.pdb, C
:\github\microsoft\Xaml-Islands-Samples\Samples\Managed\UWPApplication\bin\x64\Release\UILibrary.pdb, C:\github\microsoft\Xaml-Islands-Samples\Sample
s\Managed\UILibrary\bin\x64\Release\UILibrary.pri, C:\github\microsoft\Xaml-Islands-Samples\Samples\Managed\UWPApplication\bin\x64\Release\UILibrary.
pri. [C:\github\microsoft\Xaml-Islands-Samples\Samples\WinForms\WinForms_XAMLIslands_v1\WinForms_XAMLIslands_v1.csproj]
Nor das .\build.ps Native
Build FAILED.
"C:\github\microsoft\Xaml-Islands-Samples\Samples\Win32\SampleCppApp.Package\SampleCppApp.Package.wapproj" (ReBuild target) (1) ->
"C:\github\microsoft\Xaml-Islands-Samples\Samples\Win32\SampleCppApp\SampleCppApp.vcxproj" (build target) (2:9) ->
"C:\github\microsoft\Xaml-Islands-Samples\Samples\Native\SampleUserControl\SampleUserControl.vcxproj" (default target) (3:5) ->
(EnsureNuGetPackageBuildImports target) ->
C:\github\microsoft\Xaml-Islands-Samples\Samples\Native\SampleUserControl\SampleUserControl.vcxproj(171,5): error : This project references NuGet package(s) that are missing o
n this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\..\..\packages\Micr
osoft.Windows.CppWinRT.2.0.191111.2\build\native\Microsoft.Windows.CppWinRT.props.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.02
Trying to build WPF_XamlIslands_v1 solution on a fresh clone produces this build error:
XamlCompiler error WMC1006: Cannot resolve Assembly or Windows Metadata file 'D:\Xaml-Islands-Samples\Samples\Managed\UILibrary\bin\Debug\UILibrary.winmd' 2>CSC : error CS0006: Metadata file 'D:\Xaml-Islands-Samples\Samples\Managed\UILibrary\bin\Debug\UILibrary.winmd' could not be found