Cannot create app packages for projects containing source generators
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/Cannot-create-app-packages-for-projects-/10770385)._
---
Attempting to create app packages for a WPF project containing a source generator throws an error, as if the source generator is not running.
I have tried rolling back the .NET SDK to no avail.
Download repro project:
(attached or via link [https://github.com/user-attachments/files/15571552/CsWin32WaprojDeployRepro.zip](https://github.com/user-attachments/files/15571552/CsWin32WaprojDeployRepro.zip))
1. Select the packaging project
2. Project > Publish > Create app packages
3. Complete the wizard (Sideloading > Skip signing > x86 + x64 + arm64 > Installer URI [https://example.org](https://example.org) > Create)
4. Observe error in Error List / Output window (screenshot attached):
```
The name ‘Windows’ does not exist in the current context […]
X:\CsWin32DeployRepro\WpfApp\MainWindow.xaml.cs
```
---
### Original Comments
#### Feedback Bot on 10/17/2024, 08:29 AM:
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.
Contributor guide
Assessment
This issue has not been assessed yet.