The Wayback Machine - https://web.archive.org/web/20210827003114/https://github.com/dotnet/aspnetcore/issues/35796
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

restore.cmd fails if environment variable "projects" defined #35796

Open
GregHNZ opened this issue Aug 26, 2021 · 0 comments
Open

restore.cmd fails if environment variable "projects" defined #35796

GregHNZ opened this issue Aug 26, 2021 · 0 comments

Comments

@GregHNZ
Copy link

@GregHNZ GregHNZ commented Aug 26, 2021

Describe the bug

If your machine has an environmental variable "projects" defined, restore.cmd fails.

I have the projects environmental variable defined to instruct Windows Defender to ignore my build output folder. (Otherwise
Windows Defender will delete App_global.asax.dll in my .net framework projects).

When attempting to build a fresh install of the aspnetcore project, I run restore.cmd. This installs a significant amount of software, but then fails because it says a project file completely outside of the aspnetcore repo is missing.

To Reproduce

git clone https://github.com/dotnet/aspnetcore.git
{ git clone output }
git submodule update --init --recursive
{ git update output }
restore.cmd
{ a bunch of output }
...
dotnet-install: .NET Core Runtime version 7.0.0-alpha.1.21419.1 is already installed.
dotnet-install: Adding to current process PATH: "C:\temp\20210826\aspnetcore.dotnet\x86". Note: This change will not be visible if PowerShell was run as a child process.
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

**dotnet-install: ASP.NET Core Runtime version 3.1.14 is already installed.
C:\Users\GregH.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21420.4\tools\Build.proj(221,5): error MSB3202: T
he project file "c:\temp\rocket_build" was not found.

Build FAILED.

C:\Users\GregH.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21420.4\tools\Build.proj(221,5): error MSB3202: T
he project file "c:\temp\rocket_build" was not found.
0 Warning(s)
1 Error(s)

Time Elapsed 00:00:08.51
Build failed with exit code 1. Check errors above.**

set | grep -i build
Projects=c:\temp\rocket_build\

set projects=

restore.cmd
{ a bunch of output }
...
Build succeeded.

Further technical details

  • ASP.NET Core version
    c:\temp\20210826\aspnetcore>git show
    commit 9611dc1 (HEAD -> main, origin/main, origin/HEAD)

  • Include the output of dotnet --info

c:\temp\20210826\aspnetcore>dotnet --info

Host (useful for support):
Version: 5.0.9
Commit: 208e377a53

.NET SDKs installed:
3.1.412 [C:\Program Files\dotnet\sdk]
5.0.206 [C:\Program Files\dotnet\sdk]
5.0.301 [C:\Program Files\dotnet\sdk]
5.0.303 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.29 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.29 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.29 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download

  • The IDE (VS / VS Code/ VS4Mac) you're running on, and its version
    Haven't got to an IDE yet.
    VS2019 won't build it, but I'm assuming restore.cmd needs to complete without trying to compile some other non-existing project first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants