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

Failure when loading solution containing Xamarin projects #27

Closed
kentcb opened this issue Oct 31, 2017 · 2 comments
Closed

Failure when loading solution containing Xamarin projects #27

kentcb opened this issue Oct 31, 2017 · 2 comments

Comments

@kentcb
Copy link

kentcb commented Oct 31, 2017

Microsoft.Build.Exceptions.InvalidProjectFileException occurred
  HResult=0x80131500
  Message=The imported project "C:\Program Files\dotnet\sdk\2.0.2\Xamarin\Android\Xamarin.Android.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
  Source=<Cannot evaluate the exception source>
  StackTrace:
   at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)
   at Microsoft.Build.Evaluation.Evaluator`4.ExpandAndLoadImportsFromUnescapedImportExpression(String directoryOfImportingFile, ProjectImportElement importElement, String unescapedExpression, Boolean throwOnFileNotExistsError, List`1& imports)
   at Microsoft.Build.Evaluation.Evaluator`4.ExpandAndLoadImportsFromUnescapedImportExpressionConditioned(String directoryOfImportingFile, ProjectImportElement importElement, List`1& projects, Boolean throwOnFileNotExistsError)
   at Microsoft.Build.Evaluation.Evaluator`4.ExpandAndLoadImports(String directoryOfImportingFile, ProjectImportElement importElement)
   at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement)
   at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
   at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(ILoggingService loggingService, BuildEventContext buildEventContext)
   at Microsoft.Build.Evaluation.Project.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings)
   at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings)
   at Microsoft.Build.Evaluation.Project.Initialize(IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings)
   at Buildalyzer.ProjectAnalyzer.Load()
   at Buildalyzer.ProjectAnalyzer.Compile()
   at Buildalyzer.Workspaces.ProjectAnalyzerExtensions.AddToWorkspace(ProjectAnalyzer analyzer, AdhocWorkspace workspace, Boolean addProjectReferences)
   at Buildalyzer.Workspaces.AnalyzerManagerExtensions.GetWorkspace(AnalyzerManager manager)
   at PCLMock.CodeGeneration.Generator.<GenerateMocksAsync>d__2.MoveNext() in C:\Users\Kent\Repository\PCLMock\Src\PCLMock.CodeGeneration\Generator.cs:line 41
@daveaglick
Copy link
Collaborator

Buildalyzer 1.0.0 was released to NuGet last night. Can you please try it out when you get the chance and let me know the status of this issue?

FYI - the Buildalyzer 1.0.0 API has changed significantly. Revised documentation is forthcoming, but I wanted to get the release out there ASAP. Hopefully you'll be able to figure out the differences, but if not the source code of the tests is a good place to look or wait until better docs are out next week.

@kentcb
Copy link
Author

kentcb commented Aug 1, 2018

I get a different error now instead:

Can't build legacy projects that contain PackageReference from a .NET Core host

Guessing that's a Roslyn thing, so closing this issue. Thanks!

@kentcb kentcb closed this as completed Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants