2019.2.0b4 and VS 2019

I can’t get VS2019 to Debug with the beta. The “attach” button now says “Start” when pressed this is the message in the dialog

“A Project with the Output Type of Class Library cannot be started directly.
In order to debug this project, add and executable to this solution which referances the library project. Set the executable project as the startup project.”

This behavior does not happen in Unity 2019.1

Which “Visual Studio Editor” package version are you running? If the issue occurs with the latest available version (1.0.11), it would be great if you could submit a bug report and reply in here with the issue ID.

VS 2019 Community 16.1.2
with
.Net desktop Development
Desktop development with C++
Universal Windows Platform Development
Mobile Development with .Net
Mobile Development with C++
Game Development with Unity
Game Development with C++
.Net Core cross-Platform Development

I used the stock/default options for each package

The C++ stuff is need for Tiny. . . which also will not compile with the current configuration.

Could you please open the package manager under Window > Package Manager and check which version the Visual Studio Editor package has?

Gotcha

Visual Studio code editor 1.0.4
Visual Studio Editor 1.0.5

There are an updates will try again with update

Post Update to:
Visual Studio code editor 1.0.7
Visual Studio Editor 1.0.11

Same thing

Oddly the Debug Button says “Attach” as VS is loading but when load completes it reverts to “Start”

Note it seemed “Generate all .csproj files” was not checked ( by default) Checking it made many more csproj files but didn’t solve the issue

So at home everything is fine. . . . I recall when using Tiny the security window appeared, maybe I accidentally blocked the beta . . . .that would explain a lot. . . . I will try again when I go back to work.

Nope that wasn’t the case. . . there is something unusual even with the latest 2019.2.0b5

It won’t load the VS project properly with either VS2017 or vs 2019

Ohhhhh I got something interesting. . . .
If I load a project with 2019.1.2f1 then I upgrade it to 2019.2.0b5 the project connect properly
I just can’t create a project for the beta initially and have it connect.

I hope that helps

More insight. . . . When I add Project Tiny to the project, load a DOTS project it reverts to the “Start” not “Attach to Unity” Behavior"

Again downgrading project by removing .csproj files, .sln files, Library folder, .vs folder obj folder and upgrading using 2019.1.2f1 allowed project files to be loaded correctly in VS. BUT upgrading to Beta from then does not work note Tiny added an additional .csproj file . Perhaps it is the culprit

Thanks for the updates! Since upgrading didn’t resolve the issue, could you please submit a bug report with the information you have provided here? That way we can properly track the issue in our system and also get your editor logs. Please post the issue ID of the bug report here if you do.

1 Like

Bug Posted
Case 1162474

1 Like

I think I found a clue. . . this happens when you start a 2D project. . . the 3d project seems to behave properly.

Same issue did occur in Beta 5 and 6 with a 2D project

Hi
I also encountered this problem, the new project created with unity 2019.2.0b6 version can not be attached to unity in vs. Have you solved it?

1 Like

Nope, problem persist in current beta build

This can only downgrade the project to 2019.1, but helpless

I’m also experiencing this problem.

VS ‘installed products’

Microsoft Visual Studio Community 2019
Version 16.1.5
VisualStudio.16.Release/16.1.5+29025.244
Microsoft .NET Framework
Version 4.7.03056

Installed Version: Community

Visual C++ 2019   00435-60000-00000-AA214
Microsoft Visual C++ 2019

Azure App Service Tools v3.0.0   16.1.429.50124
Azure App Service Tools v3.0.0

C# Tools   3.1.1-beta4-19281-06+58a4b1e79aea28115e66b06f850c83a3f1fcb6d3
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

NuGet Package Manager   5.1.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

Visual Assist   10.9.2333.0
For more information about Visual Assist, see the Whole Tomato Software website at http://www.WholeTomato.com. Copyright (c)1997-2019 Whole Tomato Software, LLC

Visual Basic Tools   3.1.1-beta4-19281-06+58a4b1e79aea28115e66b06f850c83a3f1fcb6d3
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Unity   4.1.1.0
Visual Studio Tools for Unity

my Manifest.json is attached.

4717646–446141–manifest.json.txt (1.88 KB)

For those looking for a workaround: You can attach manually by selecting Debug -> Attach Unity Debugger in VS.

3 Likes