Microsoft.Toolkit.Win32 icon indicating copy to clipboard operation
Microsoft.Toolkit.Win32 copied to clipboard

Can't build projects in 'Debug' configuration

Open nxtn opened this issue 5 years ago • 50 comments

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.

nxtn avatar Aug 20 '20 07:08 nxtn

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 🙌

ghost avatar Aug 20 '20 07:08 ghost

@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?

marb2000 avatar Aug 24 '20 21:08 marb2000

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.

nxtn avatar Aug 25 '20 00:08 nxtn

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?

marb2000 avatar Aug 25 '20 21:08 marb2000

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.

nxtn avatar Aug 26 '20 02:08 nxtn

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 avatar Sep 10 '20 05:09 ghost

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 avatar Sep 25 '20 08:09 ghost

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.

tonyhallett avatar Sep 29 '20 07:09 tonyhallett

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 avatar Oct 14 '20 08:10 ghost

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 avatar Oct 29 '20 11:10 ghost

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 avatar Nov 13 '20 11:11 ghost

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 avatar Nov 28 '20 14:11 ghost

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 avatar Dec 13 '20 17:12 ghost

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 avatar Dec 28 '20 20:12 ghost

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 avatar Jan 12 '21 23:01 ghost

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 avatar Jan 28 '21 02:01 ghost

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 avatar Feb 12 '21 05:02 ghost

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 avatar Feb 27 '21 08:02 ghost

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 avatar Mar 14 '21 08:03 ghost

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 avatar Mar 29 '21 11:03 ghost

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 avatar Apr 13 '21 11:04 ghost

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 avatar Apr 28 '21 11:04 ghost

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 avatar May 13 '21 14:05 ghost

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 avatar May 28 '21 14:05 ghost

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 avatar Jun 12 '21 17:06 ghost

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 avatar Jun 27 '21 20:06 ghost

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 avatar Jul 12 '21 20:07 ghost

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 avatar Nov 03 '21 02:11 ghost

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 avatar Nov 18 '21 05:11 ghost

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 avatar Dec 03 '21 08:12 ghost