CommunityToolkit / Microsoft.Toolkit.Win32

ARCHIVE - This repository contained XAML Islands wrapper controls and tooling for XAML Islands with WinUI 2, see readme for more info about XAML Islands with WinUI 3 and the WindowsAppSDK.
https://aka.ms/windowsappsdk
Other
383 stars 89 forks source link

Can't build projects in 'Debug' configuration #285

Closed nxtn closed 1 year ago

nxtn commented 4 years ago

I encountered some errors while trying to build a sample project with Visual Studio.

1>cl : command line error D8016: '/ZI' and '/guard:cf' command-line options are incompatible
1>C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\XamlCompiler\Microsoft.Windows.UI.Xaml.Common.targets(482,5): error MSB4181: The "CompileXaml" task returned false but did not log an error.
8>GENERATEPROJECTPRIFILE : error : PRI175: 0x80070002 - Processing Resources failed with error: The system cannot find the file specified.
8>GENERATEPROJECTPRIFILE : error : PRI252: 0xdef00071 - File Microsoft.Toolkit.Win32\x64\Debug\Microsoft.Toolkit.Win32.UI.XamlApplication\Microsoft.Toolkit.Win32.UI.XamlHost.pri not found.

Complete logs:

1>Processing input metadata file Microsoft.Toolkit.Win32\x64\Debug\Microsoft.Toolkit.Win32.UI.XamlApplication\Unmerged\XamlApplication.winmd.
1>Saved output metadata file Microsoft.Toolkit.Win32.UI.XamlHost.winmd.
1>Validating metadata file Microsoft.Toolkit.Win32\x64\Debug\Microsoft.Toolkit.Win32.UI.XamlApplication\Merged\Microsoft.Toolkit.Win32.UI.XamlHost.winmd.
2>Microsoft.Toolkit.Wpf.UI.Controls.WebView -> Microsoft.Toolkit.Win32\Microsoft.Toolkit.Wpf.UI.Controls.WebView\bin\x64\Debug\netcoreapp3.0\Microsoft.Toolkit.Wpf.UI.Controls.WebView.dll
2>Microsoft.Toolkit.Wpf.UI.Controls.WebView -> Microsoft.Toolkit.Win32\Microsoft.Toolkit.Wpf.UI.Controls.WebView\bin\x64\Debug\net462\Microsoft.Toolkit.Wpf.UI.Controls.WebView.dll
1>cl : command line error D8016: '/ZI' and '/guard:cf' command-line options are incompatible
1>C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\XamlCompiler\Microsoft.Windows.UI.Xaml.Common.targets(482,5): error MSB4181: The "CompileXaml" task returned false but did not log an error.
1>Done building project "Microsoft.Toolkit.Win32.UI.XamlApplication.vcxproj" -- FAILED.
3>------ Rebuild All started: Project: Microsoft.Toolkit.Win32.UI.XamlApplication.Package, Configuration: Debug x64 ------
3>Microsoft.Toolkit.Win32.UI.XamlApplication.Package -> Microsoft.Toolkit.Win32\Microsoft.Toolkit.Win32.UI.XamlApplication.Package\bin\x64\Debug\net462\Microsoft.Toolkit.UI.XamlApplication.Package.dll
3>Microsoft.Toolkit.Win32.UI.XamlApplication.Package -> Microsoft.Toolkit.Win32\Microsoft.Toolkit.Win32.UI.XamlApplication.Package\bin\x64\Debug\netcoreapp3.0\Microsoft.Toolkit.UI.XamlApplication.Package.dll
4>------ Rebuild All started: Project: Microsoft.Toolkit.Win32.UI.SDK, Configuration: Debug Any CPU ------
4>.nuget\packages\microsoft.vcrtforwarders.140\1.0.6\build\net45\Microsoft.VCRTForwarders.140.targets(91,9): warning :  Because your app is being built as AnyCPU no Microsoft.VCRTForwarders.140 DLLs were copied to your ouput folder. Microsoft.VCRTForwarders.140 only supports x86, x64, or arm64 applications due to a C++ Runtime dependency. Please change your app project architecture to x86, x64, or arm64 in the Configuration Manager.
4>.nuget\packages\microsoft.vcrtforwarders.140\1.0.6\build\netcoreapp2.0\Microsoft.VCRTForwarders.140.targets(91,9): warning :  Because your app is being built as AnyCPU no Microsoft.VCRTForwarders.140 DLLs were copied to your ouput folder. Microsoft.VCRTForwarders.140 only supports x86, x64, or arm64 applications due to a C++ Runtime dependency. Please change your app project architecture to x86, x64, or arm64 in the Configuration Manager.
4>Microsoft.Toolkit.Win32.UI.SDK -> Microsoft.Toolkit.Win32\Microsoft.Toolkit.Win32.UI.Tools\bin\AnyCPU\Debug\net462\Microsoft.Toolkit.Win32.Tasks.dll
4>Microsoft.Toolkit.Win32.UI.SDK -> Microsoft.Toolkit.Win32\Microsoft.Toolkit.Win32.UI.Tools\bin\AnyCPU\Debug\netcoreapp3.0\Microsoft.Toolkit.Win32.Tasks.dll
4>Done building project "Microsoft.Toolkit.Win32.UI.SDK.csproj".
5>------ Rebuild All started: Project: Microsoft.Toolkit.Win32.UI.XamlHost.Managed, Configuration: Debug x64 ------
5>You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
5>Microsoft.Toolkit.Win32.UI.XamlHost.Managed -> Microsoft.Toolkit.Win32\Microsoft.Toolkit.Win32.UI.XamlHost\bin\x64\Debug\net462\Microsoft.Toolkit.Win32.UI.XamlHost.Managed.dll
5>Microsoft.Toolkit.Win32.UI.XamlHost.Managed -> Microsoft.Toolkit.Win32\Microsoft.Toolkit.Win32.UI.XamlHost\bin\x64\Debug\netcoreapp3.0\Microsoft.Toolkit.Win32.UI.XamlHost.Managed.dll
6>------ Rebuild All started: Project: Microsoft.Toolkit.Wpf.UI.XamlHost, Configuration: Debug x64 ------
6>Microsoft.Toolkit.Wpf.UI.XamlHost -> Microsoft.Toolkit.Win32\Microsoft.Toolkit.Wpf.UI.XamlHost\bin\x64\Debug\netcoreapp3.0\Microsoft.Toolkit.Wpf.UI.XamlHost.dll
6>Microsoft.Toolkit.Wpf.UI.XamlHost -> Microsoft.Toolkit.Win32\Microsoft.Toolkit.Wpf.UI.XamlHost\bin\x64\Debug\net462\Microsoft.Toolkit.Wpf.UI.XamlHost.dll
7>------ Rebuild All started: Project: Microsoft.Toolkit.Wpf.UI.Controls, Configuration: Debug x64 ------
7>Microsoft.Toolkit.Wpf.UI.Controls -> Microsoft.Toolkit.Win32\Microsoft.Toolkit.Wpf.UI.Controls\bin\x64\Debug\netcoreapp3.0\Microsoft.Toolkit.Wpf.UI.Controls.dll
7>Microsoft.Toolkit.Wpf.UI.Controls -> Microsoft.Toolkit.Win32\Microsoft.Toolkit.Wpf.UI.Controls\bin\x64\Debug\net462\Microsoft.Toolkit.Wpf.UI.Controls.dll
8>------ Rebuild All started: Project: Microsoft.Toolkit.Sample.Wpf.App, Configuration: Debug x64 ------
8>Microsoft.Toolkit.Sample.Wpf.App -> Microsoft.Toolkit.Win32\Microsoft.Toolkit.Sample.Wpf.App\bin\x64\Debug\net462\Microsoft.Toolkit.Sample.Wpf.App.exe
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2085,5): warning MSB3277: Found conflicts between different versions of "System.IO.Pipes.AccessControl" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
8>Microsoft.Toolkit.Sample.UWP.App -> Microsoft.Toolkit.Win32\Microsoft.Toolkit.Sample.UWP.App\bin\x64\Debug\Microsoft.Toolkit.Sample.UWP.App.exe
8>GENERATEPROJECTPRIFILE : error : PRI175: 0x80070002 - Processing Resources failed with error: The system cannot find the file specified.
8>GENERATEPROJECTPRIFILE : error : PRI252: 0xdef00071 - File Microsoft.Toolkit.Win32\x64\Debug\Microsoft.Toolkit.Win32.UI.XamlApplication\Microsoft.Toolkit.Win32.UI.XamlHost.pri not found.
8>Done building project "Microsoft.Toolkit.Sample.UWP.App.csproj" -- FAILED.
8>Done building project "Microsoft.Toolkit.Sample.Wpf.App.csproj" -- FAILED.
========== Rebuild All: 6 succeeded, 2 failed, 0 skipped ==========

Build.bat output:

========================================
Build
========================================
Executing task: Build

Building Solution
Creating directory Microsoft.Toolkit.Win32/bin/nupkg

Restore Native Step
All packages listed in packages.config are already installed.

Restore x64 Step
An error occurred when executing task 'Build'.
Error: One or more errors occurred.
        MSBuild: Could not locate executable.
ghost commented 4 years ago

Hello NextTurn, thank you for your interest in Win32!

I have automatically added a "needs triage" label to help get things started. Our team will look into the question and answer ASAP. Other community members may also answer the question and provide feedback 🙌

marb2000 commented 4 years ago

@NextTurn, thanks for using XAML Islands.

I don't get your question, can you help me out to understand it? What do you mean by building the project locally?

nxtn commented 4 years ago

Hi @marb2000, I need some guidelines for building Microsoft.Toolkit.Win32.sln on my machine, like this: https://github.com/dotnet/runtime/tree/master/docs/workflow/building/libraries.

marb2000 commented 4 years ago

Thanks for the clarification @NextTurn. No sure if we can build outside of the Visual Studio environment. @ocalvo any thoughts her? Can we build library from the Developer Command Prompt?

nxtn commented 4 years ago

Sorry for the confusions @marb2000. I do prefer to build with Visual Studio and I know that this repo is using Developer Command Prompt during CI.

I've narrowed down this issue a bit. It seems that the solution can only be built in 'Release' configuration. Not a big deal though.

ghost commented 4 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

tonyhallett commented 3 years ago

The powershell build file has a comment that suggests that you can supply a Debug configuration but the cake file does not look for any such argument only the target.

Even if you change the cake file accordingly the solution does not build in debug configuration. If you want to debug then add

#define DEBUG

before any using statements.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 3 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 2 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.