1

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.

Bob Bowles
  • 113
  • 1
  • 11

1 Answers1

4

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>
Community
  • 1
  • 1
Bob Bowles
  • 113
  • 1
  • 11
  • Thank you thank you thank you! This has been bugging me for over a year. My site compiled just fine, but the error/warning always bugged me. Now, I just wonder why this was necessary!? More reading... – PTansey Jun 15 '17 at 21:04