Comments (3)
After examining MSBuild output, I see that CSC command line under dotnet test
is different. Under ReSharper, it is:
C:\Program Files\dotnet\sdk\2.1.302\Roslyn\bincore\csc.dll /noconfig /unsafe- ........
whereas under dotnet test
it is:
C:\Program Files\dotnet\dotnet.exe "C:\Program Files\dotnet\sdk\2.1.302\Roslyn\bincore\csc.dll" /noconfig /unsafe- ............
and therefore MSBuild output items include csc.dll in CscCommandLineArgs output item:
Output Item(s):
CscCommandLineArgs=
C:\Program Files\dotnet\sdk\2.1.302\Roslyn\bincore\csc.dll
/noconfig
/unsafe-
.........
HelloPage.cs
Services\IGreetingService.cs
.........
and accordingly, I get "C:\Program Files\dotnet\sdk\2.1.302\Roslyn\bincore\csc.dll" in the first item returned by ProjectAnalyzer.GetSourceFiles()
I guess that list of source files is retrieved from CscCommandLineArgs. Then excluding file paths with "dll" extension should do the work. Am I on the right path?
from buildalyzer.
I guess that list of source files is retrieved from CscCommandLineArgs. Then excluding file paths with "dll" extension should do the work. Am I on the right path?
That's exactly correct. Buildalyzer looks at what MSBuild told it the CscCommandLineArgs
property is. Are you on the latest version? This is a known issue and there's already code to deal with it when using AnalyzerResult.GetSourceFiles()
: https://github.com/daveaglick/Buildalyzer/blob/master/src/Buildalyzer/AnalyzerResult.cs#L52
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)
- 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
- Error running on macos-14-arm64 image
- Buildalyzer hangs if build does not start
- Buildalyzer seems to be using C# 11 instead of 7.3 on some machines even for a .NET 4.8 project. HOT 8
- Making the library language-agnostic HOT 1
- Buildalyzer should be able to build projects with C# 12 language features
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.