Precomp.cpp and Nuget errors #873

Closed
opened 2026-01-30 22:07:43 +00:00 by claunia · 13 comments
Owner

Originally created by @lzlrd on GitHub (May 9, 2019).

  • 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.
Originally created by @lzlrd on GitHub (May 9, 2019). * Your Windows build number: 18890.1000 * What you're doing and what's happening: Opening solution then building the following as Debug x64: ![image](https://user-images.githubusercontent.com/24303423/57430256-04b87800-7227-11e9-9ad6-0ffa1f94b0e1.png) * 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. ```
Author
Owner

@DHowett-MSFT commented on GitHub (May 9, 2019):

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 commented on GitHub (May 9, 2019): 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.
Author
Owner

@lzlrd commented on GitHub (May 9, 2019):

@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

@lzlrd commented on GitHub (May 9, 2019): @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](https://user-images.githubusercontent.com/24303423/57431923-3e3fb200-722c-11e9-8a36-50d0adfbb047.png)
Author
Owner

@DavidShield commented on GitHub (May 10, 2019):

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 commented on GitHub (May 10, 2019): 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 ```
Author
Owner

@lzlrd commented on GitHub (May 10, 2019):

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

@lzlrd commented on GitHub (May 10, 2019): @DavidShield use included nugen.exe to restore and that'll go.
Author
Owner

@yang05051 commented on GitHub (May 11, 2019):

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 ......\packages\Microsoft.UI.Xaml.2.1.190405001-prerelease\build\native\Microsoft.UI.Xaml.targets. CascadiaPackage D:\Downloads\Terminal-master\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj 123

@yang05051 commented on GitHub (May 11, 2019): 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 ..\..\..\packages\Microsoft.UI.Xaml.2.1.190405001-prerelease\build\native\Microsoft.UI.Xaml.targets. CascadiaPackage D:\Downloads\Terminal-master\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj 123
Author
Owner

@quanzhuo commented on GitHub (May 12, 2019):

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

PS E:\Workspace\Visual Studio 2019\Visual Studio Projects\Terminal\dep\nuget> .\nuget.exe restore
The folder 'E:\Workspace\Visual Studio 2019\Visual Studio Projects\Terminal\dep\nuget' does not contain an msbuild solution or packages.config file to restore.

@quanzhuo commented on GitHub (May 12, 2019): @lazerl0rd, Hi, I tried to restore, but it didn't work PS E:\Workspace\Visual Studio 2019\Visual Studio Projects\Terminal\dep\nuget> .\nuget.exe restore The folder 'E:\Workspace\Visual Studio 2019\Visual Studio Projects\Terminal\dep\nuget' does not contain an msbuild solution or packages.config file to restore.
Author
Owner

@lzlrd commented on GitHub (May 12, 2019):

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

PS E:\Workspace\Visual Studio 2019\Visual Studio Projects\Terminal\dep\nuget> .\nuget.exe restore
The folder 'E:\Workspace\Visual Studio 2019\Visual Studio Projects\Terminal\dep\nuget' 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 ......\packages\Microsoft.UI.Xaml.2.1.190405001-prerelease\build\native\Microsoft.UI.Xaml.targets. CascadiaPackage D:\Downloads\Terminal-master\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj 123

Follow the instructions I gave above.

@quanzhuo @yang05051

@lzlrd commented on GitHub (May 12, 2019): > @lazerl0rd, Hi, I tried to restore, but it didn't work > > PS E:\Workspace\Visual Studio 2019\Visual Studio Projects\Terminal\dep\nuget> .\nuget.exe restore > The folder 'E:\Workspace\Visual Studio 2019\Visual Studio Projects\Terminal\dep\nuget' 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 ......\packages\Microsoft.UI.Xaml.2.1.190405001-prerelease\build\native\Microsoft.UI.Xaml.targets. CascadiaPackage D:\Downloads\Terminal-master\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj 123 Follow the instructions I gave above. @quanzhuo @yang05051
Author
Owner

@tommck commented on GitHub (May 14, 2019):

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

The missing file is ......\packages\Microsoft.UI.Xaml.2.1.190405001-prerelease\build\native\Microsoft.UI.Xaml.targets. CascadiaPackage (loading...) C:\dev\Terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj 123

:(

@tommck commented on GitHub (May 14, 2019): I get that same error AFTER restoring packages from the command line: > The missing file is ..\..\..\packages\Microsoft.UI.Xaml.2.1.190405001-prerelease\build\native\Microsoft.UI.Xaml.targets. CascadiaPackage (loading...) C:\dev\Terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj 123 :(
Author
Owner

@tommck commented on GitHub (May 14, 2019):

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

@tommck commented on GitHub (May 14, 2019): 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
Author
Owner

@songjiang951130 commented on GitHub (May 14, 2019):

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

MSBUILD
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe

restart vs code

@songjiang951130 commented on GitHub (May 14, 2019): you need find and add MSBuild.exe to system value such as MSBUILD C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe restart vs code
Author
Owner

@miniksa commented on GitHub (May 18, 2019):

Looks like this sorted itself out. Resolving.

@miniksa commented on GitHub (May 18, 2019): Looks like this sorted itself out. Resolving.
Author
Owner

@lzlrd commented on GitHub (May 18, 2019):

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

@lzlrd commented on GitHub (May 18, 2019): @miniksa my build problem hadn’t been fully resolved. Only one section of it was. I still get the precmp failures.
Author
Owner

@lzlrd commented on GitHub (May 18, 2019):

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

MSBUILD
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe

restart vs code

@songjiang951130 if you mean add to Env? It’s already there. And I’m using VS 2019 not VS Code.

@lzlrd commented on GitHub (May 18, 2019): > you need find and add MSBuild.exe to system value > such as > > MSBUILD > C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe > > restart vs code @songjiang951130 if you mean add to Env? It’s already there. And I’m using VS 2019 not VS Code.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#873