-
Notifications
You must be signed in to change notification settings - Fork 13
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
Can't generate .csproj for player projects #763
Comments
@jbevain is this expected to be supported? How do these player projects work? Is the .cs file shared between multiple projects - or is there a separate .cs file for each project? If these projects required shared files - then assuming the project generation happens, we'd still need to implement dotnet/vscode-csharp#5788 to allow you to switch between different contexts. |
Hi @dibarbet, at the moment we're not supporting this because there's no way to switch between different contexts :) Basically today we generate project files to represent what Unity is compiling for the Unity Editor. Having Player projects allows you in VS to be able to select the project context to represent what Unity is compiling when building a Player for a target platform, so you can get a different editor experience based on ifdef or references for instance. |
How does this work in VS - is the project generated with a linked file reference to the same .cs file? If so we can mark this as blocked on Roslyn support for project contexts. |
Yes, there are N different csprojs with a different set of defines and references that are referencing the same .cs file. |
Got it, blocked on dotnet/vscode-csharp#5788 then |
Amazing, thanks for the check and extra information! |
Type: Bug
Currently it seems impossible to toggle the generation of player projects file. This is usefull when developing for platform where we need to write native code, like for HoloLens 2.
In Visual Studio we have the possibility to switch the code analysis between project and player (editor / platform) which allows compilation checks for the platform.
Reproduction steps :
Actual:
Expected:
Extension version: 0.9.3
VS Code version: Code 1.84.2 (1a5daa3a0231a0fbba4f14db7ec463cf99d7768e, 2023-11-09T10:51:52.184Z)
OS version: Windows_NT x64 10.0.22621
Modes:
System Info
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: