Skip to content

Requesting help with building the repo #2866

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
Const-me opened this issue Apr 9, 2020 · 5 comments
Closed

Requesting help with building the repo #2866

Const-me opened this issue Apr 9, 2020 · 5 comments
Labels
Question General question, not a problem in source code or documentation (yet)

Comments

@Const-me
Copy link

Const-me commented Apr 9, 2020

Actual behavior:

build.cmd fails, prints pages of messages like this: C:\Temp\wpf\src\Microsoft.DotNet.Wpf\src\DirectWriteForwarder\DirectWriteForwarder.vcxproj(28,5): error MSB4019: The im ported project "C:\Temp\wpf\.tools\msbuild\16.5.0-alpha\tools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.Default.props" wa s not found. Confirm that the expression in the Import declaration "C:\Temp\wpf\.tools\msbuild\16.5.0-alpha\tools\MSBui ld\Microsoft\VC\v160\\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.

I've checked and indeed, there's no VC directory in that location. Your build.cmd has downloaded the msbuild with the following subfolders in MSBuild\Microsoft:

Microsoft.NET.Build.Extensions
NuGet
VisualStudio

None of them contains Microsoft.Cpp.Default.props file.

Expected behavior:

Built.cmd should work.

Minimal repro:

Not available. Checkout the repository.

@vatsan-madhavan
Copy link
Member

vatsan-madhavan commented Apr 9, 2020

Have you installed the workloads outlined at https://github.com/dotnet/wpf/blob/master/Documentation/developer-guide.md#machine-setup ?

Fixing up the title. You may not be able to build yet, but the build not broken. We hope you will be able to build soon.

@vatsan-madhavan vatsan-madhavan added the Question General question, not a problem in source code or documentation (yet) label Apr 9, 2020
@vatsan-madhavan vatsan-madhavan changed the title The build is broken. Requesting help with building the repo Apr 9, 2020
@Const-me
Copy link
Author

@vatsan-madhavan Thanks for your help. Indeed, I had couple VS2019 components missing.

However, I think you should fix a few things.

  1. “Follow the Building CoreFX on Windows instructions.” link on this page is broken with HTTP 404:
    https://github.com/dotnet/wpf/blob/master/Documentation/developer-guide.md#machine-setup Web archive has a copy, but that version is for VS2017, I'm not sure if it's good enough.

Probably for this reason, I’m unable to open visual studio projects, i.e. can only build from command-line. This is less than ideal, the main reason why I was setting this up is to use the IDE. BTW, my ultimate goal is fix this this issue in WPF, and I was thinking about replacing D3DImage framework class with a custom equivalent.

  1. When your setup script fails to detect VS2019 with required components, it downloads and unpacks this ZIP: https://dotnet.myget.org/F/roslyn-tools/api/v2/package/RoslynTools.MSBuild/16.5.0-alpha/ That package lacks the tools\MSBuild\Microsoft\VC subfolder required to build WPF. Instead of trying to do xcopy deployment and failing to do so, I think you better throw an exception complaining about the missing VS2019 or some required components of it.

@vatsan-madhavan
Copy link
Member

Good suggestions.

We should probably update the link to https://github.com/dotnet/cli/blob/master/Documentation/project-docs/developer-guide.md. We do have to override that guidance and point out that building this repo actually requires this:

build -pack

WPF repo always uses -pack for building.

We refer to VS2019 in the README.md (https://github.com/dotnet/wpf) albeit in a slightly different context, but I think we should be clearer. In fact, global.json (https://github.com/dotnet/wpf/blob/master/global.json) lists vs.version needed to build this repo.

These are uncontroversial and straightforward changes, I think. If you are able, please consider contributing 😄

For #2, something like #2307 might help. It's a work in progress.

@hymccord
Copy link

Is corefx still required to build the wpf repo or is it now required to build the runtime repo since it has migrated there?

@ryalanms ryalanms added this to the Future milestone Aug 27, 2021
@pchaurasia14
Copy link
Member

WPF local builds are working perfectly fine using build.cmd.
If you encounter any problems, please raise a new issue.

@ghost ghost removed this from the Future milestone May 26, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jun 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Question General question, not a problem in source code or documentation (yet)
Projects
None yet
Development

No branches or pull requests

5 participants