简体   繁体   中英

Set specific reference version for project when deployed in .NET project

TL;DR: How do I set a reference for an assembly to a specific version (earlier than current)

I have a project in which we are deploying to an SSIS server which has the assemblies current up to version 11.XXX, or Visual Studio 2012. On my local machine, I have Visual Studio 2014 installed on my local machine, which gives me version 12.XXX.

With this project, once it has been compiled against VS 2014, it updates the version to 12.XXX. This update causes the SSIS server to fail with an error about an incorrect/missing version.

How do I get the deployed project to reference the 2012 assemblies during runtime?

I have looked into the Specific Version flag, but it appears to only determine the build time reference used. Is there another way to tell the project to use the 11.XXX version of the assembly?

Here is a screenshot of the properties of the Analysis Services assembly, which is the one throwing the error. As you can see, it is referencing version 12.0.0.0 when I need it to reference 11.XXX.

捕获Microsoft.AnalysisServices的属性

You can Redirect assembly bindings with App.config. Note that despite being named newVersion , this attrbiute can specify an earlier version than oldVersion .

EDIT: Since your project is not standalone things get a bit more complicated. See this post for where to locate SSIS app.config files. Also you can specify redirects system-wide in machine.config file as stated in the first link.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM