locked
Errors and warnings of conflicting dependent verions of assemblies RRS feed

  • Question

  • First off I am not too panicked because I have a recent off site backup of my project from about a month ago but need help if it has the same issues.

    I just opened a project I haven’t in a while to explore doing some new code for a control I thought of today. The Project opened fine and I decided to first run it in the debugger to look at how the control worked and rendered so I could describe what I might change. Without making any changes since the last successful build I got build errors so I wanted to see what was up since sometimes I leave a piece of code uncommented out to remind me to work on it later when I reopen the project this is some specific code I have had for years but not finished. Typically I just re-comment it out if I’m not working on it that day.

    This was not the case today. The errors and warnings are as follows about dependent assembly references conflicting. I’m not sure if it matters but I have been keeping VS2015 up to date with lightswitch however this project runs in VS2012.

    Error 1 Assembly 'Microsoft.Data.Services, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'Microsoft.Data.OData, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'Microsoft.Data.OData, Version=5.6.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' c:\Program Files (x86)\Microsoft WCF Data Services\5.6.4\bin\.NETFramework\Microsoft.Data.Services.dll Server

    Warning 2 Found conflicts between different versions of the same dependent assembly. Server
    Warning 3 Found conflicts between different versions of the same dependent assembly. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 1605 6 Patient Records

    Followed by many more warnings plus one error. The second error is listed at the end.

    I double clicked "warning 2" and was asked (see picture below) in a dialog box “One or more dependent assemblies have version conflicts.  Do you want to fix these conflicts by adding binding redirect records in the app.config file?”.
    I clicked yes and was taken to Microsoft.Common.targets at this line of code (see code block).

    <CODE BLOCK>
        <ResolveAssemblyReference
            Assemblies="@(Reference)"
            AssemblyFiles="@(_ResolvedProjectReferencePaths);@(_ExplicitReference)"
            TargetFrameworkDirectories="@(_ReferenceInstalledAssemblyDirectory)"
            InstalledAssemblyTables="@(InstalledAssemblyTables);@(RedistList)"
            IgnoreDefaultInstalledAssemblyTables="$(IgnoreDefaultInstalledAssemblyTables)"
            IgnoreDefaultInstalledAssemblySubsetTables="$(IgnoreInstalledAssemblySubsetTables)"
            CandidateAssemblyFiles="@(Content);@(None)"
            SearchPaths="$(AssemblySearchPaths)"
            AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)"
            AllowedRelatedFileExtensions="$(AllowedReferenceRelatedFileExtensions)"
            TargetProcessorArchitecture="$(ProcessorArchitecture)"
            AppConfigFile="@(_ResolveAssemblyReferencesApplicationConfigFileForExes)"
            AutoUnify="$(AutoUnifyAssemblyReferences)"
            IgnoreVersionForFrameworkReferences="$(IgnoreVersionForFrameworkReferences)"
            FindDependencies="$(_FindDependencies)"
            FindSatellites="$(BuildingProject)"
            FindSerializationAssemblies="$(BuildingProject)"
            FindRelatedFiles="$(BuildingProject)"
            Silent="$(ResolveAssemblyReferencesSilent)"
            TargetFrameworkVersion="$(TargetFrameworkVersion)"
            TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
            TargetFrameworkMonikerDisplayName="$(TargetFrameworkMonikerDisplayName)"
            TargetedRuntimeVersion="$(TargetedRuntimeVersion)"
            StateFile="$(ResolveAssemblyReferencesStateFile)"
            InstalledAssemblySubsetTables="@(InstalledAssemblySubsetTables)"
            TargetFrameworkSubsets="@(_ReferenceInstalledAssemblySubsets)"
            FullTargetFrameworkSubsetNames="$(FullReferenceAssemblyNames)"
            FullFrameworkFolders="$(_FullFrameworkReferenceAssemblyPaths)"
            FullFrameworkAssemblyTables="@(FullFrameworkAssemblyTables)"
            ProfileName="$(TargetFrameworkProfile)"
            LatestTargetFrameworkDirectories="@(LatestTargetFrameworkDirectories)"
            CopyLocalDependenciesWhenParentReferenceInGac="$(CopyLocalDependenciesWhenParentReferenceInGac)"
            ResolvedSDKReferences="@(ResolvedSDKReference)"
            WarnOrErrorOnTargetArchitectureMismatch="$(ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch)"
            IgnoreTargetFrameworkAttributeVersionMismatch ="$(ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch)"
            ContinueOnError="$(ContinueOnError)"
            Condition="'@(Reference)'!='' or '@(_ResolvedProjectReferencePaths)'!='' or '@(_ExplicitReference)' != ''"
            >
    
          <Output TaskParameter="ResolvedFiles" ItemName="ReferencePath"/>
          <Output TaskParameter="ResolvedFiles" ItemName="_ResolveAssemblyReferenceResolvedFiles"/>
          <Output TaskParameter="ResolvedDependencyFiles" ItemName="ReferenceDependencyPaths"/>
          <Output TaskParameter="RelatedFiles" ItemName="_ReferenceRelatedPaths"/>
          <Output TaskParameter="SatelliteFiles" ItemName="ReferenceSatellitePaths"/>
          <Output TaskParameter="SerializationAssemblyFiles" ItemName="_ReferenceSerializationAssemblyPaths"/>
          <Output TaskParameter="ScatterFiles" ItemName="_ReferenceScatterPaths"/>
          <Output TaskParameter="CopyLocalFiles" ItemName="ReferenceCopyLocalPaths"/>
          <Output TaskParameter="SuggestedRedirects" ItemName="SuggestedBindingRedirects"/>
          <Output TaskParameter="FilesWritten" ItemName="FileWrites"/>
    
        </ResolveAssemblyReference>

    I also get the Error below and many more warnings that followed after clicking yes.

    Error 4 Could not copy the file "C:\Users\Jordan\Documents\Visual Studio 2010\Projects\Patient Records\Patient Records\Server\obj\Debug\Application.Server.dll" because it was not found. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets 114 10 Patient Records

    Most of the other warning seem to be related to these two errors and warning of the type listed above although they are all presented in a different order now.

    <SCREEN SHOT>
    Dependent Fix Dialog Box
    Wednesday, June 15, 2016 4:45 AM

Answers

  • https://msdn.microsoft.com/en-us/library/bb383993.aspx

    The issue is that VS 2012 and visual studio 2015 have conflicting assemblies
    I removed VS 2015 and the add on office tools that run LightSwitch for 2015 and the problem is fixed.
    That said I can't rn 2015 which is prefferd for school on my dev machine.
    I need to look at my project's current state in 2012 to write my website in 2015.
    • Marked as answer by reigh7 Wednesday, October 5, 2016 7:44 PM
    Wednesday, October 5, 2016 7:44 PM

All replies

  • So my offsite backup has the same issue... see below except that the offsite one does not have issues finding the files in my Project Application.Server.dll because of missing Microsoft.LightSwitch.targets.

    Most likely I caused that by clicking yes to the dialog box above. This project version has no other warnings or error then the ones below. This leads me to believe it is something to do with assemblies I have downloaded for the office developer tools version 2 for VS2015 conflicting with this project in LS2012.

    Warning 2 Found conflicts between different versions of the same dependent assembly. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 1605 6 Patient Records
    Error 1 Assembly 'Microsoft.Data.Services, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'Microsoft.Data.OData, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'Microsoft.Data.OData, Version=5.6.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' c:\Program Files (x86)\Microsoft WCF Data Services\5.6.4\bin\.NETFramework\Microsoft.Data.Services.dll Server
    Warning 3 Found conflicts between different versions of the same dependent assembly. Server
    Wednesday, June 15, 2016 7:20 AM
  • I have confirmed all of my previous LS projects in VS 2012 are dead for the same reason conflicts with dependent assemblies. I have no issues with VS 2015 LS projects though.
    Wednesday, June 15, 2016 7:30 AM
  • Hi Reigh,

     To migrate Lightswitch application from vs 2012 to vs 2015, you need modify the following items:
    • Modify the Lspkg Project File
    • Modify the Client Project File
    • Modify the Client.Design Project File
    • Modify the Common Project File
    • Modify the Design Project File
    • Modify the Server Project File
    • Modify the VSIX Project File

    I don't have the sample of migrating to vs 2015, but you could refer to this vs 2013 migration project.

    Regards,

    Angie


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, June 17, 2016 9:39 AM
  • Thank you for the response Angie but I did not attempt to migrate this project. I simply am noting that all of my projects in VS 2012 have stopped working. I also am noting that all of my projects in VS 2015 do work. These projects are mutually exclusive as in not the same projects.
    Sunday, June 19, 2016 1:29 AM
  • HI Reigh,

    Did you install Visual Studio 2012 SDK?

    You need also check the the Lspkg, Client, Client.Design, Common, Design, and Server project files in LightSwitch project.

    You could follow this guide to check it, they are relevant parameters in Visual Studio 2012 LightSwitch project.

    Regards,

    Angie


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, June 30, 2016 6:42 AM
  • Nope I checked and I do not have the VS Studio 2012 SDK installed.

    I looked at the guide but this is the first thing it says.
    "If you create a project by using the LightSwitch Extensibility Toolkit for Visual Studio 2012, you can upgrade that project for further development in Visual Studio Professional 2012. To perform this upgrade, you modify the Lspkg, Client, Client.Design, Common, Design, and Server project files but not the Vsix project file."

    I did not create these projects with the Extensibility Toolkit. Some but not all had been previously upgraded but all have been working fine in 2012 until recently.

    Thursday, June 30, 2016 9:17 PM
  • I would create a Virtual, Install only VS2012 and see if that works. If it does, I would upgrade it to VS2013 (at this time upgrading to VS2015 does not work, hopefully that will be fixed eventually).

    http://AIHelpWebsite.com

    http://HoloLensHelpWebsite.com

    http://LightSwitchHelpWebsite.com

    Unleash the Power - Get the LightSwitch HTML Client / SharePoint book

    Friday, July 1, 2016 3:32 PM
  • That is a very good suggestion do you know of any free or cheap software I can create a virtual install with. I am running on windows 10. I also may be able to use my fiancés laptop to try a fresh install of VS 2012. I could at leat then test if it happens of her machine too.
    Saturday, July 2, 2016 3:33 AM
  • Alright I've been looking for a good excuse to play with Azure for the first time. Does anyone know if they still have free trial accounts and any setup instructions would be appreciated.
    Saturday, July 2, 2016 7:39 PM
  • Thanks I will report back soon.
    Saturday, July 2, 2016 8:28 PM
  • Thanks for the link when I searched for a virtual computer I found all of these videos on channel 9 but it looks from the description to be all done using PowerShell Cmdlets.

    When I went to MS convention at my college "The cloud and me" I had picked up that there were two environments for setting up virtuals on Azure an older and newer one. I believe what you linked me to is more the current portal then the old one which might be a little easier to try. Although glancing through the article you sent me it shows that a basic virtual machine could cost 100+ a month.

    I'm going to setup my account now but if I have to back up that account with a credit card and can't guarantee it won't be charged if I go over the free account limits I'm going to have to back down.

    I don't want this this to be a complaint to MS but when I think of them I think Office, Windows, and Visual Studio all of which have serious issues now listed below. About the only product they make that's not an issue right now is SQL server.

    I'm a huge user of Microsoft products but it seems that all of the latest is while going in a good direction a failure on some of the basics. Just for example windows 10 PC has been unstable for many people I know and the windows store in Seattle is bogged down repair installs and corruption to basic functionality like the task bar, Visual Studio 2015 seems to have dropped support of tools and assemblies that were altogether already developed in past editions but had no issues with other outdated tools like Windows Forms and Console Applications, The latest versions of Office 365 as well lost whole programs like SharePoint Designer and InfoPath not even allowing parallel separate installations of older versions and Many of the Higher end suite stuff like Visio and Project have been losing functionality they had over internet capabilities and direct control over database function, Windows 10 phone was pushed to devices where it’s not stabile either and has corruption of the tiles and start screens as well as apps that are installable the used to also run fine on windows 8.1 that now won't even get past the splash screen or crash and hang the devices altogether


    • Edited by reigh7 Tuesday, July 5, 2016 9:07 PM added hyperlink
    Tuesday, July 5, 2016 8:59 PM
  • I got my virtual machine and running and I have the Visual Studio 2012 Express demo running on it for the next 30 days. I had a heck of a time with the built in security Internet Explorer but my issue now is getting a project onto it. See the picture below the express version does nto support eh light switch tempates. I also don't know how to save from my machine or portable drive a copy of my pre-existing Projects I need to test.
    Tuesday, July 5, 2016 11:04 PM
  • You can download a full version of Visual Studio 2012 from here:

    https://www.microsoft.com/en-us/download/details.aspx?id=30682

    When you create a RDP connection to your virtual, you click on Resources, then More, and specify your local drive to make it available in the remote session. See: https://technet.microsoft.com/en-us/library/cc781321(v=ws.10).aspx


    http://AIHelpWebsite.com

    http://HoloLensHelpWebsite.com

    http://LightSwitchHelpWebsite.com

    Unleash the Power - Get the LightSwitch HTML Client / SharePoint book

    Tuesday, July 5, 2016 11:22 PM
  • Ok I'm having some issues with the remote desktop connection. I connect to the virtual machine and I have enabled remote desktop on both my machine and the virtual but I get this dialog box.


    • Edited by reigh7 Wednesday, July 6, 2016 5:10 AM
    Wednesday, July 6, 2016 5:04 AM
  • I think it might be best for you to just find a machine you can try to install Visual Studio on. Trying to use a virtual on Azure does not seem to be working out for you.

    I really wanted to help but I think I have led you down a path that is not getting you anywhere.

    Sorry :(


    http://AIHelpWebsite.com

    http://HoloLensHelpWebsite.com

    http://LightSwitchHelpWebsite.com

    Unleash the Power - Get the LightSwitch HTML Client / SharePoint book

    Wednesday, July 6, 2016 12:36 PM
  • Its ok I figured it out. I was having connection issues. After Installing lots of Windows Server Updates I got Light switch projects to run. Also I was confused about how to remote in and change the setting in advance. It was mostly an issue of this being a new technology for me to figure out.

    So I uploaded one of the projects that will not run on my machine and here is what I've got. It almost runs but there are two errors when its building. It seems to be search for recourses from the old Visual Studio 11 that was a Beta between VS 10 and VS 12. I can't find them because there is no such program or remnant of it on the virtual machine I've set up. See the Errors below.

    Error 11 Could not copy "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\LightSwitch\Client\Microsoft.LightSwitch.dll" to "Bin\Debug\bin\Microsoft.LightSwitch.dll". Exceeded retry count of 10. Failed. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets 114 10 Campaign Press

    Error 12 Unable to copy file "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\LightSwitch\Client\Microsoft.LightSwitch.dll" to "Bin\Debug\bin\Microsoft.LightSwitch.dll". The process cannot access the file 'Bin\Debug\bin\Microsoft.LightSwitch.dll' because it is being used by another process. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets 114 10 Campaign Press
    Thursday, July 7, 2016 12:10 AM
  • I went back and tried installing the 2011 beta and then the 2010 Ultimate edition of VS trying to find those shared IDE resources. I did not find that helpful but I did try the following and momentarily got the LightSwitch screens to run after a build. Then I get an immediate runtime error.

    I get the following runtime error if I ignore the build errors listed above and click yes to the question "There were build errors. Would you like to continue and run the last successful build?"

    Weird be cause there have been no succesful builds yet on this machine???

    Here is the run time error.
    System.Data.EntityException was unhandled by user code
      HResult=-2146233087
      Message=The underlying provider failed on ConnectionString.
      Source=System.Data.Entity
      StackTrace:
           at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
           at System.Data.EntityClient.EntityConnection..ctor(String connectionString)
           at System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString)
           at System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)
           at ApplicationData.Implementation.ApplicationDataObjectContext..ctor(String connectionString)
           at LightSwitchApplication.Implementation.ApplicationDataServiceImplementation.CreateObjectContext()
           at Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceImplementation`1.get_ObjectContext()
           at Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceImplementation`1.Microsoft.LightSwitch.ServerGenerated.Implementation.IServerDataServiceImplementationCore.get_ObjectContext()
           at Microsoft.LightSwitch.ServerGenerated.Implementation.DataService`1.<get_MetadataProvider>b__4()
           at Microsoft.LightSwitch.ServerGenerated.Implementation.DataService`1.<>c__DisplayClass1b`1.<LogicInvoke>b__1a()
           at Microsoft.LightSwitch.Threading.DispatcherExtensions.<>c__DisplayClass5.<Invoke>b__0()
      InnerException: System.ArgumentException
           HResult=-2147024809
           Message=Invalid value for key 'attachdbfilename'.
           Source=System.Data
           StackTrace:
                at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
                at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
                at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
                at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)
                at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
                at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
           InnerException:
    Thursday, July 7, 2016 9:16 AM
  • Ok wait I fixed that last thing I posted. I selected the properties of the project in the solution explorer and ran a clean, then rebuild, then build and ran it. It now runs smoothly no runtime issues.

    That said this project essentially ran on the virtual machine without ever having the original issue in the original post. that was an error with conflicting assemblies.

    The main difference in this environment Verse the one on my machine is the OS is some Windows 8 derivative called Windows Server. My own machine also has a copy of Visual Studio 2015 on it but of course the project does not run on this platform. I need Visual Studio 2015 for school primarily for console applications only.

    Could either the Upgrade to Windows 10 Education or in other words free Enterprise Windows 10 for students or Visual Studio 2015 be causing the conflict in Assemblies some how indirectly because that is what changed on my development machine?
    • Edited by reigh7 Thursday, July 7, 2016 9:37 AM
    Thursday, July 7, 2016 9:35 AM
  • I wasn't because there were a number of extensions that were unsupported even after trying to edit the VISX manifest files.

    My main idea at the moment was to continue to use 2012 to do a little better 3rd normal form normalization of my old system. Then spend the rest of the summer copying/documenting the information I needed using AIDE Studio for LightSwitch. Also note anywhere where I wrote my own C#. kind of like a Redline of the design. That way I can try to reproduce what I have on the screen in LightSwitch now attached to database with the same design using WPF.

    I just need access to VS LS 2012 on my local machine and I need it stabile.
    Sunday, July 10, 2016 10:58 PM
  • https://msdn.microsoft.com/en-us/library/bb383993.aspx

    The issue is that VS 2012 and visual studio 2015 have conflicting assemblies
    I removed VS 2015 and the add on office tools that run LightSwitch for 2015 and the problem is fixed.
    That said I can't rn 2015 which is prefferd for school on my dev machine.
    I need to look at my project's current state in 2012 to write my website in 2015.
    • Marked as answer by reigh7 Wednesday, October 5, 2016 7:44 PM
    Wednesday, October 5, 2016 7:44 PM