-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
When including any Page item via NuGet package props/targets files, all included Compile items will lost. #811
Comments
The minimal reproduction repository is published to GitHub: |
@ryalanms Does your current work address this problem? |
@walterlv's repro project is compiling with the NuGet restore PBT prototype. It appears to be the same issue. |
@ryalanms @vatsan-madhavan The main reason of this issue is that when the |
I've hacked into the My suggestions:
|
@ryalanms if that's the case, please move this issue over the Preview milestone so that it can be tracked together. @walterlv we are working on a fix. the fix approach will likely run |
This appears to be fixed with #1056. |
Problem description:
Page
and C# files asCompile
.Actual behavior:
CoreCompile
target, we'll find that theCompile
files we just included are not in the file list.Page
items, theCompile
items will come back normal.Expected behavior:
No
Compile
file is lost if we includePage
items.Minimal repro:
1st. Build a NuGet package with such a file structure:
In the Walterlv.DemoPackage.targets file, we have such the codes:
2nd. When we install this package into another empty WPF project just as the csproj below, we can't compile it correctly.
3rd. Check the compiling message of the
CoreCompile
target.we'll find that the
DemoView.xaml.cs
file we just included in the NuGet build targets file is lost but we can see theDemoView.g.cs
file which is compiled using theDemoView.xaml
file.The
Compiling
files are:If we delete the
Page
including line, we'll get such the targets file below:<Compile Include="C:\Users\lvyi\.nuget\packages\walterlv.demopackage\0.1.0\src\DemoView.xaml.cs" /> -- <Page Include="C:\Users\lvyi\.nuget\packages\walterlv.demopackage\0.1.0\src\DemoView.xaml" /> </ItemGroup>
The
Compiling
files are:Check the compiling message again of the
CoreCompile
target.We'll find that the
DemoView.xaml.cs
file comes back but theDemoView.g.cs
file is lost we is expected because we've deleted thexaml
file.Extra.
<Generator>MSBuild:Compile</Generator>
for thePage
items.Page
item intoPage2
or any other names, it behaves just like we deleted thePage
line. So I can assume thatPage
item is treated differently.Resource
item works fine even if it is WPF's compiling items. OnlyPage
item has this bug.The text was updated successfully, but these errors were encountered: