Click here to Skip to main content
15,868,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using unity to make a game for the first time but The program gives an error called "The type or namespace name 'VisualStudioInstallation' could not be found (are you missing a using directive or an assembly reference?)". How can I fix this?

What I have tried:

I tried to delete Visual Studio and re-download it but it didn't work. I dont know how I can do this.
Posted
Updated 27-Sep-20 22:50pm

You need to add the reference to VisualStudioInstallation to your project if it is not already added, and insert a using statement in your code to refer to items from the namespace.
 
Share this answer
 
There is no "standard" namespace or class called "VisualStudioInstallation" so either you have mistyped it, or produced it yourself. If the latter, have you forgotten to add an assembly reference to each project that needs to access it (Adding Assembly References in Microsoft Visual Studio - TestStand 2019 Help - National Instruments[^]) and a using line to each file in the project to make the access simpler?
If you got your code from somewhere, then you have either not followed the "get it working" instructions or the author didn't provide any. The latter implies he knows about as much as you do: find something else! :laugh:

To be honest, if you are a complete beginner - and your question would imply that - I'd strongly suggest that you leave Unity and games out of the equation for a while, and become good and familiar with C# (or VB, if you must) and Visual Studio first. There is a lot to learn in that allone, before you start branching out into the massiveness of confusion that is Unity as well!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900