-
Notifications
You must be signed in to change notification settings - Fork 391
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
Incorrect warning icons when ReferenceOutputAssembly="false" #2928
Comments
DevNotes: with ReferenceOutputAssembly="false", NuGet does not generate a project reference in the assets file: "frameworks": {
"netstandard2.0": {
"projectReferences": {}
}
}, This likely means a ResolvedProjectReference item is not produced. However this does not seem to be a problem in Microsoft.NET.Build.Extensions.Tasks.csproj which resolves its project reference correctly. Investigating further... |
Do we have any workaround for hiding icon or reference? |
Any news? |
I have tried Dev 16 Preview and behavior is still observed. Any plans to fix it at upcoming version? |
@evgeny-burmakov thanks for your patience. It's definitely on the radar. This issue will be updated as soon as there is any progress. |
I believe this is the reason why we see warning icons in VS in Orleans. We use a If I add a condition |
Haven't tried, but |
Visible does hide the project, but the warning icon on the Dependencies node remains |
@drewnoakes This will be a case of dependency node expecting a counterpart design-time builds result for the item it finds in evaluation. |
Seems likely. I'll test my repro solution for this issue as part of the work I'm doing on #4550. |
We track this issue. Same ultimate cause: project has a special build step which causes it to need a non-build dependency on another project. Useless visual studio warning icon with no actual warning. |
The established norm for referencing source generators as a project reference is to use |
Related to dotnet/msbuild#1916 |
Project resolution has historically been determined by the presence of an item in the ReferencePath group, for which the source was a ProjectReference. When a ProjectReference specifies ReferenceOutputAssembly=false, it is explicitly stating that the referenced project's output assembly should not be included in ReferencePath. However, for the purposes of populating the Dependencies tree, we still wish to know that this item was present. Its absense from the ResolvedProjectReference item group results in a yellow triangle appearing on the reference in the tree. To fix this, we override the target used by the ResolvedProjectReference rule to also return ProjectReference items having ReferenceOutputAssembly=false. Fixes dotnet#2928
Project resolution has historically been determined by the presence of an item in the ReferencePath group, for which the source was a ProjectReference. When a ProjectReference specifies ReferenceOutputAssembly=false, it is explicitly stating that the referenced project's output assembly should not be included in ReferencePath. However, for the purposes of populating the Dependencies tree, we still wish to know that this item was present. Its absense from the ResolvedProjectReference item group results in a yellow triangle appearing on the reference in the tree. To fix this, we override the target used by the ResolvedProjectReference rule to also return ProjectReference items having ReferenceOutputAssembly=false. Fixes dotnet#2928 Co-authored-by: David Kean <davkean@microsoft.com>
A fix for this issue has been merged and will be released as part of 16.8. |
Whenever I use
ReferenceOutputAssembly="false"
, no matter what the target framework is (even between csproj and wixproj), I get a warning symbol even though there are no build warnings:In this instance:
ClassLibrary1.csproj:
ClassLibrary2.csproj:
The text was updated successfully, but these errors were encountered: