Accommodate 2 Diff Assembly Versions Of A Reference DLL?

Aug 13, 2009

I have a pretty complicated project with lots of class files, code modules, etc. There was a changed to one of my referenced DLLs that requires an isolated change in a single Sub within my solution. Unfortunately, this new Sub is not compatible with most of my clients' configuration but is required by some of my other clients. So now I must keep two versions in Source Safe of my solution - which I do not want to do. What I would like to do is to be able to determine which DLL is running and flip a switch to use the either the old Sub or the new Sub. Currently the sub is in a class, but I could break it out. Is it possible to determine which assembly version DLL is running? Also, if I reference the new DLL, the old Sub will not build. If I reference the old DLL, the new Sub will not build. So is there a way to keep both Subs in the same project?

View 1 Replies


ADVERTISEMENT

Accommodate 2 Different Assembly Versions Of A Reference DLL?

Aug 13, 2009

I have a pretty complicated project with lots of class files, code modules, etc. There was a changed to one of my referenced DLLs that requires an isolated change in a single Sub within my solution. Unfortunately, this new Sub is not compatible with most of my clients' configuration but is required by some of my other clients. So now I must keep two versions in Source Safe of my solution - which I do not want to do. What I would like to do is to be able to determine which DLL is running and flip a switch to use the either the old Sub or the new Sub. Currently the sub is in a class, but I could break it out. Is it possible to determine which assembly version DLL is running? Also, if I reference the new DLL, the old Sub will not build. If I reference the old DLL, the new Sub will not build. So is there a way to keep both Subs in the same project?

Can I use reflection to know what is the assembly version of a loaded DLL?

View 3 Replies

C# - ASP.NET: Multiple Assembly Versions, Same Web Application?

May 28, 2009

ASP.NET pros out there can answer this question. I have a single web application that contains a website and a web service - both have several assembly references in common (data access layer, utilities, etc) - however, recent changes made to the web service will require different versions of the common assemblies, versions that the website won't work with (in case you're wondering, the website is some legacy 1.x .NET code that explodes when using the newer version assemblies.)

allow my web service to reference one version and have my website reference another? I can obviously have only one version with the same name within the bin folder.(P.S. - It just dawned on me that I could probably compile and reference the common assemblies with a different name, and place those in the web app's bin folder - but that sounds really fugly...)

View 4 Replies

VS 2008 Conflicting Assembly Versions?

Apr 20, 2010

I have a COM application (X) that references various .NET assemblies. All the .NET assemblies, with the exception of one (Y), were created a while ago and reference an earlier version of a 3rd party component, say version 1. The other .NET assembly (Y) uses a later version of the 3rd party component, say version 2.When I install the COM application (X) on the target pc, version 1 of the 3rd party component is installed in the installation directory of the COM application. The .NET assembly (Y) is installed into its own directory on the target pc and has version 2 of the 3rd party component installed in its installation directory.

When I run the COM application (X) and try to launch (Y), I get an error because I guess the COM application is forcing (Y) to use the version installed in its app.dir, in this case version 1 as opposed to version 2. Is there any way around this? It seems a bit much to have to rebuild all the projects that reference this assembly just to sync versions.

View 6 Replies

Found Conflicts Between Different Versions Of Same Dependent Assembly

Jun 9, 2011

What's the meaning of this error? The first version the I had installed is the vb. 2008 express edition. Now I try to used the vb.net2008 team system. Is there any conflict with those versions that I had installed to my pc?

View 3 Replies

Error : Found Conflicts Between Different Versions Of The Same Dependent Assembly

Jan 23, 2012

VS2008 / XP Pro sp3 / .NET 3.5 I develop during the day on my office computer and bring home projects on a laptop to work on over the weekend. After working at home then at work, I have a conflict that I don't understand. When I build, all is normal but when I debug, I get "Found conflicts between different versions of the same dependent assembly." If I click on the warning message I also get "Do you want to fix these conflicts by adding binding redirect records in the app.config file"?Both computers have same O/S, same SP, same .NET, same VS. Only thing that could be different is particular O/S updates that have been installed on each machine. What causes this warning and where do I look for differences? I really hate to let mSoft keep changing my code every Saturday and Monday. I just don't trust it on Mondays.

View 7 Replies

The Located Assembly's Manifest Does Not Match The Assembly Reference

Oct 9, 2008

I've got an exception when I deployed my application: "the located assembly's manifest does not match the assembly reference" What I remember is changing the project name from the previous source code, does it affect that much?

View 1 Replies

Getting Runtime Error 3447 - Jet VBA File (VBAJET.dll For 16-bit Versions Or VBAJET32 For 32-bit Versions) Failed To Initialize When Called

Aug 19, 2010

To the board: Lately I've been getting Runtime error 3447 ("The Jet VBA file (VBAJET.dll for 16-bit versions, or VBAJET32 for 32-bit versions) failed to initialize when called. Try reinstalling the application that returned the error") when attempting to open a certain program (not one that I designed, just downloaded and installed). I installed this program in January 2009, but this error began happening only this past July. someone else to information about the files vbajet32.dll and expsrv.dll. One site said that the problem was probably caused by the file expsrv.dll being absent, but I checked my System32 folder, and it's there. As far as I can tell, it has always been there (the computer was made in 2008, and as I said the program had always worked before). Vbajet32.dll is also there. I tried uninstalling and reinstalling the program, but error 3447 still occurs. I also tried uninstalling the program and installing an older version, but 3447 is still there.

I tried replacing expsrv.dll, thinking it might have been corrupt, but that didn't help, and I cannot register that dll anyway. I can't figure this thing out. Both of the files are there, and I didn't change any settings or anything anywhere between last January and this July. By the way, I am on Vista.

View 1 Replies

C# - Assembly To Reference For DataGrid?

Nov 18, 2010

I made my first WPF control:

[code]...

On the DataGrid control it says: "the type datagrid was not found, Verify that you are not missing an assembly refernece" I'm creating the control within a Win Forms app. What assembly to I need to include and how do I do that in XAML?

View 3 Replies

IDE :: Add A Reference To A Typelib And NOT THE GAC ASSEMBLY

Sep 28, 2009

I have VS 2005. I am creating a VB .NET class that will interop with a COM app. I want to add a reference to a type lib file (.tlb). So I run the add reference command and use the browse button. I browse to the .tlb file I want and ok out. When I am done, the reference I have is to an assembly in the GAC. But I don't want that assembly as a reference. I want to have the IDE create a private interop assembly that I will deliver with my .NET object.

So how do I avoid hvaing VB .NET pull in an assembly from the GAC instead of creating an interop asm from the typelib I have browsed to?

View 1 Replies

C# - Can't See An Assembly In Add Reference Dialog Box After Installing It In Gac

Sep 30, 2010

I have created a shared assemby MyLibray version 1.0.0.1 and installed it in gac. Again I created MyLibrary version 1.0.0.2 and installed it in gac.

See the gac screen shot.

But in Add Reference dialog box only older version 1.0.0.1 is available.
See the screenshot.

View 2 Replies

Reference Assembly Outside The AppBase-Directory

Nov 16, 2009

Reference Assembly outside the AppBase-Directory

View 1 Replies

VS 2008 Selectively Reference An Assembly?

Feb 10, 2012

I have an industrial control program that we install on OEM equipment. This equipment falls into one of two categories; those WITH a special piece of IO hardware installed on the computer and those without.

This IO hardware has .NET 3.5 support assemblies, and is easy to program for. In my program, I reference the assemblies under the Project Properties and I'm good to go. Here's my problem... my program now seems to NEED this assembly to even start up, even if I'm not directly accessing anything in it until much later in the programming. When we ship any version of this equipment; I need to install the IO hardware assemblies whether the equipment needs it or not just for my program to run. The assemblies are bundled onto a hardware driver disk, and this sucker is 3gig.

What I would like to do is alter my program so that it runs no matter if it finds those assemblies or not. If not, then it will automatically close off certain functionallities (you can't use that because your computer don't have the hardware installed); and ideally, Visual Studio won't have 100 errors about a "missing reference". If found, then it will call them and use them normally as the program currently does.

View 6 Replies

Asp.net 4 Membership.CreateUser Reference Required To Assembly Error?

Jan 25, 2011

I have managed to get ASP.NET Membership mainly working with my SQL server.The problem i'm having is I get an error in VS2010 in my code behind file when attempting to create a user. I get a Red Exclamation mark appear on .CreateUser on the code below.

Error Message:Reference required to assembly 'System.Web.Security.ApplicationServices, Version=4.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e65' containing the type 'System.Web.Security.MembershipUser'. Add one to your project.

Code:

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Membership.CreateUser(r_user_name.Text, r_password.Text)
Label1.Text = "User created"

[code]....

I've tried adding the following to the web.config:Not sure if thats correct!! but i get an error message when I open the page:Parser Error Message: Could not load file or assembly 'System.Web.Security.MembershipUser, System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e65' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

View 1 Replies

Gac - Installed To With Gacutil Mytext.dll Assembly - But Can't Access It Or Reference It

Mar 3, 2009

How to I reference my own .dll after i add it to the GAC? I successfully added my .dll to the GAC, have seen it in the list. However, when i try to reference in Visual Studios..... i am lost.

View 2 Replies

VS 2010 Error With Applications Reference Required To Assembly

Oct 27, 2009

im building an application i started it in VB 2008 and i upgraded to VB 2010

then i made some mods and tryed to run the application and then

i get this error

Error2Reference required to assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' containing the type 'System.Windows.Forms.Form'. Add one to your project.C:UsersAdminDesktop

[Code].....

View 1 Replies

C# - Microsoft Chart Controls Assembly Reference: Move It To Web.config?

Aug 31, 2010

Currently, when I want to use Microsoft Chart Controls on a website, I need to add the following onto every aspx page where I want to use it:

[Code]...

Is there any way to move this to the web.config file, so that I don't have to put it on every page ?

View 2 Replies

IDE :: Inconsistent Error "Reference Required To Assembly Containing The Base Class?

Mar 3, 2009

I have a Visual Studio 2008 solution with project A referencing project B as a project reference. Project B references System.Data.Linq, but project A does not. Everything compiles and runs fine. I like this arrangement because avoiding a reference to System.Data.Linq in project A ensures that it uses project B methods instead of directly accessign System.Data.Linq methods, which I want to avoid.

View 3 Replies

IDE :: Visual Studio 2010 Reference Path To Local Assembly Won't Change?

Jul 20, 2010

We have upgraded our project from Visual Studio 2008 to Visual Studio 2010 without any issues until now. Our project contains a folder call Libraries which contains different versions of Oracle ODP.NET DLL's as well as different versions of Telerik DLL's. Our project contains references to one of the versions of each. The problem is once we remove the reference and re-add it by browsing to the new version, again inside the Libraries folder inside the project, it adds the reference, but to the same version we just removed. We can even copy the DLL to our desktop, remove the reference and add to the new one on our desktop and it still will point to the Libraries folder version???. The only we we can actual change the reference to the new DLL is by manually changing the path in the .vbproj file, which is obviously not going to work for us. The same behaviour worked perfectly in VS 2008. We switch our references quite often, when new versions come out, but also far more often to QA different versions of ODP.NET and Telerik Control DLL's, so manually editing the .vbproj file is becoming quickly cumbersome. If I browse to a specific version at a specific path, Visual Studio should ALWAYS do what I'm telling it to do..

I did some seaching and came across a few other people with the same issue. This better not be as designed and if it's a bug, which I believe it to be, when will it be fixed?[URL]..

View 14 Replies

VSTO2010: Reference To Class 'RibbonBase' Is Not Allowed When Its Assembly Is Linked Using No-PIA Mode

Oct 20, 2010

When I try to compile my VSTO Outlook addin, I get this error:

Reference to class 'RibbonBase' is not allowed when its assembly is linked using No-PIA mode

View 2 Replies

Project 'MyProject' Requires A Reference To Version '14.0.0.0' Of Assembly 'Microsoft.Office.Interop.Excel'

Apr 14, 2011

I have Visual Studio 2010 and a VB Project that had a reference to Microsoft.Interop.Excel 12.0. Well recently I changed the reference version to 14.0. That was actually a mistake and now I need to bump it back down to version 12.0. However I get this error in my project now...

Project 'MyProject' requires a reference to version '14.0.0.0' of assembly 'Microsoft.Office.Interop.Excel', but references version '12.0.0.0'
of assembly 'Microsoft.Office.Interop.Excel'.

I tried removing references and adding the com object to, but no avail.

View 1 Replies

Accommodate Two Datagrids From Two Different Tables On Same Form?

Aug 25, 2009

how to accommodate two datagrids from two different tables on same form as only one binding navigator bar is shown on the top of the form.

View 4 Replies

C# - Changing Program Logic To Accommodate New Retail Tax Law?

Jul 23, 2010

Background: I have a program that has implemented the two "classic" taxes for Ontario Canada: 5% GST and 8% PST. At the beginning of July (2010) the province switched to one combined HST tax of 13% for the most part. Effects and changes here but those aren't the main point of this question...

Question: What are best practices and good solutions to accommodate for future changes easily in retail taxes? Tax changes occur often enough. I'm sure there are a many SO users with good experience.

View 2 Replies

"Reference Required" Error When Referencing NServiceBus Assembly From Another Project

Feb 3, 2010

We are trying to write an application that uses the NServiceBus library in a VB.NET environment. We've been stymied by errors similar to the following: Reference required to assembly 'NServiceBus,Version=2.0.0.1071, Culture=neutral, PublicKeyToken=9fc386479f8a226c' containing the implemented interface 'NServiceBus.IMessageHandler`1'. Add one to your project.Our project already includes references to NServiceBus.dll and NServiceBus.Core.dll from the same NServiceBus 2.0 RC2 distribution.

[Code]...

Any ideas about how to solve this problem? (And, yes, my preferred solution is switching to C#, but no, that's not an acceptable one at the moment.)

View 2 Replies

Where Do ASP.NET "website Prejects" Store Default Reference/assembly Settings For VB/C#

Jul 22, 2010

MY understanding is like this, for the "website type" of projects:for VB, the default setting for the namespaces and the default setting for references are both stored in C:WindowsMicrosoft.NetFrameworkV4.0.30319ConfigWeb.config.

but C# does not seem to use this global web.config file to store its default namespaces and references settings. One evidence is that you see a lot of "using ..." statements at the top of all C# files whereas you don't see many "imports ..." statements at the top of all VB files. So C# stores the namespace settings in individual .cs files, but where does C# store the reference settings then? Or the C# compiler knows all the reference without having to store it somewhere?

View 1 Replies

VS 2005 Custom Messagebox: Auto-resize Form To Accommodate Text?

Aug 20, 2009

After using a form as a replacement for MessageBox I do have a need to make it automatically adjust its size to fit its contents, is there any rule out there that we need to abide to when it comes to sizing the form acting as MessageBox?

I am thinking I could use a panel that will auto-resize and just resize the form according to the size of the panel but I am not sure that will work as I haven't tried it yet.

View 4 Replies

[VB2010] - Activex Control Warnings "reference Was Created To Embedded Interop Assembly 'stdole'"

Nov 27, 2011

i compiled 1 control in vb6. now i'm trying use it in vb2010, but i recive 2 warnings:
"Warning1A reference was created to embedded interop assembly 'stdole' because of an indirect reference to that assembly from assembly 'AxInterop.Sprite'. Consider changing the 'Embed Interop Types' property on either assembly.WindowsApplication1" and "Warning2 reference was created to embedded interop assembly 'stdole' because of an indirect reference to that assembly from assembly 'Interop.Sprite'. Consider changing the 'Embed Interop Types' property on either assembly.WindowsApplication1 "why these warnings? (i have sure that in vb6 don't give me any errors)

View 2 Replies

Same Code Diff Error

May 22, 2012

My goal was to make something that would constantly update the amount of gold that someone had. If they had X number of gold, it would display a certain image for a picturebox. You get the deal.I get "Error1'Money_Checker_Loop.My.Resources' is a namespace and cannot be used as an expression. C:**AppDataLocalTemporary ProjectsMoney Checker LoopForm1.vb3347Money Checker Loop.[code]

View 1 Replies

Compare Two Tables And Note Diff?

Jan 19, 2009

I have three Tables in the MS Access database as below:

Company_Data
Name|Age|Department|Salary
User_Data

[Code].....

and i have a compare button on the VB form. Is there any code that can compare the Company_Data with User_Data and copy all the records not found in User_Data to Changes_Data table. When updating it should update the "updated on" Column to the current Date.

Same needs to be done in the opposite way. Compare User_Data with Company_Data and note the diff. No Need to update Salary in this case.

View 1 Replies

Create Two Diff App In Single Project?

Feb 23, 2010

I need to create two diff app

1.Windows application

2.WPFapplication

in a same project.I need to call forms and pages of both app and integrate them ex How to call WPF page from a win application)

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved