<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>XML Archives - Blog IT</title>
	<atom:link href="https://blogit.create.pt/tag/xml/feed/" rel="self" type="application/rss+xml" />
	<link>https://blogit.create.pt/tag/xml/</link>
	<description>Create IT blogger community</description>
	<lastBuildDate>Thu, 10 Jan 2019 12:46:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>How to add your custom content files into a nuget package (for Visual Studio)</title>
		<link>https://blogit.create.pt/gustavobrito/2018/01/12/how-to-add-your-custom-content-files-into-a-nuget-package-for-visual-studio/</link>
					<comments>https://blogit.create.pt/gustavobrito/2018/01/12/how-to-add-your-custom-content-files-into-a-nuget-package-for-visual-studio/#comments</comments>
		
		<dc:creator><![CDATA[Gustavo Brito]]></dc:creator>
		<pubDate>Fri, 12 Jan 2018 15:49:08 +0000</pubDate>
				<category><![CDATA[Nuget]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[$rootnamespace$]]></category>
		<category><![CDATA[add files]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[cml]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[contentFiles]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[customfiles]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[external]]></category>
		<category><![CDATA[external files]]></category>
		<category><![CDATA[nupkg]]></category>
		<category><![CDATA[nuspec]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[packaging]]></category>
		<category><![CDATA[pp]]></category>
		<category><![CDATA[targets]]></category>
		<category><![CDATA[transform]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[visual studio nuget]]></category>
		<category><![CDATA[xdt]]></category>
		<category><![CDATA[XML]]></category>
		<guid isPermaLink="false">http://blogit.create.pt/gustavobrito/?p=1214</guid>

					<description><![CDATA[<p>Yesterday, I was assigned to fix a nuget package solution that was not packing all the needed files. I had a bad time searching online for answers, and had to dig in by myself. After I discovered how to include the files that I needed, I decided to create a simple tutorial that has it [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2018/01/12/how-to-add-your-custom-content-files-into-a-nuget-package-for-visual-studio/">How to add your custom content files into a nuget package (for Visual Studio)</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Yesterday, I was assigned to fix a nuget package solution that was not packing all the needed files. I had a bad time searching online for answers, and had to dig in by myself. After I discovered how to include the files that I needed, I decided to create a simple tutorial that has it all!</p>
<p>This tutorial will show you how to include your non-compilable items into a nuget package (nupkg). This steps apply to any type of file.</p>
<p><span id="more-1214"></span></p>
<p><strong>DISCLAIMER: You must have a nuspec file and a targets file. If you don&#8217;t have one yet, download one from somewhere and change the metadata accordingly.</strong></p>
<p><strong>Let&#8217;s start!</strong></p>
<ol>
<li>Open up your solution in Visual Studio</li>
<li>Open your solution&#8217;s nuspec file and look for <strong>&lt;files&gt;</strong> tag</li>
<li>You need to reference <strong>all folders and all files</strong> that you want to include in your nuget. Example below:</li>
</ol>
<blockquote>
<pre class="brush: xml; title: ; notranslate">
&lt;files&gt;
    &lt;file src=&quot;lib\net452\your_compiled_assembly.dll&quot; target=&quot;lib\net452&quot; /&gt;
    &lt;file src=&quot;Your_Folder\*.pp&quot; target=&quot;content\Your_Folder&quot;/&gt;
    &lt;file src=&quot;Your_Folder\Your_Sub_Folder\*.*&quot; target=&quot;content&quot; /&gt;
    &lt;file src=&quot;*.xdt&quot; target=&quot;content&quot; /&gt;
 &lt;/files&gt;
</pre>
</blockquote>
<p>4.  After you added all files into nuspec config, now you can open your targets file. Don&#8217;t forget to import targets into your csproj file like the example below</p>
<pre class="brush: xml; title: ; notranslate">
&lt;Import Project=&quot;your_targets_file.targets&quot; Condition=&quot;Exists('your_targets_file.targets')&quot; /&gt;
</pre>
<p>5. Now to targets file, you must index <strong>ALL </strong>files that you want to add to your nuget. <strong>This step is very important</strong></p>
<div>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;Project ToolsVersion=&quot;14.0&quot; DefaultTargets=&quot;Build&quot; xmlns=&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;&gt;
 &lt;TargetName=&quot;CreatePackage&quot;&gt;
   &lt;PropertyGroup&gt;
   &lt;Configuration&gt;Release&lt;/Configuration&gt;
   &lt;PackageSource&gt;bin\$(Configuration)\Package&lt;/PackageSource&gt;
   &lt;NuSpecPath&gt;$(MSBuildProjectName).nuspec&lt;/NuSpecPath&gt;
   &lt;/PropertyGroup&gt;
   &lt;RemoveDirDirectories=&quot;$(PackageSource)&quot;/&gt;
   &lt;MSBuildProjects=&quot;$(MSBuildProjectFullPath)&quot; Targets=&quot;Rebuild&quot;Properties=&quot; TargetFrameworkVersion=v4.0; OutputPath=bin\$(Configuration)\net40;Configuration=$(Configuration)&quot; BuildInParallel=&quot;$(BuildInParallel)&quot;/&gt;


   &lt;Copy SourceFiles=&quot;bin\$(Configuration)\net40\$(AssemblyName).dll&quot; DestinationFolder=&quot;$(PackageSource)\lib\net40&quot;/&gt;
   &lt;Copy SourceFiles=&quot;$(NuSpecPath)&quot; DestinationFolder=&quot;$(PackageSource)&quot;/&gt;
   &lt;Copy SourceFiles=&quot;Your_Folder\Your_Class_File.cs.pp&quot; DestinationFolder=&quot;$(PackageSource)\Your_Folder&quot;/&gt;
   &lt;Copy SourceFiles=&quot;Your_Folder\Yet_Another_Class.cs.pp&quot; DestinationFolder=&quot;$(PackageSource)\Your_Folder&quot;/&gt;
   &lt;Copy SourceFiles=&quot;Your_Folder\Your_Sub_Folder\A_Class.cs.pp&quot; DestinationFolder=&quot;$(PackageSource)\Your_Folder\Your_Sub_Folder&quot;/&gt;
   &lt;Copy SourceFiles=&quot;Your_Images_Folder\Your_Image.jpeg&quot; DestinationFolder=&quot;$(PackageSource)\Your_Images_Folder&quot;/&gt;
   &lt;Copy SourceFiles=&quot;Your_root_file.xml&quot; DestinationFolder=&quot;$(PackageSource)&quot;/&gt;
 &lt;/Target&gt;
&lt;/Project&gt;
</pre>
</div>
<p>6. After you added all your source files into your targets file, you are ready to pack it!!</p>
<p><strong>File extensions for Transformations and generated classes:</strong></p>
<ol>
<li>A <strong>pp </strong>file extension is a class that&#8217;s generated when a nuget is installed in any solution. Usually, the class namespace is replaced by &#8220;<strong>$rootnamespace$&#8221;</strong> (without quotes) and the extension is added (yourclass.cs<strong>.pp</strong>)</li>
<li>A <strong>xdt </strong>file extension is a <a href="https://msdn.microsoft.com/en-us/library/dd465326(v=vs.110).aspx">XML Transformation procedure</a>.</li>
</ol>
<p>Example of a <strong>*.pp </strong>class ready to be packed into a nuget:</p>
<pre class="brush: csharp; title: ; notranslate">
namespace $rootnamespace$.App_Start
{
 using System;
 using System.Collections.Generic;
 using System.Configuration;
 using System.Linq;
...
}
</pre>
<p>That&#8217;s all folks!</p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2018/01/12/how-to-add-your-custom-content-files-into-a-nuget-package-for-visual-studio/">How to add your custom content files into a nuget package (for Visual Studio)</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/gustavobrito/2018/01/12/how-to-add-your-custom-content-files-into-a-nuget-package-for-visual-studio/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title>How to fix BizTalk Server Administration Exception 0xC00CE557: Could not enlist Send Port</title>
		<link>https://blogit.create.pt/gustavobrito/2017/09/29/how-to-fix-biztalk-server-administration-exception-0xc00ce557-could-not-enlist-send-port/</link>
					<comments>https://blogit.create.pt/gustavobrito/2017/09/29/how-to-fix-biztalk-server-administration-exception-0xc00ce557-could-not-enlist-send-port/#respond</comments>
		
		<dc:creator><![CDATA[Gustavo Brito]]></dc:creator>
		<pubDate>Fri, 29 Sep 2017 17:07:51 +0000</pubDate>
				<category><![CDATA[BizTalk Server]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[0xC00CE557]]></category>
		<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[BizTalk Server Administration]]></category>
		<category><![CDATA[Create]]></category>
		<category><![CDATA[Enlist]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[Exception]]></category>
		<category><![CDATA[HRESULT]]></category>
		<category><![CDATA[Send Ports]]></category>
		<category><![CDATA[XML]]></category>
		<guid isPermaLink="false">http://blogit.create.pt/gustavobrito/?p=34</guid>

					<description><![CDATA[<p>With the need to deploy all port bindings from Visual Studio straight to BizTalk Server, I did export bindings on BizTalk Server Administration. With this, I can merge new ports that were configured manually to my Visual Studio BZ Project, so they can be deployed automatically. Just when I thought that all was well, a [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2017/09/29/how-to-fix-biztalk-server-administration-exception-0xc00ce557-could-not-enlist-send-port/">How to fix BizTalk Server Administration Exception 0xC00CE557: Could not enlist Send Port</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>With the need to deploy all port bindings from Visual Studio straight to BizTalk Server, I did export bindings on BizTalk Server Administration. With this, I can merge new ports that were configured manually to my Visual Studio BZ Project, so they can be deployed automatically. Just when I thought that all was well, a binding import error appeared, and some ports could not be enlisted and started.</p>
<p>&nbsp;</p>
<p><img decoding="async" class="size-medium wp-image-174 aligncenter" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/09/img1-300x67.png" alt="" width="300" height="67" srcset="https://blogit.create.pt/wp-content/uploads/2017/09/img1-300x67.png 300w, https://blogit.create.pt/wp-content/uploads/2017/09/img1.png 621w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p style="text-align: center;">Pic1. Exception: &#8220;Could not enlist Send Port &#8211; HRESULT: 0xC00CE557&#8221;</p>
<p>So, after some debugging, me and my teammate noticed an issue with some port filters inside a WCF Custom Send Port in the bindings XML, originally exported by BizTalk. Time to check the XML now!</p>
<p>Here’s how you can trace errors in XML:</p>
<ul>
<li>Open exported ports binding XML file:</li>
</ul>
<p>&nbsp;</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter wp-image-184 " src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/09/img2.png" alt="" width="609" height="352" /></p>
<p style="text-align: center;">Pic2. Origin of the exception selected</p>
<p>Notice this property, “Filter”. It has break lines and white spaces. BizTalk refuses to import bindings like this, and generates an exception. Worst part is that this exception is generic, and meaningless.</p>
<p>To fix this, you must remove all white spaces and all break lines inside this field. This problem appears because these filters have an “AND” relationship between them, and BizTalk can’t understand those mathematical relationships with all these white spaces and break lines among them.</p>
<p>The final and fixed XML property should look like this:</p>
<p>&lt;SomePropertyName&gt;all lines here without spaces or break lines&lt;/SomePropertyName&gt;</p>
<p>If you run into some exceptions importing port bindings, you should analyze the bindings file and look for a XML property with spaces and break lines. Re-arrange and you should be OK importing bindings and enlisting ports now!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2017/09/29/how-to-fix-biztalk-server-administration-exception-0xc00ce557-could-not-enlist-send-port/">How to fix BizTalk Server Administration Exception 0xC00CE557: Could not enlist Send Port</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/gustavobrito/2017/09/29/how-to-fix-biztalk-server-administration-exception-0xc00ce557-could-not-enlist-send-port/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
