Missing SLN file

So anytime I click on a .cs file I get an error message that the .sln file that is defined can’t be found. I’m using 2018.2, so not sure if that is the issue, but I’m basically missing all of my definitions. I can call the methods just fine so it’s more of an annoyance than anything, but I’d love to have the auto fill for the code. I’m thinking this will become a bigger issue later to know if I’m calling the right method. Any ideas?

So no one has anything? Ugh. I know the .sln is the VS project file, but it was not in the zip and I’m not sure if I should create it myself in a missed step or I just missed something somewhere. It’s referred to in the other scripts, but doesn’t exist. Should I create and import the other files into the project?

What version of Visual Studio do you have? I am using Visual Studio 2017 version 15.9.2 and I never had this had this issue. When you describe you are using 2018.2 you most likely are talking about the Unity program version you are using. Did you setup Unity access Visual Studio properly? Is Visual Studio up to date? Can you create a new Unity project and import the Unity package provided by the instructor into the new project?

Hi Joe,

When you create a new project in Unity, and add a script file, when you then double-click/open that script file, Unity will create both the Visual Studio solution and project files for you.

In the case of Terminal Hacker, you are already being provided with some scripts, so, you should be able to create your Hacker.cs script file, double-click it and the solution, with project(s) should open within Visual Studio.

In the Solution Explorer, if you note that it has loaded zero projects you may be experiencing a known issue with Visual Studio Tools for Unity (version 3.9.0.2), details below.

Hope this helps :slight_smile:


See also;

Hi guys,

Thanks so much for the responses. I was doing some looking around on the Udemy Q&A side as well last night and think you may be right about the issue. I did create the file and it came up in VS, but I got the .sln error. Another user was saying, as you did in your link, that he had to reinstall the plugin tools for Unity within VS and that fixed his issue. I haven’t gotten to try it yet, but I think that will probably fix my issue also. I’ll update as soon as I get to try it, hopefully tonight after work. Thanks again for the responses!

Joe

Hi Joe,

Please do read the above link - the fix to the Visual Studio Tools for Unity hasn’t been released yet, so you have to request a preview version. The corrected version is 3.9.0.3.

Let us know how you get on.

I had an update for Visual Studio that i had not installed yet. When I installed this if fixed my issues and allowed solutions to be created. Thanks for the help, folks!

Joe

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms