Comments (6)
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.
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.
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.
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.
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.
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)
- How to do a (fast) design-time build? HOT 7
- AWS porting assistant crashes on Buildalyzer.ProjectAnalyzer.Build HOT 2
- Support for .Net Standard 2.0 HOT 2
- `PublishSingleFile` breaks `IProjectAnalyzer.Build()` HOT 15
- Version number not available for packages added using GlobalPackageReference in Directory.Packages.props HOT 7
- Unsupported log file version HOT 8
- Cache dotnet info results per global.json file HOT 5
- Error when trying to read dotnet --info HOT 3
- multiple Buildalyzer.Tests unit tests are failing HOT 3
- Make working directory used by ProcessRunner configurable HOT 3
- [Discussion] Calling `GetCompilationAsync` on ASP.NET Framework project returns empty compilation HOT 3
- Help offered HOT 1
- Could not load file or assembly `NuGet.Frameworks` HOT 16
- Build/assembly reference not found errors due to random sorting of the projects in the Workspace when loading projects from solution file HOT 9
- Xml documentation is missing for imported symbols in Roslyn Projects HOT 3
- Looking For A New Maintainer HOT 4
- Sponsoring HOT 4
- Coding style, static code analysis, and versioning HOT 15
- Immutability HOT 3
- Targeting netstandard HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buildalyzer.