- Home /
Why does a script launched in Visual Studio from Unity say "Unrecognized Guid Format"?
So, I recently updated from Unity 5 to 2017.3.0f3. I had some problems getting this back in order but things are slowly returning to normal. I'm trying to open a Unity script in Visual Studio. Unity will launch Visual Studio and you even see the files in the project, but it keeps showing error windows. Also, MonoDevelop will additionally start up. At first, MonoDevelop was having trouble running until I updated the Gtk# for Windows. Now, I still get those error windows in Visual Studio.
The popup window that keeps coming up says "The 'Microsoft.VisualStudio.Editor.Implementation.EditorPackage' package did not load correctly. The problem may have been caused bya configuration change or by the installation of another extension..."
When I try to open the script file in Visual Studio as I see it there in the Solution panel, I get an error window saying "Unrecognized Guid format".
So, how might I get Unity to open scripts in Visual Studio without a problem...?
Just wanted to add that when I open the .sln file Unity created, I'm able to open the script file just fine. It's only when opening the script from Unity that I get all the errors. Working with the script file after opening the Solution file directly in VS appears to be a workaround for now.
According to %APPDATAA%\Roa$$anonymous$$g\$$anonymous$$icrosoft\VisualStudio\15.0_8df82ecc\ActivityLog.xml
, I think the bulk of the real error is:
LegacySitePackage failed for package [$$anonymous$$icrosoft.VisualStudio.Editor.Implementation.EditorPackage]Source: 'mscorlib' Description: Unrecognized Guid format. System.FormatException: Unrecognized Guid format. at System.Guid.TryParseGuid(String g, GuidStyles flags, GuidResult& result) at System.Guid..ctor(String g) at $$anonymous$$icrosoft.VisualStudio.Editor.Implementation.LanguageServiceToContentType$$anonymous$$apper.$$anonymous$$akeLanguageServiceContentTypes(SettingsStore settingsStore) at $$anonymous$$icrosoft.VisualStudio.Editor.Implementation.LanguageServiceToContentType$$anonymous$$apper.InitLanguageServiceToContentType$$anonymous$$apper(IServiceProvider serviceProvider) at $$anonymous$$icrosoft.VisualStudio.Editor.Implementation.EditorPackage.Initialize() at $$anonymous$$icrosoft.VisualStudio.Shell.Package.$$anonymous$$icrosoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)
And I have a feeling the incorrect GUID Unity is using might be E269B994-EF71-4CE0-8BCD-581C217372E8 ins$$anonymous$$d of the EE04719D-5C14-A3C9-B8B3-A1914BD2798B as defined in the <ProjectGuid>
element in the .csproj file.
I also wanted to add that although I've not found a solution, a workaround that seems to be okay for now is that I can open the Solution file independently in Visual Studio and then edit the script files without issue from there. So there's only a problem when opening the scripts from Unity.
Hi, does anyone have this problem still? I got it now in 2020 and, 2018, and 2021. Same as @enderandpeter said. Can start script from VS but whenever I go from Unity it gives me an error and "Unrecognized Guid Format" issue.
Answer by Ginxx009 · Jan 15, 2018 at 01:13 AM
Try this solution mate
Navigate to devenv.exe by right clicking Visual Studio from start, click properties, and select "Open File Location...".
Right click on devenv.exe and select "Troubleshoot Compatibility".
Click "Troubleshoot Program"
Uncheck "it worked with older versions of windows"
Click "Next"
Click "Test the program"
Confirm everything opens correctly
Click "Next"
Click "Yes, save these settings for this program"
If this doesn't work for you try running the VS as administration .
I'm not sure if changing the compatibility settings or forcing it to run as ad$$anonymous$$ is the best solution for my case because I use Visual Studio for other C# program$$anonymous$$g as well and it has not had any problem from what I can tell, and I'm wary of inadvertently causing another issue. I'm somewhat doubtful that's the culprit because there's just no way the latest IDE from $$anonymous$$icrosoft has compatibility issues with the latest OS from the same company.
Also, when I open the Solution file for the Unity scripts directly from VS, I'm able to edit the scripts without issue, leading me to believe that VS itself is probably okay but something's off with the way Unity is launching this Solution.
Hi, does anyone have this problem still? I got it now in 2020 and, 2018, and 2021. Same as @enderandpeter said. Can start script from VS but whenever I go from Unity it gives me an error and "Unrecognized Guid Format" issue.
Your answer
Follow this Question
Related Questions
How to get referenced object from TransparentProxy? 0 Answers
Unity scripting - Script one can't find script2 via getComponent but script2 can 1 Answer
Multiple Cars not working 1 Answer
Keeping the int value "min" to be used in another scene. 2 Answers
Script not checking if a different script is active. 1 Answer