Budweiser
Budweiser

Reputation: 91

UnityVS visual studio can not open

I use UnityVS generate visual studio project, but project file *.CSharp.csproj could not open.

I find the problem is that ProjectTypeGuids use a unkown type : E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1 , and google also could not tell me what's that.

anyone has the same problem?

The project file is :

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>10.0.20506</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{70B74EA9-8515-0DD0-B4E6-E001BFFC1148}</ProjectGuid>
    <OutputType>Library</OutputType>
    <RootNamespace></RootNamespace>
    <AssemblyName>Assembly-CSharp</AssemblyName>
    <FileAlignment>512</FileAlignment>
    <ProjectTypeGuids>{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <TargetFrameworkProfile>Unity Subset v3.5</TargetFrameworkProfile>
    <CompilerResponseFile></CompilerResponseFile>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>Temp\UnityVS_bin\Debug\</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <DefineConstants>DEBUG;TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_2;UNITY_4_2;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE</DefineConstants>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>Temp\UnityVS_bin\Release\</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <DefineConstants>TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_2;UNITY_4_2;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE</DefineConstants>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="mscorlib" />
    <Reference Include="System" />
    <Reference Include="System.XML" />
    <Reference Include="System.Core" />
    <Reference Include="Boo.Lang" />
    <Reference Include="UnityScript.Lang" />
    <Reference Include="UnityEngine">
      <HintPath>Library\UnityAssemblies\UnityEngine.dll</HintPath>
    </Reference>
    <Reference Include="UnityEditor">
      <HintPath>Library\UnityAssemblies\UnityEditor.dll</HintPath>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Assets\Scripts\scaleform\SFCamera.cs" />
    <Compile Include="Assets\Scripts\scaleform\SFCxForm.cs" />
    <Compile Include="Assets\Scripts\scaleform\SFDisplayInfo.cs" />
    <Compile Include="Assets\Scripts\scaleform\SFDisplayMatrix.cs" />
    <Compile Include="Assets\Scripts\scaleform\SFEvents.cs" />
    <Compile Include="Assets\Scripts\scaleform\SFGamepad.cs" />
    <Compile Include="Assets\Scripts\scaleform\SFInitParams.cs" />
    <Compile Include="Assets\Scripts\scaleform\SFKey.cs" />
    <Compile Include="Assets\Scripts\scaleform\SFLifecycleEvent.cs" />
    <Compile Include="Assets\Scripts\scaleform\SFManager.cs" />
    <Compile Include="Assets\Scripts\scaleform\SFManager_Imports.cs" />
    <Compile Include="Assets\Scripts\scaleform\SFMovie.cs" />
    <Compile Include="Assets\Scripts\scaleform\SFMovie_Imports.cs" />
    <Compile Include="Assets\Scripts\scaleform\SFRTT.cs" />
    <Compile Include="Assets\Scripts\scaleform\SFSentinal.cs" />
    <Compile Include="Assets\Scripts\scaleform\SFValue.cs" />
    <Compile Include="Assets\Scripts\scaleform\SFValue_Imports.cs" />
    <Compile Include="Assets\Scripts\UI\MyCamera.cs" />
  </ItemGroup>
  <Import Project="$(MSBuildExtensionsPath)\SyntaxTree\UnityVS\2012\UnityVS.CSharp.targets" />
</Project>

Upvotes: 8

Views: 18135

Answers (10)

Max Di Fraia
Max Di Fraia

Reputation: 11

In my case the problem was that I removed a needed .Net package. I solved by opening Visual Studio Installer and checking again the box "Game Development with Unity", doing this it will download again all the missing packages.

Upvotes: 0

alex_smither
alex_smither

Reputation: 1

Stopped getting this error after just removing the Visual Editing package in Unity's Package Manager. No errors so far.

Upvotes: 0

Chris
Chris

Reputation: 482

I know this is an old question, but this took me about a day to solve. For my use case:

  • I had a Unity 2021.1.x project. I upgraded to 2021.2.x (actually a completely clean install - I reinstalled windows) and visual studio 2022 17.2 preview.
  • I deleted all of the .sln and .csproj files from the root (backing them up, of course).
  • I regenerated all of the csproj files (and sln). Compilation in Unity worked fine, but opening any file in VS yielded the error:
There is a missing project subtype.
Subtype: '{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1}' is unsupported by this installation.
  • Forcefully uninstalling and reinstalling the workload "Game development with Unity" from the visual studio installer worked, and subsequent regeneration of the project and solution files yielded no issues.

Upvotes: 1

bnezo
bnezo

Reputation: 1

I had the same problem in Visual Studio 2010 Professional after I uninstalled another version of Visual Studio I wasn't using (2013 Express).

None of the other solutions worked for me, but after doing a repair of VS2010 using the installation disk it started working again.

Upvotes: 0

Brien Foss
Brien Foss

Reputation: 3367

I was getting the error "This project is incompatible with the current version of Visual Studio". A "repair" would not fix the problem, but uninstalling and reinstalling with no 'devenv.exe processes running, was the solution. I was using Visual Studio 2013 Community, and opened the project via the Unity toolbar (Visual Studio Tools\Open in Visual Studio).

@Jb Evain - Additional thanks to you for pointing me in the right direction on my own similar problem.

Upvotes: 0

Artem Koval
Artem Koval

Reputation: 1

Full remove of UnityVS and reinstall helped me with Visual Studio 2013 Ultimate. Also removed and reimported UnityVS package in Unity project, not sure if this is required.

Upvotes: 0

pumpkinszwan
pumpkinszwan

Reputation: 1352

A solution that worked for me was to forcibly re-import the Visual Studio Tools for Unity asset in my Unity project (by importing a custom package and navigating to the package in the Program Files folder).

I think the older version of the tool was not being replaced in my Unity projects even when I re-installed the tool and added it in the usual way.

Upvotes: 2

genail
genail

Reputation: 91

I've fixed this issue by removing and installing UnityVS again. The "Repair" function of UnityVS installer has not changed anything, so I needed to uninstall it completely first.

Upvotes: 7

Jb Evain
Jb Evain

Reputation: 17509

This typically happens in three different scenarios:

  • The user is using a trial version of Visual Studio. Currently UnityVS requires a full Visual studio.
  • The installation failed to recreate the Visual Studio extension cache. We saw this happen if there was a stray devenv.exe process. Make sure no devenv.exe process is running, and re-install UnityVS.
  • The user has an old cracked version of UnityVS installed in the GAC which conflicts with the current UnityVS.

There's also the case where you haven't installed the .NET 3.5 framework which is required by Unity (Unity's class library is a subprofile of .NET 3.5), but the error message is usually explicit about this.

Upvotes: 9

Rambo Ong Ping Ping
Rambo Ong Ping Ping

Reputation: 43

You can manually remove these tags inside proj file.

<ProjectTypeGuids></ProjectTypeGuids>

The error message should be gone, but you're not able to use the debug function. I am still looking for a solution.

Upvotes: 2

Related Questions