-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Usage with .NET 8 projects using the 'UseArtifactsOutput' build option #15
Comments
Yes, that's probably why it can't find it. |
I'm not sure offhand what the best way to get the 'real' path from the project tools (Buildalyzer or Microsoft.Build.* etc) is.
to get the path, but that won't work with older sdks. |
It looks like you can get the path to the assets file by doing the design time build and getting the I also tried making it execute |
Hello, coming accross the same problem I believe if the While Using a local fork with this code inside var analyzer = _analyzerManager.GetProject(path.FullPath);
var result = analyzer.Build().Results.FirstOrDefault();
path = result.GetProperty("ProjectAssetsFile"); // gets the project.assets.json path @patriksvensson would you be intrseted in this? And could I give it a try to kind of support |
@panoukos41 Sure! |
Hi,
I had a go at running Covenant on a project that uses the 'UseArtifactsOutput' build option that was added in .NET 8 (which causes all the 'obj' directories to get put under a single 'artifacts' directory under the build root), and that failed as it couldn't find the project.assets.json file.
I haven't had much of a look at the issue, but I guess it might be down to
https://github.com/patriksvensson/covenant/blob/afaa6d6b83d00f9cbe8005f2091f521cb4a4dbfd/src/Covenant/Analysis/Dotnet/DotnetAnalyzer.cs#L223C38-L223C38
which looks for the assets file in a fixed location under the directory containing the project file.
The text was updated successfully, but these errors were encountered: