Skip to content

UnitTests.XamlIslands.Package build fails when AnyCPU configuration is selected #3599

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

Closed
alvinashcraft opened this issue Dec 4, 2020 · 3 comments · Fixed by #3601
Closed
Assignees
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior build 🔥 Completed 🔥
Milestone

Comments

@alvinashcraft
Copy link
Contributor

Describe the bug

When building the toolkit solution with the Debug/AnyCPU configuration selected, the UnitTests.XamlIslands.Package project fails with two errors:

  1. MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:<path to WCT>\WindowsCommunityToolkit\UnitTests\UnitTests.XamlIslands\bin\x86\Debug\netcoreapp3.1\UnitTests.XamlIslands.dll", "x86". This mismatch may cause runtime failures...
  2. MSB3779: The processor architecture of the project being built "Any CPU" is not supported by the referenced SDK "Microsoft.VCLibs, Version=14.0". Please consider changing the targeted processor architecture of your project...
  • [ ?] Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:
    Unknown. This is my first time building the solution in a several months.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Given the following environment Windows 10 20H2, VS2019.
  2. Select Debug and AnyCPU for build configuration.
  3. Build the solution.
  4. See errors above.

Expected behavior

Build should succeed for any of the available build configs.

Screenshots

image

Environment


Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [ ] May 2020 Update (19041)
- [x] Version 20H2 (19042.630)
- [ ] Insider Build (build number: )

Visual Studio 
- [ ] 2017 (version: )
- [ x] 2019 (version: 16.8.2) 
- [ ] 2019 Preview (version: )

Additional context

Some other projects target x86 for the AnyCPU config. I'm thinking that this would be the fix for this unit test project.

@alvinashcraft alvinashcraft added the bug 🐛 An unexpected issue that highlights incorrect behavior label Dec 4, 2020
@alvinashcraft
Copy link
Contributor Author

I can take this on and prepare a PR.

@michael-hawker
Copy link
Member

Thanks @alvinashcraft! Hopefully just a matter of tweaking the default config checkboxes for that project. Keep us posted!

alvinashcraft referenced this issue in alvinashcraft/WindowsCommunityToolkit Dec 4, 2020
Fix Debug AnyCPU config for XamlIslands.Package unit test project so it builds x86.
@ghost ghost added the In-PR 🚀 label Dec 4, 2020
@ghost ghost closed this as completed in #3601 Dec 8, 2020
ghost pushed a commit that referenced this issue Dec 8, 2020
Fix Debug AnyCPU config for XamlIslands.Package unit test project so it builds for x86.

<!-- 🚨 Please Do Not skip any instructions and information mentioned below as they are all required and essential to evaluate and test the PR. By fulfilling all the required information you will be able to reduce the volume of questions and most likely help merge the PR faster 🚨 -->

<!-- 📝 It is preferred if you keep the "☑️ Allow edits by maintainers" checked in the Pull Request Template as it increases collaboration with the Toolkit maintainers by permitting commits to your PR branch (only) created from your fork.  This can let us quickly make fixes for minor typos or forgotten StyleCop issues during review without needing to wait on you doing extra work. Let us help you help us! 🎉 -->


## Fixes #
<!-- Add the relevant issue number after the "#" mentioned above (for ex: Fixes #1234) which will automatically close the issue once the PR is merged. -->

Fixes #3599 

<!-- Add a brief overview here of the feature/bug & fix. -->

Updated the Debug|AnyCPU config for UnitTests.XamlIslands.Package to build for x86. This is what it was doing for Release|AnyCPU.

## PR Type
What kind of change does this PR introduce?
<!-- Please uncomment one or more that apply to this PR. -->

<!-- - Bugfix -->
<!-- - Feature -->
<!-- - Code style update (formatting) -->
<!-- - Refactoring (no functional changes, no api changes) -->
- Build or CI related changes
<!-- - Documentation content changes -->
<!-- - Sample app changes -->
<!-- - Other... Please describe: -->


## What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
Build fails for Debug|AnyCPU

## What is the new behavior?
<!-- Describe how was this issue resolved or changed? -->
Build succeeds for Debug|AnyCPU

## PR Checklist

Please check if your PR fulfills the following requirements:

- [ ] Tested code with current [supported SDKs](../readme.md#supported)
- [ ] Pull Request has been submitted to the documentation repository [instructions](..\contributing.md#docs). Link: <!-- docs PR link -->
- [ ] Sample in sample app has been added / updated (for bug fixes / features)
    - [ ] Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/windows-toolkit/WindowsCommunityToolkit-design-assets)
- [ ] Tests for the changes have been added (for bug fixes / features) (if applicable)
- [ ] Header has been added to all new source files (run *build/UpdateHeaders.bat*)
- [x ] Contains **NO** breaking changes

<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. 
     Please note that breaking changes are likely to be rejected within minor release cycles or held until major versions. -->


## Other information
VS2019 rearranged a bunch of the other project configs in the solution file. Feel free to reject everything but the changes on lines 751-753.
@ghost ghost added Completed 🔥 and removed In-PR 🚀 labels Dec 8, 2020
@michael-hawker
Copy link
Member

Thanks @alvinashcraft for finding and fixing this! 🎉🎉🎉

@ghost ghost locked as resolved and limited conversation to collaborators Feb 7, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior build 🔥 Completed 🔥
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants