Open safesparrow opened 1 year ago
The two cases can both be detected from reading the deps.json
file for the loading application/library. targets.<runtime name>.<dependency name and version>
for the Microsoft.Build.* dependencies should A) be present, and B) not have a runtime
child property. If they are not present, the message should tell the user to add the required dependency with ExcludeAssets="runtime"
set. If the runtime
node is present, the message should tell the user to add ExcludeAssets="runtime"
to the existing dependency.
Is your feature request related to a problem? Please describe. A few times when using ProjInfo I ran into the issue where
loadSln
yielded 0 project results. UsingProjectLoader.getProjectInfo
yielded a cryptic MSBuild-related error. Often the root cause for the error was that MSBuild references were either missing or they didn't have the rightExcludeAssets
attributes set.Describe the solution you'd like I would like ProjInfo APIs to detect the above cases and report a clear error which instructs the user to add appropriate MSBuild references to the project, ideally with a link to some online instructions (eg. a GitHub page).
Describe alternatives you've considered Keeping it as is - can take the user a lot of time to figure out what's happening.