Coder Social home page Coder Social logo

Comments (6)

daveaglick avatar daveaglick commented on May 23, 2024

The hope is that all scenarios will be covered. That’s turning out to be pretty tricky, but I’ve been investing a lot of time in this project lately with that goal in mind. I’ve been shuffling around the API and refactoring some underlying bits recently and I think I’m getting close to a major release.

Without spending too much time on the details of your problem yet, let’s see how the next release does. I’ll let you know when it’s out and then let’s circle back and see if it resolves your problem. If not we can dig further.

from buildalyzer.

daveaglick avatar daveaglick commented on May 23, 2024

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.

from buildalyzer.

dfederm avatar dfederm commented on May 23, 2024

I'm seeing this as well in v1.0.0. The workaround for me was to do this:

projectAnalyzer.SetGlobalProperty("MSBuildToolsPath32", msBuildProject.GetPropertyValue("MSBuildToolsPath"));

Granted, my scenario requires that I do a Load first so I already have a Project to query the MSBuildToolsPath already, but it's still pretty inconvenient.

from buildalyzer.

dfederm avatar dfederm commented on May 23, 2024

Here's a binlog (inside a zip file) for my repro: repro.zip

You'll notice that:

NuGetRestoreTargets = \..\..\..\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets

and that property is defined as:

  <PropertyGroup>
    <NuGetRestoreTargets Condition="'$(NuGetRestoreTargets)'=='' and '$([MSBuild]::IsRunningFromVisualStudio())'=='true'">$(MSBuildToolsPath32)\..\..\..\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets</NuGetRestoreTargets>
    <NuGetRestoreTargets Condition="'$(NuGetRestoreTargets)'==''">$(MSBuildToolsPath)\NuGet.targets</NuGetRestoreTargets>
  </PropertyGroup>

Note that I'm debugging/running unit tests in VS, so likely IsRunningFromVisualStudio is true simply because of that. For the OP though, it's true because it's part of a VSIX, which is also running inside VS.

from buildalyzer.

bettinaheim avatar bettinaheim commented on May 23, 2024

I finally got around to given this a go.
There have definitively been some improvements!
Unfortunately it is not quite there yet for me, e.g. test projects won't build properly.
Running in a separate process, the easiest thing for our purposes turned out to be setting the MSBUILD_EXE_PATH before any of the Microsoft.Build.* dlls are loaded (a static constructor in MSBuild does a whole lot of magic based on that variable). That solved all issues of having to hunt down and manually set a whole bunch of global properties.
Thanks for giving this a go & keep up the good work!

from buildalyzer.

daveaglick avatar daveaglick commented on May 23, 2024

I just published Buildalyzer 2.0 which runs MSBuild out-of-process (as opposed to the old way of running it via MSBuild APIs). In general, if you can build it Buildalyzer should now be able to build it. Given how drastically different this new technique is, I'm closing all existing bug reports.

Please try the new version and if you're still having problems, please open a new issue.

from buildalyzer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.