.NET Framework Bookmark and Share   
 index > MSBuild > Binding redirect (2.0/3.5)
 

Binding redirect (2.0/3.5)

Hi, I currently have this code in my app.config

<? xml version = "1.0 "?>

< configuration >

< runtime >

< assemblyBinding xmlns = "urn:schemas-microsoft-com:asm.v1 ">

< dependentAssembly >

< assemblyIdentity name = "Microsoft.Build.Framework " publicKeyToken = "b03f5f7f11d50a3a " culture = "neutral "/>

< bindingRedirect oldVersion = "0.0.0.0-99.9.9.9 " newVersion = "3.5.0.0 "/>

</ dependentAssembly >

...

however, I don't want this to be located in my app.config as the code is in a library used by several other applications, and I don't want to add this to the app.config for each and every exe project.

I am most confident that this should be possible to do in code using the MSBuild API.

Can someone please tell me how?

Thanks!

/JO




jolofsson
Hi JO,

As far as I know MSBuild is just build time not run time, I don't know why you want to do it in build time. Based on my understanding, if you don't want to add this to the app.config for every exe project, you can modify your library if it is written by yourself.

If I misunderstood you, or you have any questions, please let me know.

Best Regards,
Nancy
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Nancy Shao
Hi JO,

As far as I know MSBuild is just build time not run time, I don't know why you want to do it in build time. Based on my understanding, if you don't want to add this to the app.config for every exe project, you can modify your library if it is written by yourself.

If I misunderstood you, or you have any questions, please let me know.

Best Regards,
Nancy
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Nancy Shao

You can use google to search for other answers

Custom Search

More Threads

• What to do when the implementation of a class is dependent on the project configuration?
• MSBuild fails to rebuild a resource-only project with no culture-neutral resources
• Generate Resource error
• MSB4018
• MSBuild to build migrated C++ projects
• Need help with building multiple configurations with devenv...
• Build C# Multi-file assembly in VS2005?
• Website project references not copied to bin directory
• MSBuild reporting an failure when vcbuild.exe says success
• Want to call MSBuild from program and use custom logger within that program