Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid entry in NuGet [Content_Types].xml #309

Open
jorgeyanesdiez opened this issue Nov 21, 2017 · 2 comments
Open

Invalid entry in NuGet [Content_Types].xml #309

jorgeyanesdiez opened this issue Nov 21, 2017 · 2 comments

Comments

@jorgeyanesdiez
Copy link

jorgeyanesdiez commented Nov 21, 2017

Product versions

Description

The [Content_Types].xml file in bundlerminifier.core.2.6.362.nupkg contains the line:
<Override PartName="//prefercliruntime" ContentType="application/octet" />
which causes mentioned NuGet products to fail. The error states that a part uri cannot start with two forward slashes.

Steps to recreate

  1. Install NuGet Server: (Instructions: https://docs.microsoft.com/en-us/nuget/hosting-packages/nuget-server)

  2. Try to publish bundlerminifier.core.2.6.362.nupkg, you will get an error.

Current behavior

The NuGet file is incompatible (presumably invalid).
Screenshot here

Expected behavior

It should work.

Workaround

I have unpacked the nuget file and removed the line, and it works!

Assumed cause

I believe the problem is line 20 at:
BundlerMinifier.Core.csproj

<Content Include="prefercliruntime" Pack="true" PackagePath="\prefercliruntime" />

Maybe the PackagePath needs to be "prefercliruntime" (without the trailing slash?)
Maybe "/prefercliruntime" with a forward slash?
Is this line even needed at all anymore?

@maheshmajeti
Copy link

when i copied the latest version of bundlerminifier.core.2.8.391 to nuget.server 3.1.2 receiving same error-part uri cannot start with two forward slashes.
System.ArgumentException
at System.IO.Packaging.PackUriHelper.ValidatePartUri(Uri partUri) at System.IO.Packaging.ZipPackage.ContentTypeHelper.ProcessOverrideTagAttributes(XmlTextReader reader) at System.IO.Packaging.ZipPackage.ContentTypeHelper.ParseContentTypesFile(ZipFileInfoCollection zipFiles) at System.IO.Packaging.ZipPackage.ContentTypeHelper..ctor(ZipArchive zipArchive, IgnoredItemHelper ignoredItemHelper) at System.IO.Packaging.ZipPackage..ctor(Stream s, FileMode mode, FileAccess access, Boolean streaming) at System.IO.Packaging.Package.Open(Stream stream, FileMode packageMode, FileAccess packageAccess, Boolean streaming) at System.IO.Packaging.Package.Open(Stream stream) at NuGet.PackageHelper.GetManifestStream(Stream packageStream) at NuGet.OptimizedZipPackage.EnsureManifest() at NuGet.OptimizedZipPackage..ctor(IFileSystem fileSystem, String packagePath, IFileSystem expandedFileSystem) at NuGet.Server.Core.PackageFactory.Open(String fullPackagePath) at NuGet.Server.Core.Infrastructure.ServerPackageRepository.AddPackagesFromDropFolderWithoutLocking() at NuGet.Server.Core.Infrastructure.ServerPackageRepository.d__43.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Server.Core.Infrastructure.ServerPackageRepository.d__32.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Server.Core.Infrastructure.ServerPackageRepository.d__31.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Server.V2.Controllers.NuGetODataController.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Threading.Tasks.TaskHelpersExtensions.d__3`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()</

Is there any update on this issue.

@AlexaCodex
Copy link

AlexaCodex commented Dec 6, 2018

Any updates on this, the issues is also there with : microsoft.visualstudio.web.codegeneration.tools.2.0.4
[Content_Types].xml :

<?xml version="1.0" encoding="utf-8"?>
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
  <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" />
  <Default Extension="psmdcp" ContentType="application/vnd.openxmlformats-package.core-properties+xml" />
  <Default Extension="json" ContentType="application/octet" />
  <Default Extension="dll" ContentType="application/octet" />
  <Default Extension="targets" ContentType="application/octet" />
  <Default Extension="nuspec" ContentType="application/octet" />
  <Override PartName="//prefercliruntime" ContentType="application/octet" />
</Types>

This is the culprit with double slash '//': <Override PartName="//prefercliruntime" ContentType="application/octet" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants