-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Changing .NET Core WPF project item from None to Resource does not embed item in output assembly #2240
Comments
@rladuca would you please move the Developer Community ticket to the appropriate WPF area path? |
@rainersigwald Have you seen something like this before? Does this look like an msbuild issue? |
@benvillalobos, can you take a look at this repro and see where things are going wrong? |
@benvillalobos Did you ever get to look into this? |
@rladuca Not yet unfortunately. I'm currently focused on a high priority bug, but this is still on my to-do list. |
Still appears to be a bug doing a rebuild fixed my problem. Possibly related, changing the image build type from <ItemGroup>
<Resource Remove="Images\info.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Mono.Options" Version="6.6.0.161" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\info.png" />
</ItemGroup> |
WPF is a red herring because this problem also affects non-WPF projects that target SDK/NETFW/5, such as non-WPF Console projects for ASP.NET 5, or a Windows Service, or stuff for MS Azure. I've written detailed notes about this in the later message in dotnet/project-system#4534 (comment) |
@vsfeedback commented on Sun Nov 24 2019
This issue has a corresponding ticket on Developer Community. Please vote and comment there to make sure your voice is heard.
This issue is present in VS2019 16.3.7, when targeting WPF and .NET Core 3.0 or .NET Framework 4.7.2 with the new SDK-Style .csproj format.
When changing [Build Action] for a file between [None] and [Resource] in SDK-Style .csproj, the Output dll/exe is not correctly recreated on Build (if there are no other changes triggering a recompile) - we have to do a Rebuild to get the desired effect!
NOTE: The Build command seems to do something, but the size of the resulting dll/exe does not reflect the removal/addition of the built-in resource content. After a Rebuild (or after changing code etc and doing another Build) the size of the dll/exe is corrected.
Interestingly enough, the same issue does not seem to apply when switching between [None] and [EmbeddedResource].
The issue can easily be reproduced:
The above steps can be used to repeatedly reproduce the (wrong size) issue by toggling between [None] and [Resource] - doing a build does not change the size, but doing a Rebuild correctly updates the size (of the output dll/exe).
Original Comments
Visual Studio Feedback System on 11/1/2019, 04:48 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Sara Liu [MSFT] on 11/4/2019, 06:17 PM:
Thank you for your feedback, this issue has been escalated for further investigation and if there is any process, I will inform you immediately.
Original Solutions
(no solutions)
@drewnoakes commented on Sun Nov 24 2019
I intend to transfer this to https://github.com/dotnet/wpf but no longer have permission to do so. However this may be related to a GitHub outage seen today, so will try again later before escalating.
@sharwell commented on Sun Nov 24 2019
@terrajobst can you transfer this issue for us?
The text was updated successfully, but these errors were encountered: