ExtractTypeDeclarationToNewFile not work for multi targetFrameworks project
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 294
- Avg merge
- 2h 30m
- Merged PRs (30d)
- 4
Description
**Product and Version Used**:
2.2.0+VS2019 16.4.0Preview1
**Steps to Reproduce**:
1. Create an csproj(`ClassLibrary2`) in VS, and modify to multi targetFrameworks
```xml
netstandard2.0;net472
```
2. Create `Class1.cs` at `ClassLibrary2/NewFolder/Class1.cs`;
3. Add another class `Class2` in the file;
```cs
namespace ClassLibrary2.NewFolder
{
public class Class1
{
}
public class Class2
{
}
}
```
4. Call quick action at `Class2`, and choose `Extract 'Class2' to a new file`
**Actual Behavior**:
`Class2.cs` should be created at `ClassLibrary2/NewFolder/Class2.cs`
**Expected Behavior**:
`Class2.cs` be created at `ClassLibrary2/ClassLibrary2 (netstandard2.0)/NewFolder/Class2.cs`
Contributor guide
Research direction
Start by reproducing the Extract 'Class2' to a new file quick action in the multi-target ClassLibrary2 project described, using Class1.cs and the Class2 declaration. Trace where the action chooses the output path; done means Class2.cs is created under the expected target-framework directory for the multi-target project.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100