Skip to content

Commit

Permalink
corrected copy gac with current project in package
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasR committed Mar 4, 2021
1 parent 796ba4f commit 07be18c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,11 @@ public void QuickCopyBinaries(bool requiresQuickPackage)
{
project.ProjectService.Logger.ActivateOutputWindow();
project.ProjectService.Logger.WriteLine("------ Quick Copying Binaries: " + project.Name + " ------", LogCategory.Status);

string currentProjectAssemblyName = Path.GetFileName(project.OutputFullPath);
bool projectAssemblyCopied = false;
if (project.IncludeAssemblyInPackage)
{
string packageBaseAssemblyPath = this.BasePackagePath;
string assemblyName = Path.GetFileName(project.OutputFullPath);

if (requiresQuickPackage)
{
Expand All @@ -297,15 +297,16 @@ public void QuickCopyBinaries(bool requiresQuickPackage)
{
// Copy the binary from the source folder (e.g. bin/debug) to the appropriate place in the pkg folder.
DeploymentUtilities.CopyFileWithTokenReplacement(this.Project,
assemblyName,
currentProjectAssemblyName,
Path.GetDirectoryName(project.OutputFullPath),
packageBaseAssemblyPath,
null
);
projectAssemblyCopied = true;
}
}

string sourceAssembly = Path.Combine(packageBaseAssemblyPath, assemblyName);
string sourceAssembly = Path.Combine(packageBaseAssemblyPath, currentProjectAssemblyName);
if (project.AssemblyDeploymentTarget == AssemblyDeploymentTarget.GlobalAssemblyCache)
{
DeploymentUtilities.CopyToGac(project, sourceAssembly);
Expand All @@ -332,7 +333,13 @@ public void QuickCopyBinaries(bool requiresQuickPackage)
else if (assembly is IProjectOutputAssembly)
{
IProjectOutputAssembly poAssembly = assembly as IProjectOutputAssembly;
string projPath = Path.GetDirectoryName(poAssembly.ProjectPath);
string projectPath = poAssembly.ProjectPath;
if (string.IsNullOrEmpty(projectPath) && projectAssemblyCopied && poAssembly.Location == currentProjectAssemblyName)
{
continue;
}

string projPath = Path.GetDirectoryName(projectPath);
originalAssemblyPath = Path.Combine(projPath, this.AssemblyPath);
}

Expand Down
2 changes: 1 addition & 1 deletion CKSDev2019VSIX/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="CKSDev2019VSIX.d7bc4fe1-9fc1-4161-96b3-c63839219add" Version="2.0" Language="en-US" Publisher="Nicolas RIGNAULT" />
<Identity Id="CKSDev2019VSIX.d7bc4fe1-9fc1-4161-96b3-c63839219add" Version="1.0" Language="en-US" Publisher="Nicolas RIGNAULT" />
<DisplayName>CKS - Dev for Visual Studio 2017/2019 - Unofficial</DisplayName>
<Description xml:space="preserve">The CKS - Development Tools Edition for Visual Studio 2017/2019 is a collection of Visual Studio templates, Server Explorer extensions and tools providing accelerated SharePoint 2010/2013 development based on Microsoft's SharePoint 2010/2013 development tools.</Description>
<MoreInfo>http://cksdev.codeplex.com</MoreInfo>
Expand Down

0 comments on commit 07be18c

Please sign in to comment.