Skip to content
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

SLN file created in template flow even with option off #1693

Open
timheuer opened this issue Dec 17, 2024 · 3 comments
Open

SLN file created in template flow even with option off #1693

timheuer opened this issue Dec 17, 2024 · 3 comments
Assignees
Labels
area-project Project load, Solution Explorer area-solution Solution explorer bug Something isn't working

Comments

@timheuer
Copy link
Member

Type: Bug

I have DISABLED the option to create a SLN file if one is missing. But still using the New Project flow with a console app a SLN file is created. It should not be. Using dotnet new console does not produce a SLN file for console template, nor should C#DK do this for single project.

Repro:

  • Disable option to automatically create sln file in C#DK settings
  • Open a blank folder
  • .NET: New Project
  • Select console application

Expect: project but no sln file
Actual: project and sln file

Extension version: 1.15.13
VS Code version: Code - Insiders 1.97.0-insider (95386dec787946547812c7ee9d38cba19d6a6398, 2024-12-17T05:04:19.511Z)
OS version: Windows_NT x64 10.0.22635
Modes:

System Info
Item Value
CPUs AMD Ryzen 9 3900X 12-Core Processor (24 x 3793)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 127.92GB (94.69GB free)
Process Argv --crash-reporter-id 961e68ed-cec6-437f-8e5f-e44a8abbf88f
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt551:31179976
vscod805:30301674
vsaa593cf:30376535
py29gd2263:31024238
c4g48928:30535728
962ge761:30841072
pythonnoceb:30776497
dsvsc014:30777825
dsvsc015:30821418
pythonmypyd1:30859725
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:30980852
pythonait:30973460
dvdeprecation:31040973
dwnewjupyter:31046869
nativerepl1:31134653
pythonrstrctxt:31093868
nativeloc1:31118317
cf971741:31144450
e80f6927:31120813
iacca1:31150324
notype1:31143044
dwcopilot:31158714
h409b430:31177054
390bf810:31183120
5b1c1929:31184661
6074i472:31201624

@webreidi webreidi added bug Something isn't working area-project Project load, Solution Explorer area-solution Solution explorer labels Dec 17, 2024
@LittleLittleCloud LittleLittleCloud self-assigned this Dec 19, 2024
@LittleLittleCloud
Copy link

LittleLittleCloud commented Dec 19, 2024

@LittleLittleCloud to determine if it's issue in project system or template engine

@timheuer double confirm if you mean the disable creating sln file to be the following option

Image

@LittleLittleCloud
Copy link

LittleLittleCloud commented Dec 23, 2024

By browsing the code for Automatically create solution in workspace and it's relevant issue, it seems that this option is to prevent creating a new .sln when opening an folder with existing .csproj. When creating a new project via .Net: Add new project, the executeAddNewProject will always create a new .sln file when it doesn't exist.

@webreidi I think for this issue/bug we need your input for the following question.

  • Do we want the setting for Automatically create solution in workspace also apply to the .Net: Add new project command

If the answer is no, then we might want to improve the description for Automatically create solution in workspace to make it clear that it only affect existing workspace. If the answer is yes, then we need to disable automatically creating new .sln in executeAddNewProject when the Automatically create solution in workspace is enabled

@webreidi
Copy link

webreidi commented Jan 10, 2025

@LittleLittleCloud I would expect .NET: New Project to do the same thing that dotnet new does. It does not create a solution for the user upon creation. If the user has not unselected the "Automatically create solution in workspace" it will create an sln upon opening of the workspace with the new project in it. But if they have unchecked that option, it should just open the workspace as is without an sln.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-project Project load, Solution Explorer area-solution Solution explorer bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants