Open shirhatti opened 3 years ago
Turns out this was my mistake. Running ./eng/scripts/InstallVisualStudio.ps1 -Edition Enterprise -Channel Preview
fixed it for me.
Leaving this issue open in case we want to add anything to the build scripts to make this easier to diagnose.
Documents already say
If you don't have visual studio installed you can run eng/scripts/InstallVisualStudio.ps1 to install the exact required dependencies.
Is the action here to:
If yes, the fix would be in https://github.com/dotnet/aspnetcore/blob/main/docs/BuildFromSource.md and this would be a good first issue (hint, hint).
Is the action here to:
- Mention the need to run this script if builds complain of missing components (when the script wasn't used before)❔
- Stop mentioning preview versions now that 16,10 is out❔
I'd rather the build not fail when I've explicitly mentioned .\build.cmd /p:BuildNative=false
.
I'd rather the build not fail when I've explicitly mentioned
.\build.cmd /p:BuildNative=false
.
There are still doc problems in that we don't need preview versions of VS at the moment and don't mention InstallVisualStudio.ps1
as a fix when paths like .tools\msbuild\16.5.0-alpha\
show up in the logs prior to a build break.
In addition to that, /p:BuildNative=false
doesn't actually disable native builds because the -buildNative
default in eng/build.ps1 will override that property setting. Use -noBuildNative
instead. That would be safer anyway because it completely skips the desktop msbuild
step and will use only dotnet msbuild
.
Use
-noBuildNative
instead
Ah thank you! That's what I was looking for
Hi @dougbu, I'd be happy to make the changes to the document if it's still required?
Hi @dougbu, I'd be happy to make the changes to the document if it's still required?
If a doc change would have helped you, @shirhatti, or others get going in this repo, I'm all for it. Much appreciated @KevRitchie❕
No problem @dougbu.
In summary the changes would be:
.tools\msbuild\16.5.0-alpha\
- they must run the InstallVisualStudio.ps1 script, even if VS is already installed.That look OK?
That look OK?
Sounds great. Thanks @KevRitchie❕
Sounds like the Build From Source instructions have been redesigned so this issue may no longer be relevant. See comment
@dotnet/aspdoi this or similar problems come up most times we change our VS requirements and it's not clear how best to inform our community. A pinned issue for (say) two weeks after we add a new component or stop supporting a VS version might work but I've heard comments about usability there. Ideas much appreciated.
A curated error message would be great instead of some random vcxproj error that no one understands. Like if there was a way for us to see what you have available on the machine and compare it to what is required.
I have a similar problem, only updating VS does not help, no matter if I run ./eng/scripts/InstallVisualStudio.ps1
or manually upload .vsconfig
to the installer.
Running ./restore.cmd
, results in:
Restore was successful.
All projects are up-to-date for restore.
Attempting to install dotnet from public location.
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: .NET Core Runtime with version '8.0.0-alpha.1.23067.2' is already installed.
dotnet-install: Adding to current process PATH: "source\repos\aspnetcore\.dotnet\x86\". Note: This change will not be visible if PowerShell was run as a child process.
Attempting to install dotnet from public location.
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: .NET Core Runtime with version '8.0.0-alpha.1.23067.2' is already installed.
dotnet-install: Adding to current process PATH: "source\repos\aspnetcore\.dotnet\". Note: This change will not be visible if PowerShell was run as a child process.
.nuget\packages\microsoft.dotnet.arcade.sdk\8.0.0-beta.23063.7\tools\Build.proj(221,5): error MSB3202: The project file "source\repos\aspnetcore\src\**\*.vcxproj" was not found.
.nuget\packages\microsoft.dotnet.arcade.sdk\8.0.0-beta.23063.7\tools\Build.proj(221,5): error MSB3202: The project file "source\repos\aspnetcore\src\**\*.vcxproj" was not found.
.nuget\packages\microsoft.dotnet.arcade.sdk\8.0.0-beta.23063.7\tools\Build.proj(221,5): error MSB3202: The project file "source\repos\aspnetcore\src\**\*.vcxproj" was not found.
Build FAILED.
Edit: removing the repository and cloning again (in the same location) solved this problem.
Describe the bug
Unable to build from command line:
restore.cmd
/build.cmd
fails.(Running
.\build.cmd /p:BuildNative=false
also fails)To Reproduce
Running
restore.cmd
fails on main ( which is currently at 0ecf4c1bd9526c36356a0f259d90aafdf0756fcd)Exceptions (if any)
Further technical details