-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
System.Private.CoreLib.csproj fails to load in System.Private.CoreLib.sln without global installations of nightly/preview SDK #36349
Comments
C:\git\runtime\src\coreclr\src\System.Private.CoreLib\System.Private.CoreLib.csproj:
401: <Import Project="$(RepositoryEngineeringDir)codeOptimization.targets" /> This means C:\git\runtime\Directory.Build.props:
22 <PropertyGroup Condition="'$(SkipImportArcadeSdkFromRoot)' == 'true'">
23 <RepoRoot>$([MSBuild]::EnsureTrailingSlash('$(MSBuildThisFileDirectory)'))</RepoRoot>
24: <RepositoryEngineeringDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'eng'))</RepositoryEngineeringDir> I don't know what C:\git\runtime\src\coreclr\Directory.Build.props:
2
3 <PropertyGroup>
4: <SkipImportArcadeSdkFromRoot>true</SkipImportArcadeSdkFromRoot> |
Just tried to repro this locally without success. The project both loads and builds successfully for me.
You mean on your local enlistment, this file is missing from the root
This property determines if the Arcade SDK should be imported in the root's Directory.Build.props/targets files. |
For some reason, it seems to look for the file from the solution root ( I am not the only one having this problem; @KoziLord was having this problem yesterday too. |
Can you please send me a design time binlog by capturing the loading of the project? https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProjectSystemTools |
I have installed the extension, but I am not sure how I am supposed to use it; I opened the Build logging windows and have the build logging started but it doesn't seem to actually have any design time build related logs. |
Actually... this is the full log that's being shown when I try to load the project:
Could it be because of the SDK missing? and if so why does it think it is missing, when it's clearly inside the .dotnet folder? |
When you open a project inside VS, the globally installed SDK is used. Ideally we would want VS to tell to not use that one but there is currently no hook to do so. The minimum required SDK version is specified here: https://github.com/dotnet/runtime/blob/master/global.json#L3. This is documented here: https://github.com/dotnet/runtime/blob/master/docs/workflow/requirements/windows-requirements.md#net-sdk. You can find the download links for the required SDK version here: https://github.com/dotnet/installer#installers-and-binaries. For Windows, https://aka.ms/dotnet/net5/preview5/Sdk/dotnet-sdk-win-x64.exe should suffice. |
Installing the SDK globally indeed solves the problem. 👍 I wish the document was updated to be more accurate about it though, for me it sounds like it's only necessary if you want to run and build apps via the normal P.S. the aka.ms link doesn't seem to work? I know the other links point to the same thing but >.> |
Yes that was probably the case. VS always used the globally installed SDK.
Great feedback :) Would you mind submitting a PR to make this clearer and correct the aka.ms link and point to https://github.com/dotnet/installer#installers-and-binaries instead? |
Could do 🙂
No, I meant the link at the end of your last comment didn't work... |
Oh I see. We just recently branched off for P5, that might be the reason. @dsplaisted are you aware of the dotnet/installer's P5 links not working correctly in the table? In example https://aka.ms/dotnet/net5/preview5/Sdk/dotnet-sdk-win-x64.exe.
Thanks :) |
I think @bozturkMSFT and @wli3 are aware of this and working on it |
@dsplaisted We don't seem to have a P5 branch in dotnet/installer yet. Do we have that task assigned to someone? |
I think @sfoslund is the branch owner for preview 5. |
It sounds like @mmitche will be handling setting up the preview branches. |
The project fails to load with the log
Project "C:\users\gotos\source\repos\runtime\src\coreclr\src\System.Private.CoreLib\codeOptimization.targets" was not imported by "C:\users\gotos\source\repos\runtime\src\coreclr\src\System.Private.CoreLib\System.Private.CoreLib.csproj" at (401,3), due to the file not existing.
. This is after building Clr+Libs subset successfully, viabuild -subset Clr+Libs -runtimeConfig Release
on a clean repo.The said
codeOptimization.targets
file indeed does not seem to exist in the specified folder.The text was updated successfully, but these errors were encountered: