dotnet / dotnet/msbuild

.pri files are not automatically referenced in .NET core projects

Open
#5,341 2 comments 0 reactions 0 assignees View on GitHub
Area: Task: Resolve Assembly References (RAR) For consideration Partner request triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

### Steps to reproduce

I've attached two .sln files and some binlogs
https://microsoft-my.sharepoint.com/:f:/p/stevenki/EixvC6_FBmRAqUopltGOtA0B5_f46g0zwGsgcfttI25jhg?e=a4sTuS

You can open each .sln in Visual Studio and F5 them. For App6, you'll need to make sure the `WapProjTemplate1` project is the startup project.

### Expected behavior
![image](https://user-images.githubusercontent.com/9649518/81350016-f7baa880-9075-11ea-87c6-4aa3e2540f2a.png)

### Actual behavior
![image](https://user-images.githubusercontent.com/9649518/81350307-7f081c00-9076-11ea-8605-a39300475d36.png)

### Environment data
`msbuild /version` output:

c:\Users\stevenki\source\repos>msbuild /version
Microsoft (R) Build Engine version 16.7.0-preview-20228-06+9571f7584 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

16.7.0.22806

OS info: Windows Insider build 20124

If applicable, version of the tool that invokes MSBuild (Visual Studio, dotnet CLI, etc):
VS: 16.7.0 Preview 1.0 [30104.155.master]
Dotnet CLI: N/A (apps can't build w/ dotnet cli)

### Cause
What I found in my investigation, is that the `ResolveAssemblyReferences` task is supposed to return the .pri in the `_ReferenceRelatedPaths` item group. However, even though the .pri extension is passed in as an allowed extension, that isn't being respected. From there, it's a chain reaction that's basically causing the .pri file to not be merged into the apps .pri, which results in xaml files not being found at runtime

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.