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

Compiling the solution with AnyCPU does not work #4161

Open
2 tasks
ArchieCoder opened this issue Aug 4, 2021 · 10 comments · Fixed by #3794
Open
2 tasks

Compiling the solution with AnyCPU does not work #4161

ArchieCoder opened this issue Aug 4, 2021 · 10 comments · Fixed by #3794
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior build 🔥 Completed 🔥

Comments

@ArchieCoder
Copy link
Contributor

Describe the bug

Compiling the project with the default configuration will lead to the following output:

image

  • Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:

Steps to Reproduce

  • Can this be reproduced in the Sample App? (Either in a sample as-is or with new XAML pasted in the editor.) If so, please provide custom XAML or steps to reproduce. If not, let us know why it can't be reproduced (e.g. more complex setup, environment, dependencies, etc...)

Steps to reproduce the behavior:

  1. Open solution
  2. Compile solution
  3. See error

Expected behavior

No error

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

NuGet Package(s):

Package Version(s):

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

App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [ ] May 2020 Update (19041)
- [ ] Insider Build (xxxxx)

Device form factor:
- [ ] Desktop
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

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

Additional context

Compiling manually the BackgroundTasks project fixes the issue.

@ArchieCoder ArchieCoder added the bug 🐛 An unexpected issue that highlights incorrect behavior label Aug 4, 2021
@ghost ghost added the needs triage 🔍 label Aug 4, 2021
@ghost
Copy link

ghost commented Aug 4, 2021

Hello ArchieCoder, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

@Rosuavio
Copy link
Contributor

Rosuavio commented Aug 5, 2021

I am having no problems building the solution. Could you share the output for the build from the output tab?

@ArchieCoder
Copy link
Contributor Author

@RosarioPulella [
output.txt
](url)

Steps:
1- Clone to a fresh folder
2- Build solution (there will be no error)
3- Open the Samples folder in the Solution Explorer and select Microsoft.Toolkit.Uwp.SampleApp then right click Build

Errors are shown in the output.txt file.

@Rosuavio
Copy link
Contributor

Rosuavio commented Aug 5, 2021

I am seeing the issue locally now, thanks @ArchieCoder.

@Rosuavio
Copy link
Contributor

Rosuavio commented Aug 5, 2021

@Nirmal4G I have a hunch this is related to recent project files refactor, can you help shed some light on this?

@azchohfi
Copy link
Contributor

azchohfi commented Aug 5, 2021

I don't think this is related to @Nirmal4G's work. UWP never supported AnyCPU as a target. You need to select a specific architecture. That is by design.
Is the underlying issue that the default solution configuration/platform when you freshly clone the repo is equal to Something/AnyCPU? Not sure how to change that.

@Nirmal4G
Copy link
Contributor

Nirmal4G commented Aug 5, 2021

Both @Rosuavio and @azchohfi are right. This might've been my updates to the solution file. But also, a side effect of fixing the solution config.

See that the BackgroundTasks project is skipped when Any CPU is selected in the attached build log.

9>------ Skipped Build: Project: Microsoft.Toolkit.Uwp.Samples.BackgroundTasks, Configuration: Debug Any CPU ------
9>Project not selected to build for this solution configuration

Let me check and report back!

@ArchieCoder
Copy link
Contributor Author

If WCT will never support Any CPU, it can be removed from the solution entirely.
image

@michael-hawker michael-hawker added this to the 7.1 milestone Aug 5, 2021
@ghost ghost added In-PR 🚀 and removed In-PR 🚀 labels Aug 5, 2021
@michael-hawker michael-hawker modified the milestones: 7.1, 7.2/8.0? Aug 31, 2021
@ghost ghost removed this from the 7.2/8.0? milestone Aug 31, 2021
@Nirmal4G
Copy link
Contributor

@ArchieCoder There were a few updates to solution file since then. Can you confirm if this is fixed in my PR #4234?

@ArchieCoder
Copy link
Contributor Author

@Nirmal4G Build succeeded on the first F6! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior build 🔥 Completed 🔥
Projects
None yet
5 participants