3F / vsSolutionBuildEvent

🎛 Event-Catcher with variety of advanced Actions to service projects, libraries, build processes, runtime environment of the Visual Studio, MSBuild Tools, and …
Other
78 stars 22 forks source link

Pre-Build error: An equivalent project (a project with the same global properties and tools version) is already present in the project collection #42

Closed icnocop closed 5 years ago

icnocop commented 6 years ago

Hi.

Thank you for vsSBE.

I receive the following error during a build:

7268 [ERROR]: Pre-Build error: An equivalent project (a project with the same global properties and tools version) is already present in the project collection, with the path "C:\dev\App\Project\project.vcxproj". To load an equivalent into this project collection, unload this project first.

.vssbe

{
  "Header": {
    "_": [
      " Current file requires a vsSolutionBuildEvent engine.",
      " Free plugin for Visual Studio or MSBuild Tools:",
      "  * http://visualstudiogallery.msdn.microsoft.com/0d1dbfd7-ed8a-40af-ae39-281bfeca2334/",
      "  * http://vssbe.r-eg.net",
      " Feedback: entry.reg@gmail.com"
    ],
    "Compatibility": "0.9"
  },
  "Components": [
    {
      "ClassName": "InternalComponent",
      "Enabled": true
    },
    {
      "ClassName": "UserVariableComponent",
      "Enabled": true
    },
    {
      "ClassName": "OWPComponent",
      "Enabled": true
    },
    {
      "ClassName": "NuGetComponent",
      "Enabled": true
    },
    {
      "ClassName": "FunctionComponent",
      "Enabled": true
    },
    {
      "ClassName": "FileComponent",
      "Enabled": true
    },
    {
      "ClassName": "DTEComponent",
      "Enabled": true
    },
    {
      "ClassName": "BuildComponent",
      "Enabled": true
    },
    {
      "ClassName": "SevenZipComponent",
      "Enabled": true
    },
    {
      "ClassName": "ConditionComponent",
      "Enabled": true
    },
    {
      "ClassName": "MSBuildComponent",
      "Enabled": true
    },
    {
      "ClassName": "CommentComponent",
      "Enabled": true
    }
  ],
  "PreBuild": [
    {
      "Enabled": true,
      "Name": "Act",
      "Caption": "",
      "SupportMSBuild": true,
      "SupportSBEScripts": true,
      "IgnoreIfBuildFailed": false,
      "BuildType": "Common",
      "Confirmation": false,
      "ToConfiguration": [],
      "ExecutionOrder": {
        "$type": "net.r_eg.vsSBE.Events.ExecutionOrder[], vsSolutionBuildEvent",
        "$values": []
      },
      "Process": {
        "$type": "net.r_eg.vsSBE.Events.EventProcess, vsSolutionBuildEvent",
        "Waiting": true,
        "Hidden": false,
        "TimeLimit": 30
      },
      "Mode": {
        "$type": "net.r_eg.vsSBE.Events.ModeFile, vsSolutionBuildEvent",
        "Type": "File",
        "Command": "\"$(SolutionDir)stop service.cmd\"",
        "Command__": [
          "\"$(SolutionDir)stop service.cmd\""
        ]
      }
    }
  ],
  "PostBuild": [],
  "CancelBuild": [],
  "WarningsBuild": [],
  "ErrorsBuild": [],
  "OWPBuild": [],
  "Transmitter": [],
  "CommandEvent": [],
  "Logging": [],
  "SlnOpened": [],
  "SlnClosed": []
}

Windows 10 64-bit Visual Studio 2015 Update 3 vsSBE v0.12.10.10901

3F commented 6 years ago

Thanks for the report,

It can be related for issue #40 Please check it. if so, temporarily you can add ProjectGuid manually for your project file. Should help.

If not, I need to look .sln and both conflicted project files (.vcxproj as I see). In general, how to reproduce.

icnocop commented 6 years ago

Thank you.

But the project already has a ProjectGuid and it's not a duplicate of any other project in the solution.

3F commented 6 years ago

@icnocop

If not, I need to look .sln and both conflicted project files (.vcxproj as I see). In general, how to reproduce.

also please enable debug mode and show log when you open solution

mhatreabhay commented 6 years ago

I am hitting same issue. I don't have any duplicate solution. Is there any way to mitigate this issue?

3F commented 6 years ago

Guys, I need some additional info to reproduce this problem!

@mhatreabhay Can you prepare any demo project to reproduce this? You also can just remove all source code from real project (I don't need this), only .sln + project files (.csproj, .vcxproj, etc.)

3F commented 5 years ago

I have some good news for you

More probably this problem was resolved in the new project: https://github.com/3F/MvsSln Here's patch: https://github.com/3F/MvsSln/commit/fd076accc17ae30c5d6eb0de31d7ba0631e9dfdd

I will look into later. But anyway, we need to replace sln/projects-engine by the new MvsSln. Or temporarily to apply some fixes from this.