No announcement yet.

[CLOSED] [#419] NuGet packages cause squigglies if packages built against two versions of Bridge

  • Filter
  • Time
  • Show
Clear All
new posts

    [CLOSED] [#419] NuGet packages cause squigglies if packages built against two versions of Bridge

    I have a project that I'm using my Bridge.React and ProductiveRage.Immutable libraries with. It appears that if I use a version of Bridge.React that was built against Bridge 1.11.0 and a ProductiveRage.Immutable that was built against 1.11.1, then I will get lots of warnings in the project that I'm actually writing.

    Apologies that this is a bit of a rushed bug report - normally I'd have the real warning message, but I've jumping a bit from one thing to another this afternoon! The warnings were something like

    {whatever} is defined in multiple assemblies in the global alias; using definition from
    where "{whatever}" would be system types.

    Currently, a sample project that I'm working on is in this state (it uses Bridge.React 1.4.6, which was built against Bridge 1.11.0 - despite the NuGet package saying that it requires 1.11.1 - and ProductiveRage.Immutable 1.6.7, which was built against Bridge 1.11.1) -

    If you clone it and try to build it then you should get those errors. I won't have time to fix that repo soon, so it should remain broken for now.

    I thought that I'd be able to reproduce this easily by creating a fresh project and adding Bridge.Reactg 1.4.6 and ProductiveRage.Immutable 1.6.7, but I can't.. so if you can't reproduce from that Bitbucket repo then let me know and I'll try to break things thoroughly again to write a better report.

    A little more information - if you clone that repo ( and build it then it will restore NuGet packages which are built against different versions of Bridge and get a lot of errors (see attached screenshot).

    If the Bridge.React package is upgraded from 1.4.6 to 1.4.7 (the only difference is that 1.4.6 is built against Bridge 1.11.0 and 1.4.7 against 1.11.1) then the errors go away.

    Click image for larger version

Name:	Errors.png
Views:	1
Size:	104.1 KB
ID:	1761


      Hi ProductiveRage!
      Thank you for reporting. We will try to reproduce the issue and provide a feedback.


        Leonid: Binding Redirects may be required. That's just an idea.

        Also should be tested against the changes happening in #419 ( The 419 issue is likely not related, but would be good to test anyways.


          I will try to give the 419 issue a try later, it's worth a go!

          I thought about using binding redirects, as in the web.config "bindingRedirect" configuration, but I think that that only applies at runtime, not compile time! I tried it any way last week and didn't get very far. But if you manage to make it work then that would potentially be a good workaround! If you're talking about some other kind of "Binding Redirects" then just ignore me!


            Were you guys able to reproduce this issue from my repo?


              Hi ProductiveRage,

              Sorry for that delay in replying!

              I could not reproduce these errors.

              What I did:
              - fresh-cloned repo
              - rebuilt the solution

              The package versions in packages.config remain the same, not changed:
              <package id="Bridge" version="1.11.1" targetFramework="net452" />
              <package id="Bridge.React" version="1.4.6" targetFramework="net452" />
              <package id="ProductiveRage.Immutable" version="" targetFramework="net452" />
              Actual packages restored in packages\ folder:
              The output folder contains two js files (i.e. built successfully):
              - BridgeReactTutorial.js
              - BridgeReactTutorial.min.js

              UPD: I use VS2015
              Last edited by Leonid; 2016-04-05 @ 02:27 PM. Reason: Adding details - VS2015


                Click image for larger version

Name:	Initial Warning.png
Views:	1
Size:	22.4 KB
ID:	2009 Click image for larger version

Name:	Build Success.png
Views:	1
Size:	21.6 KB
ID:	2010 Click image for larger version

Name:	Many Errors.png
Views:	2
Size:	52.4 KB
ID:	2011 Click image for larger version

Name:	Many Errors.png
Views:	2
Size:	52.4 KB
ID:	2013

                Oh... :( Thanks for trying to reproduce. Unfortunately, I'm still experiencing the problem. I'm trying it from my work computer (having originally tried on my home PC) and am getting the same issue. Both have VS 2015 Update 1 installed.

                Steps to reproduce are very similar to what you have attempted -

                1. Clone the repo fresh
                2. Observe the warning "This project references NuGet package(s) that are missing on this computer.."
                3. Build the project
                4. Observe in the Output windows that the NuGet packages are being restored and that the build succeeds
                5. View the error list and see 730 errors about types existing in two libraries or not being defined

                The exact version of VS 2015 I'm using is 14.0.24720.00, I've attached screenshots of each step of the process.

                The good news about this is that if I update all NuGet packages to the latest (and then restart VS when prompted), the errors go away. But I'm worried that that is because my updated packages (Bridge.React and ProductiveRage.Immutable) reference the latest version of Bridge and so everything is brought into sync.. will this issue reoccur if you release Bridge 1.12 and I release a Bridge.React package for 1.12 but don't update ProductiveRage.Immutable, leaving it referencing 1.11.2? My biggest concern is not about this particular example product but about the code that we'll be writing over the next few years; it will be problematic if we have to always use NuGet packages that reference the same version of Bridge, even if the packages don't rely on any particular bug fixes in the later Bridge versions.

                It's a bit frustrating that you can't reproduce. Just to make completely sure it's not just me (even though I've tried two of my PCs!) I've just done exactly the same with a colleague and he "successfully" got to step 5; the 730 errors.
                Attached Files
                Last edited by ProductiveRage; 2016-04-05 @ 02:55 PM. Reason: Forgot to attach the screenshots!


                  Thanks for the update. We will run some more tests.


                    I've hit this problem again upgrading to 1.12 - which I'm describing here to try to offer more information, I know that you're already on it :)

                    I had a project with Bridge 1.11 references, using Bridge.React and ProductiveRage.Immutable (the latest vesions) and I upgraded to Bridge 1.12 and now I have many squigglies again (after I restarted VS, which is compulsory after a Bridge upgrade according to NuGet Package Manager / VS).

                    The build process says that it succeeds, but then the error list is full of errors.Click image for larger version

Name:	Errors.png
Views:	1
Size:	66.1 KB
ID:	2024Click image for larger version

Name:	Success.png
Views:	1
Size:	32.0 KB
ID:	2025


                      Hmmm... trying the trick of individually unloading each project and then re-loading them may have cleared it. I'll have to try that on my other problem project. Unloading the entire solution and re-loading it didn't work, though. I wonder what the difference is (if any).


                        Hello Dan!

                        We've gave it another try and were able to reproduce the issue.

                        Those errors are IntelliSense errors.

                        Build Only Errors Click image for larger version

Name:	BuildOnly.PNG
Views:	1
Size:	7.0 KB
ID:	2068

                        IntelliSense Only Errors Click image for larger version

Name:	IntelliSenseOnly.PNG
Views:	1
Size:	12.5 KB
ID:	2069

                        We think that it is not related to Bridge versions mismatch, but you faced the same squiggles IntelliSense problem that was discussed in the GitHub issue #419.

                        Actually, reloading the project helps.

                        There are something we can do to correct it and we'll try to patch it up in 1.12.1. You can read in details in this comment. There are also some notes on upgrading from Bridge 1.x to 1.12.x.

                        Dan, thank you very much for reporting the problem.


                          Thanks for the update! Sounds like, even if it's a bit of a problem with older projects that get upgraded to 1.12.x, any projects built from now into the future won't have the same problem.. if 1.12 introduced a fix / workaround. Which is good.


                            Hi ProductiveRage,

                            We enhanced the workaround to avoid the IntelliSense errors when installing/restoring/updating Bridge NuGet packages (more details here).

                            The fix is in master branch and it would be great if you could check (it becomes "active" after you installed/updated your project to Bridge 1.12.1).


                              Hi ProductiveRage,

                              Were you able to test your solutions with 1.12.1 to confirm whether the red squiggles are still appearing?