Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid project name (doubles at solution-file) for unity project #1645

Closed
Leopotam opened this issue Jul 18, 2017 · 7 comments
Closed

Invalid project name (doubles at solution-file) for unity project #1645

Leopotam opened this issue Jul 18, 2017 · 7 comments
Assignees
Milestone

Comments

@Leopotam
Copy link
Contributor

Leopotam commented Jul 18, 2017

Environment data

dotnet --info output:
.NET Command Line Tools (1.0.1)
Product Information:
Version: 1.0.1
Commit SHA-1 hash: 005db40cd1
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.12
OS Platform: Darwin
RID: osx.10.12-x64
Base Path: /usr/local/share/dotnet/sdk/1.0.1

VS Code version:
release 1.14.1 (1.14.1)

C# Extension version:
master-branch 7bf887a

Steps to reproduce

Check this solution (.sln) file:

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LeopotamGroupLibrary", "Assembly-CSharp.csproj", "{0279C7A5-B8B1-345F-ED42-A58232A100B3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LeopotamGroupLibrary", "Assembly-CSharp-firstpass.csproj", "{CD80764A-B5E2-C644-F0D0-A85E486306D8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LeopotamGroupLibrary", "Assembly-CSharp-Editor.csproj", "{BEDD06D2-DCFB-A6D5-CAC1-1320A679D62A}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{0279C7A5-B8B1-345F-ED42-A58232A100B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{0279C7A5-B8B1-345F-ED42-A58232A100B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{0279C7A5-B8B1-345F-ED42-A58232A100B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{0279C7A5-B8B1-345F-ED42-A58232A100B3}.Release|Any CPU.Build.0 = Release|Any CPU
		{CD80764A-B5E2-C644-F0D0-A85E486306D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{CD80764A-B5E2-C644-F0D0-A85E486306D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{CD80764A-B5E2-C644-F0D0-A85E486306D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{CD80764A-B5E2-C644-F0D0-A85E486306D8}.Release|Any CPU.Build.0 = Release|Any CPU
		{BEDD06D2-DCFB-A6D5-CAC1-1320A679D62A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{BEDD06D2-DCFB-A6D5-CAC1-1320A679D62A}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{BEDD06D2-DCFB-A6D5-CAC1-1320A679D62A}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{BEDD06D2-DCFB-A6D5-CAC1-1320A679D62A}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
	GlobalSection(MonoDevelopProperties) = preSolution
		StartupItem = Assembly-CSharp.csproj
	EndGlobalSection
EndGlobal

Expected behavior

Actual behavior

[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Detecting projects in '/Users/leopotam/Documents/unity/private/LeopotamGroupLibrary/LeopotamGroupLibrary.sln'.
[fail]: OmniSharp.Services.WorkspaceHelper
        The project system 'OmniSharp.MSBuild.MSBuildProjectSystem' threw exception during initialization.
Microsoft.Build.Exceptions.InvalidProjectFileException: The solution file has two projects named "LeopotamGroupLibrary".  /Users/leopotam/Documents/unity/private/LeopotamGroupLibrary/LeopotamGroupLibrary.sln
  at Microsoft.Build.Shared.ProjectFileErrorUtilities.VerifyThrowInvalidProjectFile (System.Boolean condition, System.String errorSubCategoryResourceName, Microsoft.Build.Shared.BuildEventFileInfo projectFile, System.Exception innerException, System.String resourceName, System.Object[] args) [0x00080] in <bdf083ca20c84af487947992fd9a4a29>:0 
  at Microsoft.Build.Shared.ProjectFileErrorUtilities.VerifyThrowInvalidProjectFile (System.Boolean condition, System.String errorSubCategoryResourceName, Microsoft.Build.Shared.BuildEventFileInfo projectFile, System.String resourceName, System.Object[] args) [0x00001] in <bdf083ca20c84af487947992fd9a4a29>:0 
  at Microsoft.Build.Construction.SolutionFile.ParseSolution () [0x00233] in <bdf083ca20c84af487947992fd9a4a29>:0 
  at Microsoft.Build.Construction.SolutionFile.ParseSolutionFile () [0x000a4] in <bdf083ca20c84af487947992fd9a4a29>:0 
  at Microsoft.Build.Construction.SolutionFile.Parse (System.String solutionFile) [0x0000f] in <bdf083ca20c84af487947992fd9a4a29>:0 
  at OmniSharp.MSBuild.MSBuildProjectSystem.GetProjectPathsFromSolution (System.String solutionFilePath) [0x0001b] in <29789f34248c4beb8ab005fcd83b5c19>:0 
  at OmniSharp.MSBuild.MSBuildProjectSystem.GetInitialProjectPaths () [0x0002f] in <29789f34248c4beb8ab005fcd83b5c19>:0 
  at OmniSharp.MSBuild.MSBuildProjectSystem.Initalize (Microsoft.Extensions.Configuration.IConfiguration configuration) [0x00064] in <29789f34248c4beb8ab005fcd83b5c19>:0 
  at OmniSharp.Services.WorkspaceHelper.Initialize (OmniSharp.OmniSharpWorkspace workspace) [0x0004d] in <e03504cc94844af48e0d4602ef34ed71>:0 
@DustinCampbell
Copy link
Member

sigh -- it seems like the MSBuild solution parser really dislikes Unity solutions.

@DustinCampbell DustinCampbell added this to the 1.12 milestone Jul 18, 2017
@Leopotam
Copy link
Contributor Author

@DustinCampbell well, it works on 1.11 plugin version without issues.

@DustinCampbell
Copy link
Member

DustinCampbell commented Jul 18, 2017

Yes, I recently updated OmniSharp to move us over to the MSBuild solution parser, which appears to do a lot of extra work to verify that a solution is 100% correct. I suppose that makes sense since MSBuild should be more resilient while IDE tools should be a bit more lenient.

@Leopotam
Copy link
Contributor Author

@DustinCampbell its valid solution file for all IDE-s except vscode with c#-omnisharp plugin. It means - plugin totally broken and not usable on OSX / Linux (on Windows standard fat IDE VisualStudio can be used without any issues with omnisharp wrong behaviour). Ok, i see, then this plugin useless for unity devs, issue closed.

@DustinCampbell
Copy link
Member

Please don't close this. I do intend to fix it!

@DustinCampbell
Copy link
Member

DustinCampbell commented Jul 18, 2017

Sorry if I implied that I wouldn't fix the issue, that wasn't intentional. I was just thinking through why the problem occurs with the latest sources. 😄

@DustinCampbell
Copy link
Member

This will be fixed when we take the next OmniSharp update into C# for VS Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants