Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Jalzu07 · Nov 23, 2021 at 06:20 PM · photonvisual studio.netpunexternal-tools

This Unity project was not generated for the Visual Studio Tools for Unity error.

Hi!

I have been making my multiplayer game using Photon Pun 2 for some time now, but suddenly now when I opened Visual Studio there was a text saying: This Unity project was not generated for the Visual Studio Tools for Unity. In your Unity Editor, please go to Preferences > External Tools and select Visual Studio for a better experience.

At the same time I got many errors because Visual Studio did not recognize the namespace Photon.Pun anymore. I tried fixing this by updating Photon from the unity package manager and by updating Visual Studio to a newer version (when doing this Visual Studio warned me for using .Net core version 2.1). This didn't help at all and I still have the same issue.

I went to unity preferences > external tools and the external script editor was set to Visual Studio Community 2019 [16.11.7] and the other options were open by file extension and browse. In the external tools menu there were many options for generating .csproj files for. From those I have checked embedded packages and local packages.

In the package manager where I downloaded Pun 2 there was still the import button visible even though I think I have all the photon stuff required. I was scared of Photon stuff breaking if I press the import button so I didn't do it. Also I didn't see the Pun 2 in the in project section of the package manager.

I also opened Visual Studio in another project and I didn't get the This Unity project was not generated for the Visual Studio Tools for Unity error.

I'd greatly appreciate any help! and sorry for my bad english.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by Jalzu07 · Nov 24, 2021 at 02:05 PM

I fixed the issue by regenerating project files

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mandroide · Feb 03 at 05:46 PM 0
Share

I just deleted Assembly-CSharp.csproj y Project.sln, then regenerate them opening the scripts from Unity Editor and it was solved.

avatar image fashrista · Mar 14 at 07:44 AM 0
Share

@Mandroide Have deleted both, the .sln and . csproj files many times, and after regenerating them it always worked for a couple of hours, sometimes even days, but then failed again(the same warning/error). A few weeks ago I have switched back to VScommunity 2019 and had no problems ever since. (Which is strange because this bug was first reported for vs 2019).

avatar image
2

Answer by deegeeooh · Nov 27, 2021 at 02:11 PM

I have the same problem since I changed to Visual Studio 2022 from 2019 recently;

  • Installed VS Studio 2022 including the Unity development tools

  • Set external Script editor to VS studio 2022 in preferences/External script editor

  • same settings ticked in preferences : embedded and local packages

'This Unity project was not generated for the Visual Studio Tools for Unity. In your editor go to preferences > external tools and select Visual Studio foa a better experience.

  • Regenerating project files doesn't solve this.

  • When I change back to VS 2019 in preferences/External script editor, no error msg.

Anybody got any idea why this is happening?

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MihaMarn · Jan 24 at 08:14 PM 0
Share

Exactly the same problem here. Annoying as f

avatar image CGCowboy · Mar 13 at 09:04 PM 0
Share

Same exactly problem. I also tried to regenerate project files and even reinstalled Visual Studio Tools for Unity but no luck.

avatar image
1

Answer by FourthMouse · Apr 25 at 05:32 PM

For anyone else running into this, I was able to skirt around the issue by just leaving the editor set to 2019 community (Edit -> Preferences -> External Tools), regenerating the project files in unity, and then manually opening the .sln file with 2022.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by blonewolfs · Apr 28 at 09:32 AM

For me, the problem was that I had the wrong package installed in Unity. I had "Visual Studio Code Editor" installed instead of "Visual Studio Editor". Once I got the correct one installed and re-opened my scripts, the alert message was gone.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

151 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

[resolved] Visual Studio does not find a namespace from the project 1 Answer

Photon realtime gameplay and screen local player 0 Answers

Photon Network instantiate problem when Master changes 0 Answers

[PUN2] Problem at pushing the other players 1 Answer

pun 2 change view Id of local player ? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges