I am in the process of moving my development environment to a new machine. I decided to install VS2013 Pro on my new machine (VS2010 Pro on the old machine). I copied the entire Visual Studio 2010 folder over to the Projects folder on the new machine. I opened my solution in VS2013 and everything migrated without error. I rebuilt the solution and got the following warnings. I have compared my projects side by side on old and new machine and can't find any differences. The only difference I have been able to find is that the old machine has folders for only .NET 4.0 and the new machine has .NET 4.0, 4.5 and 4.5.1.
Warnings:
(0,0): warning : The following assembly has dependencies on a version of the .NET Framework that is higher than the target and might not load correctly during runtime causing a failure: Email, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. The dependencies are: Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. You should either ensure that the dependent assembly is correct for the target framework, or ensure that the target framework you are addressing is that of the dependent assembly.
(0,0): warning : The following assembly has dependencies on a version of the .NET Framework that is higher than the target and might not load correctly during runtime causing a failure: SharedLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. The dependencies are: Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. You should either ensure that the dependent assembly is correct for the target framework, or ensure that the target framework you are addressing is that of the dependent assembly.
(0,0): warning : The following assembly has dependencies on a version of the .NET Framework that is higher than the target and might not load correctly during runtime causing a failure: VendorsLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. The dependencies are: Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. You should either ensure that the dependent assembly is correct for the target framework, or ensure that the target framework you are addressing is that of the dependent assembly.
I think I figured it out based on this post. Adding a line in the compilation section of web.config for Microsoft.VisualBasic prevents the build warnings.
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0" batch="false">
<assemblies>
.
.
.
<add assembly="Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</assemblies>
</compilation>
Related
I am setting up my first Windows IoT Core background application that is running on a Raspberry Pi, but I am running into a problem with conflicting assembly versions and I have been unable to resolve them.
Specifically, I am getting an error message that states:
No way to resolve conflict between "System.Data.Common, Version=4.2.1.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Data.Common,
Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing
"System.Data.Common, Version=4.2.1.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" arbitrarily.
Upon closer inspection, there are two versions of the System.Data.Common.dll that my application is referencing.
The first is coming from the installed package Microsoft.NETCore.UniversalWindowsPlatform (v 6.2.8). The assembly version of System.Data.Common here is 4.2.1.0 (which is the version I want to use):
Assembly System.Data.Common version 4.2.1.0
C:\Users\mikel\.nuget\packages\Microsoft.NETCore.UniversalWindowsPlatform\6.2.8\ref\uap10.0.15138\System.Data.Common.dll
The second is apparently being included as a dependency with the .netstandard:
Assembly System.Data.Common version 4.1.0.0
C:\Users\mikel\.nuget\packages\System.Data.Common\4.3.0\ref\netstandard1.2\System.Data.Common.dll
I am having a little harder time pinpointing exactly what is forcing NuGet to download and install the second package. Perhaps one of my other packages that I need is referencing it as a dependency (not sure).
Either way, I would like to setup assembly binding remapping so that any attempt to reference 4.1.0.0 will redirect and use 4.2.1.0.
When I do a build of my project, I get this warning:
1> Consider app.config remapping of assembly "System.Data.Common, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.0.0"
[C:\Users\mikel\.nuget\packages\System.Data.Common\4.3.0\ref\netstandard1.2\System.Data.Common.dll]
to Version "4.2.1.0"
[C:\Users\mikel\.nuget\packages\Microsoft.NETCore.UniversalWindowsPlatform\6.2.8\ref\uap10.0.15138\System.Data.Common.dll]
to solve conflict and get rid of warning.
However from what I have read, Universal Windows Projects do not support the use of app.config files. At any rate though, I added an app.config file to the root of my project, set the build action to Embedded Resource, selected Copy Always and put this in the file (to no affect):
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Data.Common" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="4.1.0.0" newVersion="4.2.1.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
I have also tried setting the NuGet project management format to PackageReference and added <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> to each PropertyGroup in my .csproj file. This did not have any impact.
My Universal Windows project targets are as follows:
Target version: Windows 10 Fall Creators Update (10.0; Build 16299)
Minimum Version: Windows 10 Fall Creators Update (10.0; Build 16299)
I should also state that I want to use the 4.2.1.0 version of the assembly, as 4.1.0.0 is missing a few things I need to implement the wrapper I am using around SQLite. My preference is to not have to re-write those wrappers.
At this point I am very confused as to how to resolve this conflict. How do I enable binding redirects to resolve this error?
Any help would be greatly appreciated.
Hi I have developed an ASP.Net MVC 3.0 application using VS 2010 and hosted the same in a server using IIS. I am getting the following error while running trying to access the application using hosted url.
Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Install MVC on the server or add the MVC DLL's to the bin folder of the app
I have issue when building an Mvvmcross 3.1.1 (nuget) application. I am getting this exception during second phase build (packaging the apk) on my solution
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(970,5): error MSB4018: Xamarin.Android.XamarinAndroidException: error XA2006:
Reference to metadata item 'System.Void Android.Views.View::set_Activated(System.Boolean)' (defined in 'Cirrious.MvvmCross.Binding.Droid, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') from 'Cirrious.MvvmCross.Binding.Droid, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved.\r
This seems similar to this issue #629. While my manifest is ok:
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="15" />
I am using latest nuget Mvvmcross 3.1.1.
Thanks
That's probably due to the Linker on your Android project. Is Linking set on "Sdk and User Assemblies"? If yes: You need to compile with a higher Sdk version due to this bug. I hope the link may help you in case you want to keep the linker like that.
I am Migrating from my project which runs on VS2003 with MSOffice 2003 to VS2010 project.
My project makes use of assembly 'Microsoft.Office.Interop.Excel.dll'
But I get the following Error.
2>ResolveAssemblyReferences:
2> No way to resolve conflict between "Office, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "Office, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null". Choosing "Office, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily.
2>InitializeBuildStatus:
2> Touching "Debug\ACCT.unsuccessfulbuild".
2>CustomBuild:
2> All outputs are up-to-date.
2>cl : Command line warning D9035: option 'clr:oldsyntax' has been deprecated and will be removed in a future release
2> stdafx.cpp
2>stdafx.cpp : fatal error C1107: could not find assembly 'Microsoft.Office.Interop.Excel.dll': please specify the assembly search path using /AI or by setting the LIBPATH environment variable
2>
2>Build FAILED.
I made sure that the assembly 'Microsoft.Office.Interop.Excel.dll' has been referenced.
You have to remove the old reference, and re-add the 2010 one. They are actually different. It's a bit of pain when upgrading office components.
I am trying to connect to an Oracle Database using nHibernate. I can connect using the .Net driver:
<property name="connection.driver_class">NHibernate.Driver.OracleClientDriver</property>
However I would prefer to use the OracleDataClientDriver that ships with Oracle (or nHibernate? I forget). Anyway I was using the instructions of this blog:
http://tiredblogger.wordpress.com/2008/11/07/using-oracle-odp-with-nhibernate-from-a-c-class-library/
All is fine but when I add the app.config with the following setting to my Unit Test class:
<runtime>
<assemblyBinding xmlns=“urn:schemas-microsoft-com:asm.v1“>
<qualifyAssembly partialName=“Oracle.DataAccess“
fullName=“Oracle.DataAccess,
Version=2.111.6.20,
Culture=neutral,
PublicKeyToken=89b483f429c47342“ />
</assemblyBinding>
</runtime>
And attempt to run my test I get the following error:
Test 'M:UTOracleImporter.UT_SchemaDAO.Test_GetCustomer' failed: Could not load type 'TestDriven.Framework.Resident.IResidentTestRunner' from assembly 'TestDriven.Framework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=50ecb853f8c6b8d2'.
System.TypeLoadException: Could not load type 'TestDriven.Framework.Resident.IResidentTestRunner' from assembly 'TestDriven.Framework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=50ecb853f8c6b8d2'.
at TestDriven.TestRunner.AdaptorTestRunner.Run(ITestListener testListener, ITraceListener traceListener, String assemblyPath, String testPath)
at TestDriven.TestRunner.ThreadTestRunner.Runner.Run()
Any advice?
Edit: I have added the Test Driven assemblies to the GAC and now am getting a different error:
NHibernate.HibernateException : The
IDbCommand and IDbConnection
implementation in the assembly
Oracle.DataAccess could not be found.
Ensure that the assembly
Oracle.DataAccess is located in the
application directory or in the Global
Assembly Cache. If the assembly is in
the GAC, use
element in the application
configuration file to specify the full
name of the assembly.
Which is the same error that it meant to be addressed in the App.Config. The Oracle.DataAccess has been added to the GAC and I have also tried it in the application folder. Yet error still appears.
I don't see any references to Oracle (or NHibernate) in that error.
In any case, I recommend you upgrade to NH 3.0 Alpha2. The assemblyBinding stuff isn't needed anymore.