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

ProjectRootElement.Open throws due to missing #6799

Closed
erdembayar opened this issue Aug 31, 2021 · 4 comments
Closed

ProjectRootElement.Open throws due to missing #6799

erdembayar opened this issue Aug 31, 2021 · 4 comments
Labels
author-responded Author responded, needs response from dev team. bug needs-more-info Issues that need more info to continue investigation. triaged

Comments

@erdembayar
Copy link

erdembayar commented Aug 31, 2021

Issue Description

When try to open csproj project file with ProjectRootElement.Open from namespace Microsoft.Build.Construction then it throws following exception. I couldn't find 4.0.4.1 version anywhere, and my attempt to solve with bindingRedirect didn't work, it's blocking my work for another P1 issue.
error: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. trace: System.AggregateException: One or more errors occurred. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. trace: at System.MemoryExtensions.AsSpan(String text) trace: at Microsoft.Build.Evaluation.Expander2.Function1.ExtractPropertyFunction(String expressionFunction, IElementLocation elementLocation, Object propertyValue, UsedUninitializedProperties usedUnInitializedProperties, IFileSystem fileSystem)

Steps to Reproduce

Currently I have project pointing private Azure repository, please contact me if you need repo project.

Expected Behavior

Actual Behavior

Analysis

Versions & Configurations

Attach a binlog

@erdembayar erdembayar added bug needs-triage Have yet to determine what bucket this goes in. labels Aug 31, 2021
@benvillalobos
Copy link
Member

Team Triage: Are you using MSBuildLocator?

@benvillalobos benvillalobos added the needs-more-info Issues that need more info to continue investigation. label Sep 2, 2021
@ghost ghost removed the needs-triage Have yet to determine what bucket this goes in. label Sep 2, 2021
@erdembayar
Copy link
Author

Team Triage: Are you using MSBuildLocator?

@benvillalobos
I don't, I'm just using VS to debug nuget client code.

@jeffkl
Copy link
Contributor

jeffkl commented Sep 3, 2021

@erdembayar ping me tomorrow and I can help get this working.

@erdembayar
Copy link
Author

@jeffkl
Thank you. It happens to be MSBuildLocator version is old.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author-responded Author responded, needs response from dev team. bug needs-more-info Issues that need more info to continue investigation. triaged
Projects
None yet
Development

No branches or pull requests

4 participants