Terminal: Precomp.cpp and Nuget errors

Created on 9 May 2019  路  13Comments  路  Source: microsoft/terminal

  • Your Windows build number: 18890.1000

  • What you're doing and what's happening: Opening solution then building the following as Debug x64:
    image

  • What's wrong / what should be happening instead:

When loading:

This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\..\..\packages\Microsoft.UI.Xaml.2.1.190405001-prerelease\build\native\Microsoft.UI.Xaml.targets.  CascadiaPackage F:\Users\seacr\source\repos\Terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj   120

When building: Repetitions of differenet versions of fatal error C1083: Cannot open source file: '..\precomp.cpp': No such file or directory (basically lots of errors referring to precomp.cpp missing).

When running .\tools\razzle.cmd:

PM> .\tools\razzle.cmd
Could not find MsBuild on your machine. It may be installed somewhere else.
Area-Build Issue-Question Product-Conhost Product-Terminal Resolution-Answered

Most helpful comment

Of course, RIGHT after I posted that, I saw that it was because it defaulted to targeting ARM64 by default.

Switch to"x64" and it should build

All 13 comments

That's pretty strange. If you right-click the solution inside Visual Studio and choose "Restore missing packages...", does it do anything?

We're tracking build issues like this in the build megathread at #489.

@DHowett-MSFT, in the end, I just used the included nugen.exe directly to restore packages, but that precomp.cpp spam is still there:
image

same NuGet error:

Severity    Code    Description Project File    Line    Suppression State
Error       This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\..\..\packages\Microsoft.UI.Xaml.2.1.190405001-prerelease\build\native\Microsoft.UI.Xaml.targets.  CascadiaPackage C:\Users\xxxx\Desktop\New folder\Terminal-master\Terminal-master\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj   120

@DavidShield use included nugen.exe to restore and that'll go.

No resolution?
Severity Code Description Project File Line Suppression State
Error This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ......packagesMicrosoft.UI.Xaml.2.1.190405001-prereleasebuildnativeMicrosoft.UI.Xaml.targets. CascadiaPackage D:DownloadsTerminal-mastersrccascadiaCascadiaPackageCascadiaPackage.wapproj 123

@lazerl0rd, Hi, I tried to restore, but it didn't work

PS E:WorkspaceVisual Studio 2019Visual Studio ProjectsTerminaldepnuget> .nuget.exe restore
The folder 'E:WorkspaceVisual Studio 2019Visual Studio ProjectsTerminaldepnuget' does not contain an msbuild solution or packages.config file to restore.

@lazerl0rd, Hi, I tried to restore, but it didn't work

PS E:WorkspaceVisual Studio 2019Visual Studio ProjectsTerminaldepnuget> .nuget.exe restore
The folder 'E:WorkspaceVisual Studio 2019Visual Studio ProjectsTerminaldepnuget' does not contain an msbuild solution or packages.config file to restore.

Don't cd into the folder and run it. Start in E:\Workspace\Visual Studio 2019\Visual Studio Projects\Terminal then do .\dep\nuget\nuget.exe restore.

No resolution?
Severity Code Description Project File Line Suppression State
Error This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ......packagesMicrosoft.UI.Xaml.2.1.190405001-prereleasebuildnativeMicrosoft.UI.Xaml.targets. CascadiaPackage D:DownloadsTerminal-mastersrccascadiaCascadiaPackageCascadiaPackage.wapproj 123

Follow the instructions I gave above.

@quanzhuo @yang05051

I get that same error AFTER restoring packages from the command line:

The missing file is ......packagesMicrosoft.UI.Xaml.2.1.190405001-prereleasebuildnativeMicrosoft.UI.Xaml.targets. CascadiaPackage (loading...) C:devTerminalsrccascadiaCascadiaPackageCascadiaPackage.wapproj 123

:(

Of course, RIGHT after I posted that, I saw that it was because it defaulted to targeting ARM64 by default.

Switch to"x64" and it should build

you need find and add MSBuild.exe to system value
such as

MSBUILD
C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.exe

restart vs code

Looks like this sorted itself out. Resolving.

@miniksa my build problem hadn鈥檛 been fully resolved. Only one section of it was. I still get the precmp failures.

you need find and add MSBuild.exe to system value
such as

MSBUILD
C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.exe

restart vs code

@songjiang951130 if you mean add to Env? It鈥檚 already there. And I鈥檓 using VS 2019 not VS Code.

Was this page helpful?
0 / 5 - 0 ratings