configSections support when creating a nupkg

Oct 26, 2010 at 12:00 PM

I'm building a nupkg and I was attempting to do the web.config.transform, but ran into an issue where I could not get custom configSections to appear in the first node of the web.config.  The transform works fine, otherwise.  How do I ensure any configSections included in my transform appear as the first node on the web.config?  Other than that, everything working as expected.

An example:

<configuration>  

<configSections>    

<sectionGroup name="TestGroup">      

<section name="TestConfiguration" type="Test.TestCMSConfiguration" allowLocation="true" allowDefinition="Everywhere" />    

</sectionGroup>  

</configSections>

I receive this error message:

 

Parser Error Message: Only one <configSections> element allowed per config file and if present must be the first child of the root <configuration> element.

Coordinator
Oct 26, 2010 at 4:23 PM

This was fixed as part of http://nupack.codeplex.com/workitem/194. It'll be available in the next release. Or you can build the latest from source.

Oct 26, 2010 at 4:25 PM

Got latest and trying to compile the same nuspec, but getting new error with latest EXE.

Running this command:  nupack pack C:\Packages\TestProject\TestProject.nuspec

The element 'metadata' in namespace 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd' has incomplete content. List of possible elements expected: 'description' in namespace 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd'.

The schema hasn't changed, right?

Coordinator
Oct 26, 2010 at 4:28 PM

It may have changed slightly. Take a look at the xsd. sorry.

Oct 26, 2010 at 5:12 PM

Reviewed the xsd that came down with the daily build, but can't see any issues with my nuspec.

 

<?xml version="1.0" encoding="utf-8"?>
<package>
  <metadata>
    <id>JotCMS</id>
    <version>0.5</version>
    <authors>
      <author>Shane Jordan</author>
    </authors>
    <description>JotCMS is a simple unintrusive CMS to embed into .NET web applications.</description>
    <language>en-US</language>
  </metadata>
</package>

Developer
Oct 26, 2010 at 5:15 PM

Authors changed to be a comma separated string instead of an xml array.

Coordinator
Oct 26, 2010 at 5:16 PM

I’m updating the docs as we speak. Sorry for the confusion.

Oct 26, 2010 at 5:29 PM

Thanks for response.  Yes, authors is now comma seperated.  I'm now able to compile after making that change.  So I created the nupkg with the daily nupack.exe, but as far as extensions in VS2010, I still have the CTP1.  It is throwing an error when attempting to open Add Package Reference.  Does that mean I need to update the VS2010 extension to the daily build as well, in order to match up with the newly compiled nupkg?   

Error: "Exception has been thrown by the target of an invocation"

 

Oct 26, 2010 at 5:31 PM

Yes, you need to use the daily build.  We'll try to have one posted under downloads soon, but for now you'll need to use the one you build yourself.

Developer
Oct 26, 2010 at 5:33 PM

Try this link 

http://ci.nupack.com:8080/repository/download/bt4/425:id/VisualStudioAddIn/NuPack.Tools.vsix

Oct 26, 2010 at 5:41 PM

I got a TeamCity login.  

I'll just pull it from the source I downloaded.  Thanks for feedback everyone.  Any timeline on CTP2?  I'm assuming since I've now compiled this with the newer NuPack.exe, I can't really put my package into the general feed, because noone would be able to install it unless they too had the latest daily build compiled for the VS extension.