diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2010-01-07 12:41:51 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2010-01-07 12:41:51 -0330 |
commit | 7ac7a334b6690fdcb810fa281e416ac437f7fe6e (patch) | |
tree | b19dc52853022a4fe3380cf33c0acb54f9595c28 | |
parent | - Fixed assembly version in C# and VB projects (diff) | |
download | ice-7ac7a334b6690fdcb810fa281e416ac437f7fe6e.tar.bz2 ice-7ac7a334b6690fdcb810fa281e416ac437f7fe6e.tar.xz ice-7ac7a334b6690fdcb810fa281e416ac437f7fe6e.zip |
Bug 4583 - do not lose CopyLocal setting
-rw-r--r-- | vsplugin/src/Util.cs | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/vsplugin/src/Util.cs b/vsplugin/src/Util.cs index bea6a9397bd..d69213b46b8 100644 --- a/vsplugin/src/Util.cs +++ b/vsplugin/src/Util.cs @@ -447,7 +447,7 @@ namespace Ice.VisualStudio foreach(Reference r in ((VSProject)project.Object).References)
{
- if(Path.GetFileName(r.Path).Equals(component + ".dll", StringComparison.OrdinalIgnoreCase))
+ if(r.Identity.Equals(component, StringComparison.OrdinalIgnoreCase))
{
r.Remove();
return true;
@@ -962,6 +962,10 @@ namespace Ice.VisualStudio private static void updateIceHomeCSharpProject(Project project, string iceHome)
{
+ Util.setIceHome(project, iceHome);
+
+ VSLangProj.VSProject vsProject = (VSLangProj.VSProject)project.Object;
+
ComponentList components = Util.getIceCSharpComponents(project);
foreach(string s in components)
{
@@ -969,18 +973,21 @@ namespace Ice.VisualStudio {
continue;
}
- Util.removeCSharpReference(project, s);
- }
-
- Util.setIceHome(project, iceHome);
- foreach(string s in components)
- {
- if(String.IsNullOrEmpty(s))
+ bool copyLocal = true;
+ Reference r = vsProject.References.Find(s);
+ if(r != null)
{
- continue;
+ copyLocal = r.CopyLocal;
}
+ Util.removeCSharpReference(project, s);
+
Util.addCSharpReference(project, s);
+ r = vsProject.References.Find(s);
+ if(r != null)
+ {
+ r.CopyLocal = copyLocal;
+ }
}
}
|