예제 #1
0
        protected internal AssemblyReference AddEntryPointFromItem(ITaskItem item, AssemblyReferenceType referenceType)
        {
            AssemblyReference assembly = _manifest.AssemblyReferences.Add(item.ItemSpec);

            assembly.ReferenceType = referenceType;
            SetItemAttributes(item, assembly);
            return(assembly);
        }
예제 #2
0
        protected internal AssemblyReference AddEntryPointFromItem(ITaskItem item, AssemblyReferenceType referenceType)
        {
            AssemblyReference file = this.manifest.AssemblyReferences.Add(item.ItemSpec);

            file.ReferenceType = referenceType;
            this.SetItemAttributes(item, file);
            return(file);
        }
예제 #3
0
        protected internal AssemblyReference AddAssemblyNameFromItem(ITaskItem item, AssemblyReferenceType referenceType)
        {
            AssemblyReference assembly = new AssemblyReference();

            assembly.AssemblyIdentity = AssemblyIdentity.FromAssemblyName(item.ItemSpec);
            assembly.ReferenceType    = referenceType;
            _manifest.AssemblyReferences.Add(assembly);
            string hintPath = item.GetMetadata("HintPath");

            if (!String.IsNullOrEmpty(hintPath))
            {
                assembly.SourcePath = hintPath;
            }
            SetItemAttributes(item, assembly);
            return(assembly);
        }
예제 #4
0
        protected internal AssemblyReference AddAssemblyNameFromItem(ITaskItem item, AssemblyReferenceType referenceType)
        {
            AssemblyReference assembly = new AssemblyReference {
                AssemblyIdentity = AssemblyIdentity.FromAssemblyName(item.ItemSpec),
                ReferenceType    = referenceType
            };

            this.manifest.AssemblyReferences.Add(assembly);
            string metadata = item.GetMetadata("HintPath");

            if (!string.IsNullOrEmpty(metadata))
            {
                assembly.SourcePath = metadata;
            }
            this.SetItemAttributes(item, assembly);
            return(assembly);
        }
 protected internal AssemblyReference AddEntryPointFromItem(ITaskItem item,
                                                            AssemblyReferenceType referenceType)
 {
     throw new NotImplementedException();
 }
예제 #6
0
 protected internal AssemblyReference AddEntryPointFromItem(ITaskItem item, AssemblyReferenceType referenceType)
 {
     AssemblyReference assembly = _manifest.AssemblyReferences.Add(item.ItemSpec);
     assembly.ReferenceType = referenceType;
     SetItemAttributes(item, assembly);
     return assembly;
 }
예제 #7
0
 protected internal AssemblyReference AddAssemblyNameFromItem(ITaskItem item, AssemblyReferenceType referenceType)
 {
     AssemblyReference assembly = new AssemblyReference();
     assembly.AssemblyIdentity = AssemblyIdentity.FromAssemblyName(item.ItemSpec);
     assembly.ReferenceType = referenceType;
     _manifest.AssemblyReferences.Add(assembly);
     string hintPath = item.GetMetadata("HintPath");
     if (!String.IsNullOrEmpty(hintPath))
         assembly.SourcePath = hintPath;
     SetItemAttributes(item, assembly);
     return assembly;
 }
예제 #8
0
 private bool InitializeManifest(Type manifestType)
 {
     this.startTime = Environment.TickCount;
     if (!this.ValidateInputs())
     {
         return(false);
     }
     if (manifestType == null)
     {
         throw new ArgumentNullException("manifestType");
     }
     if ((this.InputManifest == null) || string.IsNullOrEmpty(this.InputManifest.ItemSpec))
     {
         if (manifestType != typeof(ApplicationManifest))
         {
             if (manifestType != typeof(DeployManifest))
             {
                 throw new ArgumentException(string.Empty, "manifestType");
             }
             this.manifest = new DeployManifest(this.TargetFrameworkMoniker);
         }
         else
         {
             this.manifest = new ApplicationManifest(this.TargetFrameworkVersion);
         }
     }
     else
     {
         try
         {
             this.manifest = ManifestReader.ReadManifest(manifestType.Name, this.InputManifest.ItemSpec, true);
         }
         catch (Exception exception)
         {
             base.Log.LogErrorWithCodeFromResources("GenerateManifest.ReadInputManifestFailed", new object[] { this.InputManifest.ItemSpec, exception.Message });
             return(false);
         }
     }
     if (manifestType != this.manifest.GetType())
     {
         base.Log.LogErrorWithCodeFromResources("GenerateManifest.InvalidInputManifest", new object[0]);
         return(false);
     }
     if (this.manifest is DeployManifest)
     {
         DeployManifest manifest = this.manifest as DeployManifest;
         if (string.IsNullOrEmpty(manifest.TargetFrameworkMoniker))
         {
             manifest.TargetFrameworkMoniker = this.TargetFrameworkMoniker;
         }
     }
     else if (this.manifest is ApplicationManifest)
     {
         ApplicationManifest manifest2 = this.manifest as ApplicationManifest;
         if (string.IsNullOrEmpty(manifest2.TargetFrameworkVersion))
         {
             manifest2.TargetFrameworkVersion = this.TargetFrameworkVersion;
         }
     }
     if ((this.EntryPoint != null) && !string.IsNullOrEmpty(this.EntryPoint.ItemSpec))
     {
         AssemblyReferenceType unspecified = AssemblyReferenceType.Unspecified;
         if (this.manifest is DeployManifest)
         {
             unspecified = AssemblyReferenceType.ClickOnceManifest;
         }
         if (this.manifest is ApplicationManifest)
         {
             unspecified = AssemblyReferenceType.ManagedAssembly;
         }
         this.manifest.EntryPoint = this.AddEntryPointFromItem(this.EntryPoint, unspecified);
     }
     if (this.Description != null)
     {
         this.manifest.Description = this.Description;
     }
     return(true);
 }
 protected internal AssemblyReference AddAssemblyNameFromItem(ITaskItem item, AssemblyReferenceType referenceType)
 {
     AssemblyReference assembly = new AssemblyReference {
         AssemblyIdentity = AssemblyIdentity.FromAssemblyName(item.ItemSpec),
         ReferenceType = referenceType
     };
     this.manifest.AssemblyReferences.Add(assembly);
     string metadata = item.GetMetadata("HintPath");
     if (!string.IsNullOrEmpty(metadata))
     {
         assembly.SourcePath = metadata;
     }
     this.SetItemAttributes(item, assembly);
     return assembly;
 }
 protected internal AssemblyReference AddEntryPointFromItem(ITaskItem item, AssemblyReferenceType referenceType)
 {
     AssemblyReference file = this.manifest.AssemblyReferences.Add(item.ItemSpec);
     file.ReferenceType = referenceType;
     this.SetItemAttributes(item, file);
     return file;
 }
예제 #11
0
		protected internal AssemblyReference AddEntryPointFromItem (ITaskItem item,
									    AssemblyReferenceType referenceType)
		{
			throw new NotImplementedException ();
		}