dotnet / dotnet/wpf

Combination of Microsoft.NET.Sdk.Worker Sdk and WPF breaks nuget package restore and causes Intellisense to fail

Open
#9,355 1 comment 0 reactions 1 assignee Claimed by @himgoyalmicro View on GitHub
Investigate
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/Combination-of-MicrosoftNETSdkWorker-/10543939)._

---
[severity:It's more difficult to complete my work]
See [https://github.com/leonvandermeer/WorkerSdkWpfIssue](https://github.com/leonvandermeer/WorkerSdkWpfIssue) for a repository that reproduces the issue **and for a more in depth analysis.**

### Reproduce
Clone above repository, open IntellisenseBroken.sln, perform a (re)build or:
1. Create a new project with the worker template:
>dotnet.exe new worker -o WpfWorkerApp

2. Add following line to the WpfWorkerApp.csproj file to enable Wpf:
>true

3. In Visual Studio, add a new `Window (WPF)` item to the project, so that Wpf's xaml compile steps get executed.

4. Build or Rebuild the project.

### Issues
In Solution explorer, observe that package restore is broken.
Open Program.cs file and observe that Intellisense is broken.

![IntelliSenseFailure.png](https://aka.ms/dc/image?name=B633634c07d5548f2bab2f7a93ef9c7de638385324399065050_IntelliSenseFailure.png&tid=633634c07d5548f2bab2f7a93ef9c7de638385324399065050)

---
### Original Comments

#### Feedback Bot on 12/19/2023, 08:21 AM:

(private comment, text removed)
#### Feedback Bot on 4/2/2024, 11:04 AM:

(private comment, text removed)

---
### Original Solutions
(no solutions)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.