Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Deploying a xml Web Resource through VS 2012 Developer Toolkit problem

$
0
0

Hello,

I am having an issue parsing inside a plug-in the content of an XML web resource when the latter is deployed through the dev toolkit in VS2012.

To add the web resource: 

- right click "CrmPackage" and select "Add"-> Add New

- select xml file from the CRM items and name the file 

- the file opens is VS editor with xml directive

- add some xml "<test>aaa</test>"

To read the web resource content:

...

Entity resource = serviceResult.Entities[0];
byte[] byteContent = Convert.FromBase64String((string)resource["content"]);
string content = System.Text.Encoding.UTF8.GetString(byteContent);

The first character appears to be &#65279 instead of the "<" of the xml directive.

Is this a known issue of the Toolkit and what would be the work-around? I'd still like to deploy the xml resources through the toolkit and possibly without having to check in my code for illegal characters.


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>