简体   繁体   中英

Visual Studio reference paths, can't find reference?

HI,I have a VS project which I have copied to my new machine from an old machine. Everything is OK apart from getting a warning when I build for the missing DLL:

Warning 1 Could not resolve this reference. Could not locate the assembly "System.Windows.Controls.Toolkit, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. Mizuho.MIReporting.Finance.Presentation.Modules.Common

However, I can see this dll doesn't exist on my new machine (in the old machine it exists in c:\\Program Files\\Microsoft SDKS\\Silverlight\\V3.0\\ToolKit) which is another issue but what I'm trying to understand is since the project file has no absolute references to the DLL and the DLL is not in GAC, how was it able to resolve the reference anyway?

Visual Studio reads a list of folders to look for referenced assemblies from the registry, installers for 3rd party assemblies often update these keys.

Your project.user file can also contain details of when a referenced assemblies was last found.

I think the writers of Visual Studio have also come up with other ways to make builds none-repeatable across machines….

(I wish VS was not as “helpful” and would just to find an assembly if it is outside of the “build tree” and that it would give an error on any assembly reference that was not relative.)

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