My projects can't find each other in Visual Studio
I'm currently using version 20.20.2.2f1 and the newest version of Visual Studio Community 2019 (16.8.4)
In my project I'm using SimpleInput found in Asset Store. This has worked fine until yesterday when I tried to add a CustomEditor script. Now neither SimpleInput or my CustomEditor works
The problems are that CustomEditor (Assembly-CSharp-Editor project) can't find the classes from the main project (Assembly-CSharp) and the main project can't find SimpleInput (SimpleInput.Runtime project)
At first when I added my CustomEditor script, the SimpleInput was fine, but in search of a solution for CustomEditor I managed to break any connection to SimpleInput. This was done by adding Assembly Definition and Assembly Definition Reference objects to the main project and the editor folder. While this did fix the CustomEditor problem, it created the problem for CustomEditor. I tried to roll it back to before, but now nothing works. I tried reimporting SimpleInput
The Build Order seems fine. It has the following: SimpleInput.Runtime SimpleInput.Editor Assembly-CSharp Assembly-CSharp-Editor
The problem is only when it's open in visual Studio. I can still run it in Unity, but it makes scripting much more difficult
I tried to delete all .sln and .csproj files to get Unity to rebuild them, but that didn't help
SimpleInput.Editor requires SimpleInput.Runtime, but as with all others, this one can't find the required project. I can see under references that the reference seems to be correct. Here's what's written in the csproj files:
SimpleInput.Runtime.csproj:
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<RootNamespace></RootNamespace>
**<ProjectGuid>{E2857400-636D-B3CC-C6EB-0802E8039CF4}</ProjectGuid>**
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<AssemblyName>SimpleInput.Runtime</AssemblyName>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseDirectory>.</BaseDirectory>
</PropertyGroup>
Assembly-CSharp.csproj:
<ItemGroup>
<ProjectReference Include="SimpleInput.Runtime.csproj">
**<Project>{E2857400-636D-B3CC-C6EB-0802E8039CF4}</Project>**
<Name>SimpleInput.Runtime</Name>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="SimpleInput.Editor.csproj">
<Project>{2054931F-D4C4-1192-5058-067B703F24F3}</Project>
<Name>SimpleInput.Editor</Name>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
The references are there, Visual Studio just can't seem to figure it out
Anybody else who has experienced this?
Have you tried removig all the solution and leaving visual generate them again?
Yeah, I have tried that, didn't do anything I also tried reinstalling Visual Studio
Have you tried creating an empty project, import the assets and the editor script, see if it works fine and try to find diference in the csproj or visual config?
Your answer
Follow this Question
Related Questions
Where is the Definition for Unity AsmDef Files? 0 Answers
Visual studio cannot find references to dlls from custom assembly definitions 2 Answers
How to get started with Azure Blobg Storage? (How to I add the correct namespace?) 1 Answer
UnityEngine .DLL files are buried under Managed/UnityEngine/ 0 Answers
Editor script can't find a class outside of Editor folder 0 Answers