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

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 opened this issue Jan 4, 2018 · 6 comments · Fixed by #53
Labels
Milestone

Comments

@icnocop
Copy link

icnocop commented Jan 4, 2018

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
Copy link
Owner

3F commented Jan 4, 2018

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.

@3F 3F added the bug label Jan 4, 2018
@icnocop
Copy link
Author

icnocop commented Jan 6, 2018

Thank you.

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

@3F
Copy link
Owner

3F commented Jan 6, 2018

@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
Copy link

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

@3F
Copy link
Owner

3F commented Sep 28, 2018

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
Copy link
Owner

3F commented May 3, 2019

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: 3F/MvsSln@fd076ac

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.

@3F 3F closed this as completed in #53 Aug 4, 2019
@3F 3F added this to the 0.12.12 milestone Aug 4, 2019
3F added a commit that referenced this issue Sep 26, 2019
* NEW: Integration with MvsSln project. v2.4 PR #53.
       Replaces processing from IsolatedEnv/MSBuild/+ and fully removes our old parser.
       Finally it fixes lot of bugs (such as: #42, #41, #40,..) and also improves performance.
       https://github.com/3F/MvsSln

* NEW: Open Source independent script engines under the MIT License. Issue #55.

* NEW: Integration with E-MSBuild project. v1.14. Part of PR #56.
       Advanced Evaluator of MSBuild scripts with user-variables support through Varhead and more.
       https://github.com/3F/E-MSBuild

* NEW: Integration with SobaScript -- an Extensible Modular Scripting Programming Language.
       Part of PR #56.
       https://github.com/3F/SobaScript

* NEW: Included SobaScript Components:
       Z.Core: https://github.com/3F/SobaScript.Z.Core
        * ConditionComponent
        * EvMSBuildComponent
        * UserVariableComponent
        * TryComponent
        * CommentComponent
        * BoxComponent

       Z.Ext: https://github.com/3F/SobaScript.Z.Ext
        * SevenZipComponent
        * NuGetComponent
        * FileComponent
        * FunctionComponent

       Z.VS: https://github.com/3F/SobaScript.Z.VS
        * DTEComponent
        * OwpComponent
        * BuildComponent

* FIXED: Possible "Can not load 7-zip library or internal COM error"
         When using x64 instance. Issue #38.

* FIXED: Possible "An equivalent project is already present in the project collection."
         Issue #42.

* FIXED: Possible incorrect projects for MSBuild Properties
            ~ $(TargetFrameworkVersion:Metadata) Issue #41.

* FIXED: Failed getting project from EnvDTE. Issue #40.

* CHANGED: Increased performance when evaluating data and scripts.

* CHANGED: Updated 7z.Libs 19.0.1.

* CHANGED: Updated AvalonEdit 5.0.4

* CHANGED: Updated Microsoft.VisualStudio.Shell.15.0 15.9.28307

* CHANGED: SDK15 packages only:
           Updated Microsoft.Build & Microsoft.Build.Framework 16.0.461

* CHANGED: Updated EnvDTE 8.0.2

* CHANGED: Updated EnvDTE80 8.0.3

* CHANGED: Updated Newtonsoft.Json 12.0.2

* CHANGED: Updated Microsoft.VisualStudio.SDK.EmbedInteropTypes 15.0.27

* CHANGED: StreamJsonRpc 2.0.208

* CHANGED: System.ValueTuple 4.5.0

* CHANGED: NuGet package `vsSBE.CI.MSBuild` is obsolete. Please use new:
           https://www.nuget.org/packages/vsSolutionBuildEvent
           Also new 'tools\' folder instead of 'bin\'.

* KNOWN: Possible Failed Project.Pre/Post-binding: 'Object reference not set to an instance of an object.'
         Issue #43.
         Please enable debug mode, we're waiting for your reports.

* KNOWN: Known problem for VS2019. Build can be started before activation of our plugin.
         This is a feature of the modern VS platform with lazy loading of all plugins.
         Solution:
         Just attach once our [status panel] and this will always activate our plugin before start.

* KNOWN: Known problem when deactivated [Status Panel] from `View` - `Other Windows`.
         Incorrect identifier in previous version produces wrong tool.
         Solution:
         Just close this panel. Then, open it again from `View` - `Other Windows`.

* NOTE: Please note. New releases has been migrated from SourceForge to GitHub Release Page:
        https://github.com/3F/vsSolutionBuildEvent/releases
        https://vssbe.r-eg.net/Downloads/

* NOTE: Here is about SDK10 / SDK15 packages:
        https://vssbe.r-eg.net/doc/Usage/#sdk10--sdk15-versions
3F added a commit to 3F/vsCommandEvent that referenced this issue Oct 21, 2019
* NEW: Visual Studio 2019 full support. SDK15.

* NEW: Complete integration with VS2017. SDK15.

       For VS2017 will be also available old SDK10 package implementation.
       But SDK15 is recommended.

* NEW: Integration with MvsSln project. v2.5.
       Replaces processing for Advanced MSBuild.
       https://github.com/3F/MvsSln

* NEW: Integration with E-MSBuild project. v1.14.
       Advanced Evaluator of MSBuild scripts with user-variables support through Varhead and more.
       https://github.com/3F/E-MSBuild

* NEW: Integration with SobaScript -- an Extensible Modular Scripting Programming Language.
       https://github.com/3F/SobaScript

* NEW: Included SobaScript Components:
       Z.Core: https://github.com/3F/SobaScript.Z.Core
        * ConditionComponent
        * EvMSBuildComponent
        * UserVariableComponent
        * TryComponent
        * CommentComponent
        * BoxComponent

       Z.Ext: https://github.com/3F/SobaScript.Z.Ext
        * SevenZipComponent
        * NuGetComponent
        * FileComponent
        * FunctionComponent

       Z.VS: https://github.com/3F/SobaScript.Z.VS
        * DTEComponent
        * OwpComponent
        * BuildComponent

* FIXED: Fixed IEnvironment.ProjectsMBE implementations.

* FIXED: Possible "Can not load 7-zip library or internal COM error"
         When using x64 instance.
         Related Issue 3F/vsSolutionBuildEvent#38

* FIXED: Possible "An equivalent project is already present in the project collection."
         Related Issue 3F/vsSolutionBuildEvent#42.

* FIXED: Possible incorrect projects for MSBuild Properties
            ~ $(TargetFrameworkVersion:Metadata) Issue #41.

* FIXED: Failed getting project from EnvDTE.
         Related Issue 3F/vsSolutionBuildEvent#40.

* CHANGED: Increased performance when evaluating data and scripts due to new SobaScript and E-MSBuild.

* CHANGED: netfx target platform changes:

           * 4.0 only: VS2010, VS2012, VS2013, VS2015, VS2017
           * 4.6 only: VS2017, VS2019

* CHANGED: Replaced old msbuild helper on hMSBuild 2.2
           https://github.com/3F/hMSBuild

* CHANGED: Updated 7z.Libs 19.0.1.

* CHANGED: Updated AvalonEdit 5.0.4

* CHANGED: Updated Microsoft.VisualStudio.Shell.15.0 15.9.28307

* CHANGED: SDK15 packages only:
           Updated Microsoft.Build & Microsoft.Build.Framework 16.0.461

* CHANGED: Updated EnvDTE 8.0.2

* CHANGED: Updated EnvDTE80 8.0.3

* CHANGED: Updated Newtonsoft.Json 12.0.2

* CHANGED: Updated Microsoft.VisualStudio.SDK.EmbedInteropTypes 15.0.27

* CHANGED: StreamJsonRpc 2.0.208

* CHANGED: System.ValueTuple 4.5.0

* NOTE: Our new releases migrated from SourceForge to GitHub Release Page:
        https://github.com/3F/vsCommandEvent/releases

        Most actual information is still here: https://vsce.r-eg.net/Downloads/

* NOTE: Mirror src on bitbucket is obsolete now.
        Please use only GitHub: https://github.com/3F/vsCommandEvent

* NOTE: Here is about SDK10 / SDK15 packages:
        https://vssbe.r-eg.net/doc/Usage/#sdk10--sdk15-versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants